Help CenterGitHub

Errors

The atoship API uses conventional HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx range indicate success, 4xx indicate client errors, and 5xx indicate server errors.

HTTP Status Codes

Success Codes

200
OK

Request succeeded

201
Created

Resource created successfully

Client Errors

400
Bad Request

Invalid request parameters

401
Unauthorized

Invalid or missing API key

402
Payment Required

Insufficient balance or payment failed

403
Forbidden

API key lacks required permissions

404
Not Found

Resource does not exist

422
Unprocessable Entity

Validation error on request data

429
Too Many Requests

Rate limit exceeded

Server Errors

500
Internal Server Error

Something went wrong on our end

503
Service Unavailable

API is temporarily unavailable

Error Object

All errors return a JSON object with the following structure:

typestring

Error category (e.g., "invalid_request_error")

codestring

Machine-readable error code

messagestring

Human-readable error description

paramstring (optional)

Parameter that caused the error

request_idstring

Unique request ID for debugging

Handling Errors

Check the HTTP status code

Use the status code to determine the error category

Parse the error object

Read the error type and code for programmatic handling

Display the message

Show the message to users for actionable feedback

Log the request_id

Include request_id when contacting support

ERROR
Response Examples
1{
2 "error": {
3 "type": "invalid_request_error",
4 "code": "invalid_parameter",
5 "message": "Invalid address: zip code is required",
6 "param": "to_address.zip",
7 "request_id": "req_abc123def456"
8 }
9}
Error Types
invalid_request_errorInvalid params
authentication_errorAuth failed
validation_errorValidation failed
rate_limit_errorToo many requests
api_errorServer error
carrier_errorCarrier issue
Rate Limits
Standard100 req/min
Label Creation60 req/min
Rate Quotes120 req/min
Tracking200 req/min
atoship © 2026