<

Sending Code API

The Sending Code API lets you generate a short code that replaces a printed shipping label.

  • The code is 6 characters long, using numbers (0–9) and letters (A–F).
  • You can write this code directly on the parcel instead of attaching a label.

With this API you can:

  • Create a new sending code for a shipment
  • Retrieve a sending code if it already exists
  • Look up shipment details by sending code

Authentication

Posti APIs are secured with authentication and authorization flows based on OAuth 2.0. The production credentials (client ID and secret) can be ordered from the LogEDI@posti.com. Required information in the credentials order: Posti contract number, Organization number (Business ID), contact information.

Requesting the token

  • The request must be an HTTP POST request.
  • The request must include a Content-Type header with the value of application/x-www-form-urlencoded.
  • The body of the request must have:
  • grant_type=client_credentials
  • client_id=<User ID>
  • client_secret=<User secret>

Production authentication token request URL:
https://gateway-auth.posti.fi/api/v1/token

Sample access token cURL request:

curl -X POST https://gateway-auth.posti.fi/api/v1/token \
--header "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "grant_type=client_credentials" \
--data-urlencode "client_id=<DEMO-USER-ID>" \
--data-urlencode "client_secret=<DEMO-SECRET-ID>"
            

Receiving the access token

If the client is successfully authenticated, an access token is returned. The content of the token_value is encrypted. The targets list the available APIs that are allowed to be used with the token.

{
  "access_token": "",
  "token_type": "Bearer",
  "expires_in": 3600,
  "posti_fi": {
    "targets": {
      "2025-04": {
        "url": "https://gateway.posti.fi/2025-04",
        "tier": 0
      }
    }
  }
}

            

Using the access token

To use the access token to authenticate API request, construct a normal HTTPS request and include an Authorization header with the value of Bearer <token_value>.

Sample Sending Code API cURL request:

curl -X POST https://gateway.posti.fi/2025-04/labelless \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token_value>" \
--data "{'searchCriteria': {'trackingNumber': 'JJFI65432100000000224'}}"
            

Access token expiration

Access tokens obtained from the token endpoint expire in one hour (3600 seconds).

Instructions

You can view the OpenAPI specification here.

General conventions

Pickup Point API is part of Posti APIs and follows a long-term version numbering, visible in the path in “yyyy-mm” format. Yearly releases will be published, and each version is supported for three years.

Environments

Currently only a production environment is available for customers.

Production Sending Code API endpoints

  • Create a sending code for a shipment

    POST https://gateway.posti.fi/2025-04/labelless

  • Retrieve sending code by tracking number

    GET https://gateway.posti.fi/2025-04/labelless/{trackingNumber}

  • Get shipment details by sending code

    GET https://gateway.posti.fi/2025-04/labelless/shipment/{sendingCode}

Request format

  • Provide the trackingNumber of the shipment you want a code for.
  • (Optional) Add "validation": {"noEdiCheck": true} if you want to bypass the EDI check. Normally, the system ensures the shipment has EDI data before creating a code.
{
  "searchCriteria": {
    "trackingNumber": " JJFI65432100000000224"
  },
  "validation": {
    "noEdiCheck": true
  }
}
            

Response format

You’ll get a list of shipments with their sending codes.

Example:

{
  "shipments": [
    {
      "trackingNumber": " JJFI65432100000000224",
      "sendingCode": "654321"
    }
  ]
}