Request Errors

In the event of API request errors, AfterShip uses conventional HTTP response codes in the 4XX and 5XX range to indicate the reason behind the error along with the error code already defined in the response body.


In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error caused by the given information (E.g., you omitted a required parameter or a charge failed), and codes in the 5xx range indicate an error related to AfterShip’s servers.

HTTP Status Codemeta.codemeta.messagemeta.details
401401UnauthorizedThe API key is invalid.
404404Not FoundThe URI requested is invalid or the resource requested does not exist.
2004104The request was invalid or cannot be otherwise served.
50050000Something went wrong on AfterShip's end. Also, some error that cannot be retried happened on an external system that this call relies on.
preparing...
preparing...