Get Started
Welcome! This guide will help you get started with our API.
Authentication
All API requests require an Authorization header with an API token. The token should be prefixed with Api-Token .
Authorization: Api-Token YOUR_API_TOKEN
Verify Token
You can verify your token and get information about your account by calling the /api/me endpoint.
Endpoint: GET /api/me
Response Example (Success):
{
"Succeeded": true,
"Data": {
"KeyId": "key_123456",
"AccountNo": "ACC789",
"Scopes": ["shipments:read", "shipments:write"]
}
}
Response Handling
All API responses follow a standard structure called Result. This ensures consistency across different endpoints and helps you handle success and error cases uniformly.
Unless speicified in the API, the response will always be wrapped in Result if the resonse
Content-Typeisapplication/json.
Success Response Example
{
"Succeeded": true,
"Data": {
"Id": "ship_123",
"TrackingNumber": "TN987654321"
}
}
Error Response Example (Domain Error)
{
"Succeeded": false,
"Error": {
"Code": "InvalidAddress",
"Message": "The provided destination address is invalid."
}
}
Error Response Example (Validation Error)
{
"Succeeded": false,
"Error": {
"Code": "BAD_REQUEST",
"Message": "Request is invalid, model validation failed."
},
"SystemError": {
"Message": "The request is invalid.",
"ModelState": {
"request": ["The request field is required."],
"$.FieldName": [
"The JSON value could not be converted to enum MyFieldEnum. Path: $.FieldName | LineNumber: 43 | BytePositionInLine: 45."
]
},
"MessageDetail": null,
"ExceptionMessage": null,
"ExceptionType": null,
"StackTrace": null,
"InnerException": null
},
"CapturedValues": {}
}