Get trackings

get
/trackings

Get tracking results of multiple trackings.

cursor
string

A string representing the cursor value for the current page of results.

Example:
WzE3MTk5OTIwMzIzNTMsImE0NWQ5NDg5ODU4NzQzMjA5YjBjYjRlZjE3ZTBjNGVhIl0=
limit
integer

Number of trackings each page contain. (Default: 100, Max: 200)

>= 1<= 200
Default:
100
Example:
100
keyword
string

Search the content of the tracking record fields: tracking_number, title, order_id, customers[x].name, custom_fields, customers[x].email, customers[x].phone_number

Example:
RA123456789US
tracking_numbers
string

Tracking number of shipments. Use comma to separate multiple values (Example: RA123456789US,LE123456789US). Supports up to 50 tracking numbers.

Example:
RA123456789US,LE123456789US
slug
string

Unique courier code Use comma for multiple values. (Example: dhl,ups,usps)

>= 1 characters
Example:
usps
Match pattern:
^[a-z0-9-]+$
transit_time
integer

Total delivery time in days.Show all...

Example:
1
origin
string

Origin country/region of trackings. Use ISO Alpha-3 (three letters). Use comma for multiple values. (Example: USA,HKG)

Example:
USA
Match pattern:
^[A-Z,]+$
destination
string

Destination country/region of trackings. Use ISO Alpha-3 (three letters). Use comma for multiple values. (Example: USA,HKG)

Example:
USA
Match pattern:
^[A-Z,]+$
tag
string

Current status of tracking. Values include Pending, InfoReceived, InTransit, OutForDelivery, AttemptFail, Delivered, AvailableForPickup, Exception, Expired (See tag definition)

Allowed values:
PendingInfoReceivedInTransitOutForDeliveryAttemptFailDeliveredAvailableForPickupExceptionExpired
Example:
InTransit
Match pattern:
^[A-Za-z]+$
created_at_min
string

Start date and time of trackings created. AfterShip only stores data of 120 days. Please make sure the value of the parameter is properly escaped in URL encoding.(Defaults: 120 days ago, Example: The escaped value of 2013-03-15T16:41:56+08:00 is 2013-03-15T16:41:56%2B08:00)

Example:
2013-03-15T16:41:56%2B08:00
Match pattern:
^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\+[0-9]{2}:[0-9]{2}$
created_at_max
string

End date and time of trackings created. Please make sure the value of the parameter is properly escaped in URL encoding.(Defaults: now, Example: The escaped value of 2013-04-15T16:41:56+08:00 is 2013-04-15T16:41:56%2B08:00)

Example:
2013-03-15T16:41:56%2B08:00
Match pattern:
^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\+[0-9]{2}:[0-9]{2}$
updated_at_min
string

Start date and time of trackings updated. Please make sure the value of the parameter is properly escaped in URL encoding.(Example: The escaped value of 2013-03-15T16:41:56+08:00 is 2013-03-15T16:41:56%2B08:00)

Example:
2013-03-15T16:41:56%2B08:00
Match pattern:
^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\+[0-9]{2}:[0-9]{2}$
updated_at_max
string

End date and time of trackings updated. Please make sure the value of the parameter is properly escaped in URL encoding.(Example: The escaped value of 2013-04-15T16:41:56+08:00 is 2013-04-15T16:41:56%2B08:00)

Example:
2013-03-15T16:41:56%2B08:00
Match pattern:
^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\+[0-9]{2}:[0-9]{2}$
fields
string

List of fields to include in the response. Use comma for multiple values. Available options: title, order_id, tag, checkpoints. Example: title,order_id

Example:
title
Match pattern:
^[a-z0-9,]+$
return_to_sender
string

Select return to sender, the value should be true or false, with optional comma separated.

Example:
true
Match pattern:
^[a-z,]+$
courier_destination_country_region
string

Destination country/region of trackings returned by courier. Use ISO Alpha-3 (three letters). Use comma for multiple values. (Example: USA,HKG)

Example:
USA
Match pattern:
^[A-Z,]+$
shipment_tags
string

Tags you added to your shipments to help categorize and filter them easily. Use a comma to separate multiple values (Example: a,b)

order_id
string

A globally-unique identifier for the order. Use comma for multiple values.(Example: 6845a095a27a4caeb27487806f058add,4845a095a27a4caeb27487806f058abc)

Example:
6845a095a27a4caeb27487806f058add
Content-Type
string
required

Content-Type

Allowed value:
application/json
Default:
application/json
Example:
application/json

Get trackings response

Tracking response for getting tracking

meta
meta
required

Meta data

code
integer
required

meta code

Example:
200
message
string

error message, only exist if the response status is not 2xx

type
string

error type, only exist if the response status is not 2xx

Allowed values:
BadRequestUnauthorizedForbiddenNotFoundTooManyRequestsInternalError
data
object
pagination
object

The Pagination holds the information for the pagination when the response contains multiple objects.

trackings
array[Tracking]
Auth
:
Parameters
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
Response Example
{ "meta": { "code": 200 }, "data": { "pagination": { "total": 2, "next_cursor": "WzE3MTk5OTIwMzIzNTMsImE0NWQ5NDg5ODU4NzQzMjA5YjBjYjRlZjE3ZTBjNGVhIl0=", "has_next_page": true }, "trackings": [ { "id": "0b02015fc7fd4f3c8d5490cece4d124d", "legacy_id": "my2uktymyz72xld1f7l3h01z", "created_at": "2023-01-18T08:47:10+00:00", "updated_at": "2023-01-18T17:47:10+00:00", "tracking_number": "61293150000079650811", "slug": "fedex", "active": false, "custom_fields": { "store_name": "my-store" }, "transit_time": 9, "origin_country_region": "CHN", "origin_state": "Beijing", "origin_city": "Beijing", "origin_postal_code": "065001", "origin_raw_location": "Lihong Gardon 4A 2301, Chaoyang District, Beijing, BJ, 065001, CHN, China", "destination_country_region": "USA", "destination_state": "New York", "destination_city": "New York City", "destination_postal_code": "10001", "destination_raw_location": "13th Street, New York, NY, 10011, USA, United States", "courier_destination_country_region": "USA", "courier_estimated_delivery_date": { "estimated_delivery_date": "2022-01-03T12:11:11+01:00", "estimated_delivery_date_min": "2022-01-02T12:11:10+01:00", "estimated_delivery_date_max": "2022-01-03T12:11:11+01:00" }, "note": "note", "order_id": "6845a095a27a4caeb27487806f058add", "order_id_path": "https://www.aftership.com/my-orders/6845a095a27a4caeb27487806f058add", "order_date": "2022-01-20T15:56:12+08:00", "shipment_package_count": 1, "shipment_pickup_date": "2022-01-21T15:00:00", "shipment_delivery_date": "2022-01-29T11:23:00", "shipment_type": "FedEx SmartPost", "shipment_weight": { "value": 0.7, "unit": "kg" }, "signed_by": "Steve Young", "customers": [ { "role": "sender", "name": "Steve Young", "phone_number": "+8613800138000", "email": "[email protected]", "language": "en", "id": "cust_12345" } ], "source": "api", "tag": "Delivered", "subtag": "Delivered_002", "subtag_message": "Picked up by customer", "title": "61293150000079650811", "tracked_count": 13, "language": "en", "checkpoints": [ { "created_at": "2023-01-18T08:47:10+00:00", "slug": "fedex", "checkpoint_time": "2022-01-01T18:47:10-05:00", "location": "13th Street, New York, NY 10011, USA, United States", "city": "New York", "state": "NY", "postal_code": "10011", "coordinate": null, "country_region": "USA", "country_region_name": "United States", "message": "Package delivered", "tag": "Delivered", "subtag": "Delivered_002", "subtag_message": "Picked up by customer", "raw_tag": "RO", "events": [ { "code": "delivered_to_neighbor", "reason": { "code": "incorrect_missing_address" } } ], "source": "carrier", "hash": "a1b2c3d4e5f6789012345678901234567890abcd" } ], "subscribed_smses": [ "string" ], "subscribed_emails": [ "string" ], "return_to_sender": false, "order_promised_delivery_date": { "promised_delivery_date": "2026-01-01", "promised_delivery_date_max": null, "promised_delivery_date_min": null }, "delivery_type": "pickup_at_store", "pickup_location": "13th Street, New York, NY 10011, USA, United States", "pickup_note": "No notes", "courier_tracking_link": "https://www.fedex.com/apps/fedextrack/?tracknumbers=61293150000079650811&cntry_code=US", "first_attempted_at": "2022-01-01T17:00:00-05:00", "courier_redirect_link": "https://www.fedex.com/apps/fedextrack/?action=track&tracknumbers=61293150000079650811&cntry_code=US", "tracking_account_number": null, "tracking_key": null, "tracking_ship_date": "20220101", "on_time_status": "on-time", "on_time_difference": 0, "order_tags": [ "Exception" ], "aftership_estimated_delivery_date": { "estimated_delivery_date": "2022-01-03", "confidence_code": 10001, "estimated_delivery_date_min": "2022-01-02", "estimated_delivery_date_max": "2022-01-04" }, "custom_estimated_delivery_date": { "type": "specific", "datetime": "2022-01-05", "datetime_min": null, "datetime_max": null }, "order_number": "162654659775", "first_estimated_delivery": { "type": "specific", "source": "Carrier EDD", "datetime": "2022-01-05T12:11:11+01:00", "datetime_min": null, "datetime_max": null }, "latest_estimated_delivery": { "type": "specific", "source": "AfterShip EDD", "datetime": "2022-01-05T12:11:11+01:00", "datetime_min": null, "datetime_max": null, "revise_reason": "extreme_weather" }, "shipment_tags": [ "Returned" ], "courier_connection_id": "8e1261bde336436abbc7cb3eee8cd707", "last_mile": { "slug": "usps", "tracking_number": "61293150000079650811", "source": "system", "courier_tracking_link": "https://www.fedex.com/apps/fedextrack/?tracknumbers=61293150000079650811&cntry_code=US", "courier_redirect_link": "https://www.fedex.com/apps/fedextrack/?action=track&tracknumbers=61293150000079650811&cntry_code=US" }, "first_mile": { "slug": "usps", "tracking_number": "61293150000079650812", "courier_tracking_link": "https://www.fedex.com/apps/fedextrack/?tracknumbers=61293150000079650812&cntry_code=US", "courier_redirect_link": "https://www.fedex.com/apps/fedextrack/?action=track&tracknumbers=61293150000079650812&cntry_code=US" }, "carbon_emissions": { "unit": "kg", "value": 0.7 }, "location_id": "bda843ed811541fc852a8447371cf6f2", "shipping_method": "Local Delivery", "failed_delivery_attempts": 2, "signature_requirement": "signature_required", "delivery_location_type": null, "aftership_tracking_url": "https://track.happytrading.com/61293150000079650811", "aftership_tracking_order_url": "https://track.happytrading.com/order-status?order-number=1001&code=eyJlbWFpbCI6InRlc3RAZXhhbXBsZS5jb20ifQ==", "shipment_dimensions": { "unit": "cm", "length": 30, "width": 20, "height": 10 }, "proof_of_delivery": [ { "type": "image", "url": "https://example.com/pod-image.jpg" } ], "multi_piece_info": { "type": "master", "pieces": [ { "tracking_id": "bff5a3bac79b472991a204172473a635", "tracking_number": "61293150000079650811", "type": "master", "trackable": true }, { "tracking_id": "c79b472991a204172473a635bff5a3ba", "tracking_number": "61293150000079650812", "type": "child", "trackable": true } ] }, "shipment_direction": "forward", "return_shipment": { "id": "a204172473a635bff5a3bac79b472991", "tracking_number": "61293150000079650813", "slug": "usps" }, "forward_shipment": null } ] } }