Shopify App

Identifying a delivery service

The list of all possible delivery services that the format of the tracking number may apply to. When a delivery service is identified, 1/5 of the package cost will be deducted from your plan's package limit. For example, if you add 5 packages with automatic delivery service identification, your plan package limit will be reduced by 6 packages: 5 packages added + 1 package for 5 automatic delivery service identifications.

Request:

GET /couriers/detect?trackNumber={trackNumber}

Required GET request parameters:

Parameter Type Description
trackNumber String package tracking number

Example of a successful response

The response will return an array of Courier objects

        
{
    "code": 200,
    "payload": [
        {
            "id": 1,
            "name": "USPS",
            "logo": "https://pkge.net/uploads/couriers/small/usps@2x.png",
            "extra_fields": [],
            "extra_fields_tip": null,
            "website_link": "https://www.usps.com",
            "slug": "usps"
        },
        {
            "id": 7,
            "name": "China Post",
            "logo": "https://pkge.net/uploads/couriers/small/china-post@2x.png",
            "extra_fields": [],
            "extra_fields_tip": null,
            "website_link": "http://english.chinapost.com.cn/",
            "slug": "china-post"
        },
        //.....
    ]
}
        
    

Error response codes

Followed by 400 HTTP status code. Possible values:

Code Description
900 Invalid tracking number format
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