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
| Header | Value |
|---|
X-API-Key | Your Partner API key |
Response
{
"success": true,
"message": "Get token successfully",
"data": {
"accessToken": "eyJhbGciOiJIUzI1NiIs..."
}
}
Error responses
Missing API Key
Error Generating Token
{
"success": false,
"message": "Missing API Key"
}
{
"success": false,
"message": "Error generating API token"
}
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 Code | Description |
|---|
MissingTokenError | No Authorization header provided |
ExpiredTokenError | The JWT access token has expired — request a new one |
InvalidTokenError | The token is malformed or the API key is invalid |
TokenPayloadError | The token payload could not be decoded |
Error response example
{
"success": false,
"message": "Missing API Key"
}