> For the complete documentation index, see [llms.txt](https://naviprotocol.gitbook.io/navi-protocol-developer-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://naviprotocol.gitbook.io/navi-protocol-developer-docs/contract-configuration/get-the-latest-package-id.md).

# Get the Latest Package ID

## **getPackageId - NAVI API**

The `getPackageId` API is publicly accessible and retrieves the latest package information for the NAVI Protocol. This endpoint provides the current `packageId` in use, along with a list of outdated package IDs for reference. It helps developers ensure they are working with the most up-to-date package when interacting with NAVI's smart contracts.

{% openapi src="/files/pZQa4H5YchxKObjiti7h" path="/api/package" method="get" %}
[package.json](https://2230654657-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWcKfs3vWiDuhitgCkBQQ%2Fuploads%2FbBdQlQoUTZgRIwRtsE3p%2Fpackage.json?alt=media\&token=8a9f11ff-472a-4dd1-a95a-92769dfa9308)
{% endopenapi %}

## **getPackageId - NAVI SDK**

The `getLatestProtocolPackageId` function in the NAVI SDK retrieves the most recent `packageId` used in the NAVI Protocol. This function is essential for PTB developers to ensure they are interacting with the latest version of NAVI’s smart contracts in their JavaScript-based code.

```javascript
import { getLatestProtocolPackageId } from 'navi-sdk/dist/libs/PoolInfo';

const id = await getLatestProtocolPackageId();
```
