API Request Errors
In the events of API request errors, AfterShip Shipping uses conventional HTTP response codes in the 4XX and 5XX range to indicate the reason behind the error.
AfterShip Shipping uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, a charge failed, etc.), and codes in the 5xx range indicate an error with AfterShip Shipping's servers.
HTTP Status Code Summary
Status code | Meta code | Retryable | Message |
---|---|---|---|
200 | 200 | OK | |
401 | 401 | Invalid API key. | |
429 | 429 | TRUE | You have exceeded the API call rate limit. Please check the header field 'X-RateLimit-Reset' for time left until the limit release. |
500 | 500 | FALSE | Something went wrong on AfterShip Shipping's end. |
502 | 502 | FALSE | Something went wrong on AfterShip Shipping's end. |
503 | 503 | FALSE | Something went wrong on AfterShip Shipping's end. |
504 | 504 | FALSE | Something went wrong on AfterShip Shipping's end. |
200 | 3001 | FALSE | The request has been accepted for processing, but the processing has not been completed. |
200 | 4100 | FALSE | Internal Error. |
200 | 4101 | TRUE | Internal Error, please try again. |
200 | 4104 | FALSE | The request was invalid or cannot be otherwise served. |
200 | 4109 | FALSE | Invalid JSON. |
200 | 4140 | FALSE | Shipper account not found. |
200 | 4153 | FALSE | Item does not exist. |
200 | 4155 | TRUE | Access to shipper_account locked during manifest/cancel-label operation. |
200 | 4157 | FALSE | Rate is not found |
200 | 4159 | TRUE | The prepaid account is currently deactivated, please try again later. |
200 | 4161 | FALSE | Your card is declined by payment gateway. |
200 | 4162 | FALSE | There is an error when connecting to payment gateway. |
200 | 4163 | FALSE | The amount of given transaction is invalid. |
200 | 4164 | FALSE | The payment request is invalid. |
200 | 4171 | FALSE | Operation is not allowed on this courier. |
200 | 4172 | TRUE | You have exceeded the limit on number of requests, please try again later |
200 | 4312 | TRUE | Networking error encountered, please try again. |
200 | 4500 | FALSE | Your account balance is not enough. Please top up the balance in your account page. |
200 | 4508 | FALSE | The given transaction id is invalid |
200 | 4510 | FALSE | The given transaction has been refunded already |
200 | 4703 | TRUE | The courier seems to be currently unavailable, please try again later. |
200 | 4705 | FALSE | No response was returned. |
200 | 4713 | FALSE | All or partial failed in rate request. |
200 | 4715 | FALSE | The request is invalid or cannot be served by courier. |
200 | 4716 | FALSE | The address length is too long. |
200 | 4722 | FALSE | The tracking number is already canceled, it can not be canceled again. |
200 | 4723 | FALSE | The tracking number does not exist, can not not be canceled. |
200 | 4724 | FALSE | The tracking number is manifested, so can not be canceled. |
200 | 4725 | FALSE | There is no shipments to manifest. |
200 | 4730 | FALSE | No more pre-assigned tracking numbers available in this shipper account. Please input the new tracking numbers in your shipper account setting page. |
200 | 4732 | FALSE | The credential error, please check your shipper account. |
200 | 4733 | FALSE | The request is invalid or cannot be served by AfterShip Shipping. |
200 | 4801 | FALSE | Duplicate order_number, please specify a different order_number and try again. |
200 | 4802 | FALSE | The service_type is not available for this shipment. |
200 | 4803 | FALSE | The service_type and service_option are not available for this shipment. |
200 | 4804 | FALSE | The weight is not available for this shipment. |
Examples
Invalid API key
preparing...
Internal Server Error
preparing...