Using Pax8's APIs

Here are some guidelines for getting started with Pax8's APIs:

  1. Start by getting your API credentials from the Pax8 Integrations Hub in the Pax8 app. Follow these steps:

    1. Navigate to Pax8 and Login.

    2. In the left navigation menu, go to Settings > Integrations.

    3. Click on the Credentials tab.

    4. Click the button labeled + Create API credential.

    5. Give your application a descriptive name (e.g., "Internal Automation," or the name of a specific system) and click Save.

      • Important Note: These API credentials are intended for your internal use only and should never be shared with third-party systems. If a third-party application requires access to your Pax8 data, they should integrate using our secure OAuth 2.0 delegation flow.
    6. Once created, you will see a cURL example. Click the Copy to clipboard icon to copy this example.

  2. Then use our documentation site or your own API client to generate requests.

  • Use the copied cURL command with a tool like Postman or your terminal to make a request to our Access Token endpoint and retrieve your API Access Token. This token will be used to authenticate your subsequent API calls.
  • Try logging in to this documentation site with your Pax8 credentials, and you can make calls directly from the API reference and see a history of API calls.

Formatting Requests

Starting with a simple GET request is the easiest way to confirm connectivity to the API, verify authentication, and receive data. You can try this directly by logging into this documentation site with your Pax8 credentials and making calls from the API reference.

Example Headers for Requests

When making API requests, you'll commonly use the following headers:

  • Content-Type: application/json
  • Authorization: Bearer ${accessToken}

The ${accessToken} value is the JWT you obtain from the createAccessToken request within the Pax8 Integrations Hub.

Dynamic Data

Be aware that some endpoints, such as Product Dependencies, Provisioning Details, and Pricing, return dynamic data that changes periodically. It is recommended to fetch this data each time you need it rather than storing it.

Pagination

All Pax8 API endpoints that return lists support pagination, allowing you to retrieve results in smaller, manageable sections. Refer to the specific endpoint documentation for field names and conventions.

Counting Nuances:

  • Page numbers typically start at 0.
  • Totals like size, totalElements, and totalPages usually start at 1.

For example, to retrieve the first 10 orders:

curl https://sample.pax8.com/order?limit=10&page=0

You can expect a response similar to:

{
  "content": [ { ... }, ... ],
  "page": {
    "size": 10,
    "totalElements": 100,
    "totalPages": 10,
    "number": 0
  }
}

API Rate Limits

To ensure fair usage and maintain stability, Pax8 APIs are subject to rate limiting. The current limit is 1000 successful calls per minute. Exceeding this will result in an HTTP 429 error until the rate limit window resets. To request a rate limit increase, please email [email protected].

API Status

You can monitor the real-time status of the Pax8 Partner API and subscribe for updates at status.pax8.com. The relevant component will be labeled as "Partner API".