Skip to main content
The Partner API uses JWT-based authentication. This is separate from the Client API — you need a Partner API key to access these endpoints. Base URL: https://api.ship.uniuni.com/partner

Step 1: Get an access token

Exchange your API key for a JWT access token by calling the authentication endpoint.
Access tokens are valid for 24 hours. Store the token and reuse it until it expires.

Request

GET /auth/token
HeaderValue
X-API-KeyYour Partner API key

Response

{
  "success": true,
  "message": "Get token successfully",
  "data": {
    "accessToken": "eyJhbGciOiJIUzI1NiIs..."
  }
}

Error responses

{
  "success": false,
  "message": "Missing API Key"
}

Example

curl -X GET https://api.ship.uniuni.com/partner/auth/token \
  -H "X-API-Key: your_api_key_here"

Step 2: Use the access token

Include the JWT token in the Authorization header for all subsequent API calls.
Authorization: Bearer <accessToken>

Example

curl -X GET "https://api.ship.uniuni.com/partner/track?trackingId=UR12345678901234567" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."

Auth error codes

Error CodeDescription
MissingTokenErrorNo Authorization header provided
ExpiredTokenErrorThe JWT access token has expired — request a new one
InvalidTokenErrorThe token is malformed or the API key is invalid
TokenPayloadErrorThe token payload could not be decoded

Error response example

{
  "success": false,
  "message": "Missing API Key"
}