Shopify App

API responses

All responses are given in JSON format.

Response format

Each response contains two required keys:

Key Description
code Response code (number)
payload Response content or additional information about errors after the request has been processed (object, string, or null, depending on the request and response code)

The following are examples of successful and unsuccessful responses.

Successful response

        {
    "code": 200,
    "payload: null
}
    

Error response codes

Followed by 400 HTTP status code. Possible values:

Code Description
900 Invalid tracking number format
901 Invalid delivery service ID
902 Tracking number has already been added
903 Failed to update the package. Not enough time has passed since the last update, or the package has already been delivered. Followed by the date of the next possible update in 'payload' if an update is possible
909 Failed to update the package. The maximum number of packages allowed is currently being updated. Wait for the next package to complete the update and repeat the request
910 Package update progress check requests are too frequent. Repeat the request later.
904 Failed to automatically identify the delivery service for the given tracking number
905 You've reached your plan's limit for adding packages for the billing period
400 Different error in the transmitted data. A detailed description will be sent to 'payload'

Error codes possible with HTTP status code other than 400:

Code Description
401 Invalid API key
403 Access to the requested website is denied
404 Requested website not found, or the URL is incorrect
422 Error validating data sent by POST request
429 Limit for requests per second exceeded. Read more in the 'Requests' section
500 - 504 Internal server error. The server may be under maintenance or is temporarily down.

Examples of unusual unsuccessful responses:

Error validating data sent by POST request

In 'payload', the 'errors' array with a list of names of parameters whose values were transferred with errors and descriptions of errors in them:

        {
    "code": 422,
    "payload": {
        "errors": [
             "field1": "Error description",
             "field2": "Another error description"
        ]
    }
}
    

Errors with codes 900 - 905

In 'payload', the text with the error desciption:

        {
    "code": 902,
    "payload": "Package with the specified tracking number has already been added"
}