Getting started overview

Integrating with PostNord APIs enables programmatic access to logistics services for the Nordic region. The initial setup involves registering on the PostNord Developer Portal, generating API keys, and then making a first authenticated API call. PostNord provides a range of APIs for functions such as tracking parcels, calculating shipping options, and locating service points. The platform offers a free tier for initial development and testing, with usage quotas varying by API.

A structured approach to getting started includes:

  1. Account Creation: Registering on the PostNord Developer Portal.
  2. Key Generation: Obtaining API keys, which are essential for authenticating requests.
  3. Environment Setup: Configuring your development environment to interact with the PostNord API endpoints.
  4. First Request: Executing a simple API call to verify connectivity and authentication.

The Developer Portal serves as the central hub for documentation and support throughout the integration process.

Quick Reference: PostNord API Onboarding

Step What to do Where
1. Register Create a developer account. PostNord Developer Portal registration page
2. Generate Keys Obtain your API keys (test and production). PostNord Developer Portal API Keys section
3. Explore Docs Review API specifications and request/response formats. PostNord API reference
4. Make a Call Send your first authenticated request. Using a tool like cURL, Postman, or a custom application.
5. Monitor Usage Keep track of your API call volumes. PostNord Developer Portal usage dashboard

Create an account and get keys

To begin using PostNord APIs, developers must first register an account on the PostNord Developer Portal. This registration process typically requires an email address and creates access to a developer dashboard.

  1. Navigate to Registration: Go to the PostNord Developer Portal registration page.
  2. Provide Details: Fill in the required registration information, which may include your name, organization, and contact details.
  3. Verify Account: Follow the instructions in the verification email sent to complete account activation. This step is common practice for many API providers to secure accounts.

Once registered and logged in, you will be directed to your developer dashboard. From here, you can manage your applications and API keys.

Obtaining API Keys

API keys are crucial for authenticating your requests to PostNord's services. PostNord generally provides separate keys for test and production environments. Test keys are used during development and integrate with sandbox environments, preventing unintended operations on live data. Production keys are for live applications interacting with actual PostNord systems.

  1. Access API Key Section: Within your developer dashboard, locate the 'API Keys' or 'Credentials' section.
  2. Generate New Key: Click the button to 'Create New API Key' or similar. You may be prompted to name your application or specify the intended API usage.
  3. Record Keys Securely: Once generated, your API keys (often a string of alphanumeric characters) will be displayed. It is critical to copy and store these keys securely. Best practices recommend not embedding keys directly into source code, but rather using environment variables or a secure configuration management system. Information on secure API key handling can be found in general Google Cloud API key best practices.
  4. Distinguish Keys: Ensure you differentiate between your test and production keys to avoid accidental use of production resources during development.

The free tier available with PostNord allows for 500 requests/month for the tracking API and 100 requests/month for other APIs, making it suitable for initial testing with these generated keys.

Your first request

After creating an account and obtaining your API keys, the next step is to make a successful API call. This verifies that your credentials are valid and that your development environment is correctly configured. For this example, we will use the PostNord Delivery Tracking API, which is frequently used for monitoring parcel status and is included in the free tier quota.

API Endpoint and Authentication

The base URL for the PostNord Delivery Tracking API is typically https://api.postnord.com/trackandtrace/v2/shipments.

Authentication generally involves passing your API key as a header or query parameter. Consult the PostNord authentication documentation for exact implementation details. For many PostNord APIs, the API key is passed via the X-API-KEY HTTP header.

Example: Tracking a Shipment

To track a shipment, you will typically need a tracking ID. This example assumes you have a valid PostNord tracking ID (sometimes referred to as a Waybill ID or Item ID). If you do not have a live tracking ID, PostNord's documentation may offer sample IDs for testing purposes within their sandbox environment.

Request Details:

  • Method: GET
  • Endpoint: https://api.postnord.com/trackandtrace/v2/shipments?id=[YOUR_TRACKING_ID]
  • Headers:
    • X-API-KEY: [YOUR_API_KEY]
    • Accept: application/json

cURL Example:


curl -X GET \
  'https://api.postnord.com/trackandtrace/v2/shipments?id=PN123456789SE' \
  -H 'Accept: application/json' \
  -H 'X-API-KEY: YOUR_POSTNORD_API_KEY'

    

Replace PN123456789SE with an actual PostNord tracking ID and YOUR_POSTNORD_API_KEY with your generated API key. Execute this command in your terminal.

Expected Successful Response (abbreviated JSON):


{
  "shipments": [
    {
      "shipmentId": "PN123456789SE",
      "deliveryDate": "2026-05-30T10:00:00Z",
      "status": {
        "statusText": "Delivered",
        "statusCode": "DLV"
      },
      "items": [
        {
          "itemId": "PN123456789SE",
          "statusText": "Item delivered to recipient",
          "events": [
            // ... recent events ...
          ]
        }
      ]
    }
  ]
}
    

A successful response will typically return a JSON object containing shipment details, including its current status, delivery date, and a history of events. If you receive an error, refer to the troubleshooting section below.

Common next steps

Once you have successfully made your first API call, you can proceed with further integration and development. Common next steps include:

  • Explore Other APIs: PostNord offers various APIs beyond tracking, such as the Delivery Checkout API for fetching available shipping options and prices, or the Service Point Finder API for locating nearby collection and drop-off points.
  • Integrate into Application: Incorporate the API calls into your application's backend logic or frontend user interface. Consider error handling, caching, and rate limit management.
  • Webhooks Configuration: For real-time updates on shipment status changes, investigate setting up webhooks. This pushes notifications to your application rather than requiring continuous polling of the API, optimizing resource use. Details on webhooks can be found in general API integration guides, such as Twilio's webhook security documentation. PostNord's documentation includes specifics on their implementation.
  • Monitor Usage: Regularly check your API usage dashboard in the PostNord Developer Portal to ensure you stay within your free tier limits or upgrade to a paid plan if your usage grows.
  • Implement Error Handling: Design your application to gracefully handle various API error codes and messages, providing a better user experience.
  • Security Best Practices: Review and implement security best practices for API keys, such as restricting API key usage to specific IP addresses and rotating keys periodically.
  • Testing: Thoroughly test your integration with different scenarios, including edge cases and error conditions, using sample data provided in PostNord's sandbox environment.

Troubleshooting the first call

Encountering issues during your first API call is a common part of the development process. Here are some typical problems and their solutions when interacting with PostNord APIs:

  • 401 Unauthorized / Invalid API Key:
    • Cause: The API key is missing, incorrect, or expired.
    • Solution: Double-check that your X-API-KEY header (or equivalent authentication method) precisely matches the key generated in your PostNord developer account. Ensure there are no leading/trailing spaces or typos. Confirm you are using the correct key for the environment (test vs. production).
  • 400 Bad Request:
    • Cause: The request format is incorrect, or a required parameter is missing or malformed.
    • Solution: Refer to the PostNord API Reference for the specific endpoint you are calling. Verify that all required query parameters or body fields are present and correctly formatted (e.g., correct date format, valid tracking ID structure).
  • 404 Not Found:
    • Cause: The requested resource (e.g., a specific shipment) does not exist, or the endpoint URL is incorrect.
    • Solution: Check the endpoint URL for typos. If tracking a shipment, ensure the tracking ID is valid and corresponds to an active PostNord shipment. Some APIs may return 404 for invalid identifiers even if the endpoint itself is correct.
  • 403 Forbidden:
    • Cause: Your API key does not have the necessary permissions for the requested operation, or your account has reached its rate limit.
    • Solution: Review your PostNord account settings to confirm that your API key is associated with an application that has access to the specific API you are trying to use. Check your usage dashboard for rate limit information.
  • Network Issues / Timeout:
    • Cause: Connectivity problems between your client and PostNord's servers, or a temporary server issue.
    • Solution: Verify your internet connection. Try the request again after a short waiting period. If using a firewall or proxy, ensure it is configured to allow outbound connections to api.postnord.com.
  • Incorrect Content-Type Header:
    • Cause: When sending data (e.g., a POST request), the Content-Type header might be missing or incorrect.
    • Solution: Ensure your request includes Content-Type: application/json if sending JSON data, or the appropriate type for other data formats as specified in the PostNord API documentation.

For persistent issues, consult the PostNord Developer Support resources or community forums if available.