Request Errors

In case of API request errors, AfterShip employs standard HTTP response codes within the 4XX and 5XX ranges to specify the reason for the error. These error codes are detailed in the response body.

Typically, codes in the 2XX range indicate successful requests, codes in the 4XX range indicate errors caused by client-side input (e.g., missing a required parameter or a failed charge), and codes in the 5XX range indicate server-side issues on AfterShip’s end.

HTTP Status Codemeta.codemeta.typeSample Error Message
40040000BadRequestInvalid JSON.
40040001MissingParameterRequired parameters is missed.
401401UnauthorizedThe API key is invalid.
40340300ForbiddenThe request is understood, but it has been refused or access is not allowed.
40340301ForbiddenThe data in this store is read-only. You cannot create or modify data through the Commerce API.
40440400NotFoundThe requested URI is invalid or the specified resource does not exist.
40940900ConflictThere is a conflict with another request, possibly due to the use of the same idempotent key.
41241201PreconditionFailedThe as-store-id or date header has an empty value.
41241202PreconditionFailedThe connection could not be found.
41241203PreconditionFailedA private connected app needs to configure which AfterShip product can access your data.
41241204PreconditionFailedThe store could not be found.
42242200UnprocessableEntityThe request body is well-formed but contains semantic errors. Please review the response body for more details on these errors.
42942900TooManyRequestsThe request was not accepted because the application has exceeded the rate limit. The default API call limit is 10 requests per second.
50050000InternalErrorSomething went wrong on AfterShip's end, and an unrecoverable error occurred on an external system that this call relies on.
preparing...