Get a tracking by ID

get
/trackings/{id}

Get tracking results of a single tracking.

id
string
required

tracking ID

fields
string

List of fields to include in the response. Use comma for multiple values. Fields to include: destination_postal_code, tracking_ship_date, tracking_account_number, tracking_key, origin_country_region, destination_country_region, destination_state, title, order_id, tag, checkpoints

Example:
title,order_id
lang
string

Translate checkpoint messages from the carrier’s provided language to the target language. Supported target languages include:
    - English (en)
    - French (fr)
    - French Canadian (fr-CA)
    - Arabic (ar)
    - Bulgarian (bg)
    - Catalan (ca)
    - Croatian (hr)
    - Czech (cs)
    - Danish (da)
    - Dutch (nl)
    - Estonian (et)
    - Filipino (tl)
    - Finnish (fi)
    - German (de)
    - Greek (el)
    - Hebrew (he)
    - Hindi (hi)
    - Hungarian (hu)
    - Indonesian (id)
    - Italian (it)
    - Japanese (ja)
    - Korean (ko)
    - Latvian (lv)
    - Lithuanian (lt)
    - Malay (ms)
    - Polish (pl)
    - Portuguese (pt)
    - Romanian (ro)
    - Russian (ru)
    - Serbian (sr)
    - Slovak (sk)
    - Slovenian (sl)
    - Spanish (es)
    - Swedish (sv)
    - Thai (th)
    - Turkish (tr)
    - Ukrainian (uk)
    - Vietnamese (vi)
    - Simplified Chinese (zh-Hans)
    - Traditional Chinese (zh-Hant)
    - Norwegian (nb)

Example:
en
Content-Type
string
required

Content-Type

Allowed value:
application/json
Default:
application/json

Tracking object

Tracking response for returning single 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
Tracking
required

Object describes the tracking information.Show all...

id
string

A system-generated tracking ID by default, which can be customized by the user when creating a tracking.

Example:
bff5a3bac79b472991a204172473a635
Match pattern:
[0-9a-zA-Z-_]{1,128}
legacy_id
string

The length of the tracking ID has been increased from 24 characters to 32 characters. We will use the legacy_id field to store the original 24-character tracking ID to maintain compatibility with existing data. Therefore, all tracking endpoints will continue to work with the legacy_id field as before.

Example:
gngrj3vnc7toblxddgn5p02a
created_at
string

The date and time the shipment was imported or added to AfterShip. It uses the format YYYY-MM-DDTHH:mm:ssZ for the timezone GMT +0.

>= 1 characters
Example:
2023-01-18T08:47:10+00:00
updated_at
string

The date and time the shipment was updated. It uses the format YYYY-MM-DDTHH:mm:ssZ for the timezone GMT +0.

>= 1 characters
Example:
2023-01-18T17:47:10+00:00
tracking_number
string

Tracking number.

>= 1 characters
Example:
61293150000079650811
slug
string

Unique courier code. When importing a shipment with no courier slug and the tracking number can’t be recognized, the courier will be marked as unrecognized. Get courier codes here.

>= 1 characters
Example:
fedex
active
boolean

Whether or not AfterShip will continue tracking the shipment. Value is false when no further updates for a few days since last update.

Example:
false
custom_fields
object or null

Custom fields that accept an object with string field. In order to protect the privacy of your customers, do not include any personal data in custom fields.

Example:
{"store_name":"my-store"}
transit_time
integer or null

Total transit time in days.Show all...

Example:
9
origin_country_region
string or null

The ISO Alpha-3 code (3 letters) for the origin country/region. E.g. USA for the United States.

>= 1 characters
Example:
CHN
origin_state
string or null

The state of the sender’s address.

Example:
Beijing
origin_city
string or null

The city of the sender’s address.

Example:
Beijing
origin_postal_code
string or null

The postal code of the sender’s address.

Example:
065001
origin_raw_location
string or null

The sender address that the shipment is shipping from.

Example:
Lihong Gardon 4A 2301, Chaoyang District, Beijing, BJ, 065001, CHN, China
destination_country_region
string or null

The ISO Alpha-3 code (3 letters) for the destination country/region. E.g. USA for the United States.

Example:
USA
destination_state
string or null

The state of the recipient’s address.

Example:
New York
destination_city
string or null

The city of the recipient’s address.

Example:
New York City
destination_postal_code
string or null

The postal code of the recipient’s address.

Example:
10001
destination_raw_location
string or null

The shipping address that the shipment is shipping to.

Example:
13th Street, New York, NY, 10011, USA, United States
courier_destination_country_region
string or null

Destination country/region of the tracking detected from the courier. ISO Alpha-3 (three letters). Value will be null if the courier doesn't provide the destination country.

Example:
USA
courier_estimated_delivery_date
object or null

The field contains the estimated delivery date provided by the carrier.

note
string or null

Text field for the note.

Example:
note
order_id
string or null

A globally-unique identifier for the order.

Example:
6845a095a27a4caeb27487806f058add
order_id_path
string or null

The URL for the order in your system or store.

Example:
https://www.aftership.com/my-orders/6845a095a27a4caeb27487806f058add
order_date
string or null

The date and time the order was created in your system or store. It uses the format: YYYY-MM-DDTHH:mm:ssZ based on whichever timezone you provide.

Example:
2022-01-20T15:56:12+08:00
shipment_package_count
number or null

Number of packages under the tracking.

Example:
1
shipment_pickup_date
string or null

The date and time the shipment was picked up by the carrier. It uses the timezone where the pickup occured. The format may differ depending on how the carrier provides it:

  • YYYY-MM-DD
  • YYYY-MM-DDTHH:mm:ss
  • YYYY-MM-DDTHH:mm:ssZ
>= 1 characters
Example:
2022-01-21T15:00:00
shipment_delivery_date
string or null

The date and time the shipment was delivered. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:

  • YYYY-MM-DD
  • YYYY-MM-DDTHH:mm:ss
  • YYYY-MM-DDTHH:mm:ssZ
>= 1 characters
Example:
2022-01-29T11:23:00
shipment_type
string or null

The carrier service type for the shipment.

>= 1 characters
Example:
FedEx SmartPost
shipment_weight
object or null

The shipment_weight field represents the total weight of the shipment. In scenarios where the carrier does not provide this information, you can provide the weight to AfterShip. We will prioritize the data provided by the carrier, if available. The shipment weight will be included in the Response and accessed through the GET API, Webhook, and CSV export. It will also be displayed on the AfterShip Tracking admin. Additionally, it plays a significant role in error-free shipment handling and carbon emission calculations, ensuring accurate and informed decision-making

shipment_dimensions
object or null

Physical dimensions of the package (length, width and height).

signed_by
string or null

Signed by information for delivered shipment.

Example:
Steve Young
source
string

Source of how this tracking is added.

>= 1 characters
Example:
api
tag
string

Current status of tracking. (See tag definition)

Allowed values:
PendingInfoReceivedInTransitOutForDeliveryAttemptFailDeliveredAvailableForPickupExceptionExpired
Example:
Delivered
subtag
string

Current subtag of tracking. (See subtag definition)

>= 1 characters
Example:
Delivered_002
subtag_message
string

Normalized tracking message. (See subtag definition)

>= 1 characters
Example:
Picked up by customer
title
string

By default this field shows the tracking_number, but you can customize it as you wish with any info (e.g. the order number).

>= 1 characters
Example:
61293150000079650811
tracked_count
number

Number of attempts AfterShip tracks at courier's system.

Example:
13
language
string or null

The recipient’s language. If you set up AfterShip notifications in different languages, we use this to send the recipient tracking updates in their preferred language.

Example:
en
unique_token
string
deprecated

Deprecated

>= 1 characters
Example:
Deprecated
checkpoints
array[Checkpoint]

Array of checkpoint object describes the checkpoint information.

subscribed_smses
array[string]

Phone number(s) subscribed to receive sms notifications.

subscribed_emails
array[string]

Email address(es) subscribed to receive email notifications.

return_to_sender
boolean

Whether or not the shipment is returned to sender. Value is true when any of its checkpoints has subtag Exception_010 (returning to sender) or Exception_011 (returned to sender). Otherwise value is false.

Example:
false
order_promised_delivery_date
object or null

The promised delivery date of the order in shipment recipient’s timezone.

delivery_type
string or null

Shipment delivery type

  • pickup_at_store
  • pickup_at_courier
  • door_to_door
Example:
pickup_at_store
pickup_location
string or null

Shipment pickup location for receiver

Example:
13th Street, New York, NY 10011, USA, United States
pickup_note
string or null

Shipment pickup note for receiver

Example:
No notes
courier_tracking_link
string or null

Official tracking URL of the courier (if any). The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default.

>= 1 characters
Example:
https://www.fedex.com/apps/fedextrack/?tracknumbers=61293150000079650811&cntry_code=US
first_attempted_at
string or null

The date and time of the carrier’s first attempt to deliver the package to the recipient. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:

  • YYYY-MM-DDTHH:mm:ss
  • YYYY-MM-DDTHH:mm:ssZ
>= 1 characters
Example:
2022-01-01T17:00:00-05:00
courier_redirect_link
string or null

Delivery instructions (delivery date or address) can be modified by visiting the link if supported by a carrier. The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default.

>= 1 characters
Example:
https://www.fedex.com/apps/fedextrack/?action=track&tracknumbers=61293150000079650811&cntry_code=US
tracking_account_number
string or null

Additional field required by some carriers to retrieve the tracking info. The shipper’s carrier account number. Refer to our article on additional tracking fields for more details.

Example:
null
tracking_key
string or null

Additional field required by some carriers to retrieve the tracking info. A type of tracking credential required by some carriers. Refer to our article on additional tracking fields for more details.

Example:
null
tracking_ship_date
string or null

The date and time when the shipment is shipped by the merchant and ready for pickup by the carrier. The field supports the following formats:

  • YYYY-MM-DD
  • YYYY-MM-DDTHH:mm:ss
  • YYYY-MM-DDTHH:mm:ssZ

The field serves two key purposes:

  • Calculate processing time metrics in the Order-to-delivery Analytics dashboard. To ensure accurate analytics, it's recommended to include timezone information when configuring this value
  • Required by certain carriers to retrieve tracking information as an additional tracking field.
Example:
2025-01-09T02:32:11+01:00
on_time_status
string or null

Whether the tracking is delivered on time or not.

Example:
on-time
on_time_difference
number or null

The difference days of the on time.

Example:
0
order_tags
array[string]

The tags of the order.

Example:
["Exception"]
aftership_estimated_delivery_date
object or null

The estimated delivery date of the shipment provided by AfterShip’s AI and shown to the recipients. It uses the format YYYY-MM-DD based on the shipment recipient’s timezone.

custom_estimated_delivery_date
object or null

Estimated delivery time of the shipment based on your custom EDD settings. It uses the format YYYY-MM-DD based on the shipment recipient’s timezone.

order_number
string or null

A unique, human-readable identifier for the order.

Example:
162654659775
first_estimated_delivery
object or null

The shipment’s original estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:

  • YYYY-MM-DD
  • YYYY-MM-DDTHH:mm:ss
  • YYYY-MM-DDTHH:mm:ssZ

AfterShip AI and custom EDDs always use the format YYYY-MM-DD. All EDDs use the shipment recipient’s timezone.

latest_estimated_delivery
object or null

The most recently calculated estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:

  • YYYY-MM-DD
  • YYYY-MM-DDTHH:mm:ss
  • YYYY-MM-DDTHH:mm:ssZ

AfterShip AI and custom EDDs always use the format YYYY-MM-DD. All EDDs use the shipment recipient’s timezone.

shipment_tags
array[string]

Used to add tags to your shipments to help categorize and filter them easily.

<= 50 items
Example:
["Returned"]
courier_connection_id
string or null

If you have multiple accounts connected for a single carrier on AfterShip, we have introduced the courier_connection_id field to allow you to specify the carrier account associated with each shipment. By providing this information, you enable us to accurately track and monitor your shipments based on the correct carrier account.(Get your courier connection id)
In the event that you do not specify the courier_connection_id, we will handle your shipment using the connection that was created earliest among your connected accounts.

>= 1 characters
Example:
8e1261bde336436abbc7cb3eee8cd707
carbon_emissions
object or null

The model contains the total amount of carbon emissions generated by the shipment.

  • AfterShip will provide this data only when it is available, and its availability is contingent upon the location and weight information that AfterShip can obtain.
  • The values will be accessible solely for shipments that have been successfully delivered. However, in the event of a shipping update after the delivery status has been achieved, the value may change.
  • It’s a paid service and only for Tracking Enterprise users, please contact your customer success manager if you want to know more.
location_id
string or null

The location_id refers to the place where you fulfilled the items.

  • If you provide a location_id, the system will automatically use it as the tracking's origin address. However, passing both location_id and any origin address information simultaneously is not allowed.
  • Please make sure you add your locations here before passing the location_id and verify that the location's status is active. Learn more about adding locations here.
Example:
bda843ed811541fc852a8447371cf6f2
shipping_method
string or null

The shipping_method string refers to the chosen method for delivering the package. Merchants typically offer various shipping methods to consumers during the checkout process, such as, Local Delivery, Free Express Worldwide Shipping, etc.

Example:
Local Delivery
failed_delivery_attempts
integer or null

By dynamically tracking failed delivery attempts during shipment, this field allows you to pinpoint carriers accountable for the most failures. Analyzing the root cause of these failures enables you to improve carriers' delivery standard operating procedures (SOP), leading to an overall enhancement in delivery service quality.

Example:
2
signature_requirement
string

The signature_requirement field serves the purpose of validating the service option type, specifically proof of delivery. By collecting the recipient's signature upon delivery, it ensures the package reaches the intended recipient and prevents disputes related to non-delivery or lost packages.

Allowed values:
signature_requiredadult_signature_requiredindirect_signature_requiredno_signature_requirednull
Example:
signature_required
delivery_location_type
string or null

The delivery location type represents the secure area where the carrier leaves the package, such as a safe place, locker, mailbox, front porch, etc. This information helps ensure the shipment reaches the intended recipient efficiently, minimizing the risk of theft or damage.

Example:
front door, porch, front desk
aftership_tracking_url
string or null

The tracking URL directs your customers to the shipment tracking page which can display either the default or a customized page based on segmentation rules.Show all...

Example:
https://track.happytrading.com/61293150000079650811
aftership_tracking_order_url
string or null

The order URL directs your customers to the order tracking page, which includes all shipments. It can display either the default or a customized page based on segmentation rules.Show all...

Example:
https://track.happytrading.com/order-status?order-number=1001&code=eyJlbWFpbCI6InRlc3RAZXhhbXBsZS5jb20ifQ==
first_mile
object or null

The field contains information about the first leg of the shipping starting from the carrier picking up the shipment from the shipper to the point where they hand it over to the last-mile carrier. Once AfterShip detects the shipment is multi-leg, we will populate the first-mile information under this object.

last_mile
object or null

This field contains information about the last leg of the shipment, starting from the carrier who hands it over to the last-mile carrier, all the way to delivery. Once AfterShip detects that the shipment involves multiple legs and identifies the last-mile carrier, we will populate the last-mile carrier information in this object. Alternatively, the user can provide this information in this field to specify the last-mile carrier, which is helpful if AfterShip is unable to detect it automatically.

customers
array[object]

The field contains the customer information associated with the tracking. A maximum of three customer objects are allowed.

proof_of_delivery
array[object] or null

An array of proof of delivery (POD) records, such as a signature or photo captured upon successful delivery.Show all...

multi_piece_info
object or null

Multi-piece shipment refers to a scenario where a single shipment order is fulfilled by multiple physical packages. Each piece has its own carrier-assigned tracking number, but all pieces belong to the same shipment. This commonly occurs when an order is too large to fit in one box, or when items are packed separately for handling reasons.Show all...

shipment_direction
string or null

Indicates the business direction of the shipment in the e-commerce fulfillment lifecycle.Show all...

Allowed values:
forwardreturnnull
Example:
forward
return_shipment
object or null

The associated return shipment linked to the current outbound shipment.Show all...

forward_shipment
object or null

The original outbound shipment linked to this return. Use this to trace a return back to its source delivery.Show all...

Auth
:
Parameters
:
:
:
:
Response Example
{ "meta": { "code": 200 }, "data": { "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 } }