Skip to main content

PackNet Online Documentation

Basic Authentication

The Basic Authentication method uses a username (Tenant ID) and password (API Key). This username and password will then need to be Base64 encoded to be used in the API call. This authorization method is best for backward compatibility with existing API integrations.

Note

If the API key was generated before October 2025, a new API key will need to be generated to make sure it is compatible with the new API gateway.

Users will need to generate an API key in PackNet before using the basic authentication method with the PackNet API Gateway.

  1. Log in to PackNet Software Platform.

  2. Go to Configuration > Settings > API.

  3. Select Add API Connection.

    API_Add_API_Connection.png
  4. Select API Key.

  5. Enter a name for the API Key.

  6. Select the API services the API key will be used for:

    • Migration

    • Import

    • Dim

    • Production

    • Cube

    API_Services.png
  7. Select Add API Connection.

  8. Copy the Tenant ID and API Key and store the API Key securely for future use.

    Important

    The API Key will only be displayed once and cannot be retrieved later. It should not be shared.

  9. Once created, the API connection will be shown in the API list with the name and services specified, Connection Type = API Key, and created date.

API keys remain valid unless they are explicitly revoked by deleting them from PackNet. Multiple API keys can be generated as needed.

Copy Tenant ID

The Tenant ID can be copied at a later time if needed. The API Key will only be displayed once during API key creation.

  1. Log in to PackNet Software Platform.

  2. Go to Configuration > Settings > API.

  3. Select Copy Tenant ID.

    Copy_Tenant_ID.png
How to Use Basic Authentication

The Basic Authentication method uses a username (Tenant ID) and password (API Key). This username and password will then need to be Base64 encoded to be used in the API Authorization header.

Encode the credentials as tenantId:apiKey in Base64 format.

Base64 Example
  • Tenant ID: 550e8400-e29b-41d4-a716-446655440000

  • API Key: pk_live_abc123xyz789

  • Combined: 550e8400-e29b-41d4-a716-446655440000:pk_live_abc123xyz789

  • Base64: NTUwZTg0MDAtZTI5Yi00MWQ0LWE3MTYtNDQ2NjU1NDQwMDAwOnBrX2xpdmVfYWJjMTIzeHl6Nzg5

CURL Samples

In the below CURL samples, BASE_64_ENCODED_CREDENTIALS are the tenantId:ApiKey encoded with base64

Windows PowerShell

Windows expects double quotes (" "). PowerShell uses backticks (`) for multiline commands.

curl --location "https://api.prod1.packnet.app/Dim/v1/Import" `
  --header "Authorization: Basic BASE_64_ENCODED_CREDENTIALS" `
  --header "Content-Type: application/json"
Windows CMD (Command Prompt) CURL Header Sample

Windows expects double quotes (" "). CMD doesn’t support multiline.

curl --location "https://api.prod1.packnet.app/Dim/v1/Import" --header "Authorization: Basic BASE_64_ENCODED_CREDENTIALS" --header "Content-Type: application/json"
Linux and MAC CURL Header Sample

Linux and MAC expect single quotes (' '). Use backslash (\) for multiline commands.

curl --location 'https://api.prod1.packnet.app/Dim/v1/Import' \
--header 'Authorization: Basic BASE_64_ENCODED_CREDENTIALS' \
--header 'Content-Type: application/json' 

Important

Do not delete an API connection unless instructed to do so. Deleting an API connection from the tenant immediately revokes access for all applications using it and can negatively impact the way jobs are produced.

  1. Go to Configuration > Settings > API and locate the API key.

  2. Select the information icon next to the API key to be deleted.

  3. Select Delete.

    API_Connection_Details.png
  4. A dialog will appear asking to confirm deletion. Enter delete into the textbox, and then select Delete.

    API_Delete_Connection.png
  5. Confirm the API key deletion.