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.typeSample Error Message
401401UnauthorizedThe API key is invalid.
40040000BadRequestThe request was invalid or cannot be otherwise served.
42242200UnprocessableEntityThe request params is invaild for the server understands.
40440400NotFoundThe request path is not found in the server.
40940900ConflictHas an existing one entity on the server.
preparing...
preparing...
preparing...