Tracking

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.

estimated_delivery_date
string or null

The estimated arrival date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:

  • YYYY-MM-DD
  • YYYY-MM-DDTHH:mm:ss
  • YYYY-MM-DDTHH:mm:ssZ
Example:
2022-01-03T12:11:11+01:00
estimated_delivery_date_min
string or null

The earliest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:

  • YYYY-MM-DD
  • YYYY-MM-DDTHH:mm:ss
  • YYYY-MM-DDTHH:mm:ssZ
Example:
2022-01-02T12:11:10+01:00
estimated_delivery_date_max
string or null

The Latest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:

  • YYYY-MM-DD
  • YYYY-MM-DDTHH:mm:ss
  • YYYY-MM-DDTHH:mm:ssZ
Example:
2022-01-03T12:11:11+01:00
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

unit
string

The unit in which the value field is expressed.

Example:
kg
value
number

The total amount of shipment weight.

Example:
1.3
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
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
last_mile_tracking_supported
boolean or null

Indicates if the shipment is trackable till the final destination. Three possible values:

  • true
  • false
  • null
Example:
true
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.

created_at
string

The date and time of the checkpoint event was 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
slug
string

The unique code of courier for this checkpoint. Get courier slug here

>= 1 characters
Example:
fedex
checkpoint_time
string

The date and time of the checkpoint event, provided by the carrier. It uses the timezone of the checkpoint. 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-01T18:47:10-05:00
location
string or null

Location info provided by carrier

>= 1 characters
Example:
13th Street, New York, NY 10011, USA, United States
city
string or null

City info provided by carrier

>= 1 characters
Example:
New York
state
string or null

State info provided by carrier

>= 1 characters
Example:
NY
zip
string or null

Postal code info provided by carrier

>= 1 characters
Example:
10011
coordinate
object or null

The latitude and longitude coordinates indicate the precise location of the shipments that are currently in transit.

Example:
null
country_region
string or null

Country/Region ISO Alpha-3 (three letters) of the checkpoint

Example:
USA
country_region_name
string or null

Country/Region name of the checkpoint, may also contain other location info.

Example:
United States
message
string

Checkpoint message

>= 1 characters
Example:
Package delivered
tag
string
Allowed values:
PendingInfoReceivedInTransitOutForDeliveryAttemptFailDeliveredAvailableForPickupExceptionExpired
Example:
Delivered
subtag
string

Current subtag of checkpoint. (See subtag definition)

>= 1 characters
Example:
Delivered_002
subtag_message
string

Normalized checkpoint message. (See subtag message definition)

>= 1 characters
Example:
Picked up by customer
raw_tag
string or null

Checkpoint raw status provided by courier

>= 1 characters
Example:
RO
events
array[object]

The array provides details about specific event(s) that occurred to a shipment, such as "returned_to_sender". You can find the full list of events and reasons here (Beta Feature)

  • The events' value for the same checkpoint message is subject to change as we consistently strive to enhance the performance of this feature.
source

The source of the checkpoint, which can either be from the carrier or when the user marks the tracking as completed.

Allowed values:
carrieruser
Example:
carrier
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
string or null

The promised delivery date of the order. It uses the formats:

  • YYYY-MM-DD
  • YYYY-MM-DDTHH:mm:ss
  • YYYY-MM-DDTHH:mm:ssZ
Example:
2022-01-01
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.

estimated_delivery_date
string

The estimated arrival date of the shipment.

Example:
2022-01-03
confidence_code
number

Indicates the confidence level and associated reason for an AI EDD prediction request. For a comprehensive list of confidence codes, refer to this document.

Example:
10001
estimated_delivery_date_min
string

Earliest estimated delivery date of the shipment.

Example:
2022-01-02
estimated_delivery_date_max
string

Latest estimated delivery date of the shipment.

Example:
2022-01-04
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.

type
string

The format of the EDD. Either a single date or a date range.

Allowed values:
rangespecific
Example:
specific
datetime
string or null

The specific EDD date.

Example:
2022-01-05
datetime_min
string or null

For a date range EDD format, the date for the lower end of the range.

Example:
null
datetime_max
string or null

For a date range EDD format, the date for the upper end of the range.

Example:
null
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.

type
string

The format of the EDD. Either a single date or a date range.

Allowed values:
rangespecific
Example:
specific
source
string

The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings.

Allowed values:
Carrier EDDAfterShip EDDCustom EDDOrder EDD
Example:
Carrier EDD
datetime
string or null

The latest EDD time.

Example:
2022-01-05T12:11:11+01:00
datetime_min
string or null

For a date range EDD format, the date and time for the lower end of the range.

Example:
null
datetime_max
string or null

For a date range EDD format, the date and time for the upper end of the range.

Example:
null
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.

type
string

The format of the EDD. Either a single date or a date range.

Allowed values:
rangespecific
Example:
specific
source
string

The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings.

Allowed values:
Carrier EDDAfterShip EDDCustom EDDOrder EDD
Example:
AfterShip EDD
datetime
string or null

The latest EDD time.

Example:
2022-01-05T12:11:11+01:00
datetime_min
string or null

For a date range EDD format, the date and time for the lower end of the range.

Example:
null
datetime_max
string or null

For a date range EDD format, the date and time for the upper end of the range.

Example:
null
revise_reason
string or null

Explains the reason for a change to the latest_estimated_delivery. This string will only have a value if:

  1. The source for the latest EDD is AfterShip EDD.
  2. The reason for the change is known.

For a comprehensive list of reasons, please refer to this document.

Example:
extreme_weather
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.
unit
string
read-only

The unit in which the value field is expressed. Allowed values: kg

Example:
kg
value
number
read-only

The total amount of carbon emissions

Example:
0.7
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
read-only

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
read-only

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.

tracking_number
string

The tracking number of the first-mile carrier.

Example:
61293150000079650811
slug
string

The unique code of the carrier responsible for the first-mile of the shipment. Find all the courier slugs here.

Example:
ups
transit_time
integer or null

The transit time for the first-mile of a shipment in days. This field is calculated based on whether the handed_over_to_last_mile_carrier or received_by_last_mile_carrier event is detected by AfterShip. The handover event date is used to calculate the first-mile transit time.

  • First mile transit time (in days) = Handover date - Pickup date
Example:
1
courier_redirect_link
string or null

The field provides the link for modifying delivery instructions (such as delivery date and shipping address), if supported by the first-mile carrier. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US".

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

The field contains the official tracking URL of the first-mile carrier, if available. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US".

Example:
https://www.fedex.com/apps/fedextrack/?tracknumbers=61293150000079650811&cntry_code=US
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.

tracking_number
string

The tracking number of the last-mile carrier.

Example:
61293150000079650812
slug
string

The unique code of the carrier responsible for the last-mile of the shipment. Find all the courier slugs here.

Example:
ups
transit_time
integer or null

The transit time for the last-mile of a shipment in days. This field is calculated based on whether the handed_over_to_last_mile_carrier or the received_by_last_mile_carrier event is detected by AfterShip. The handover event date is used to calculate the last-mile transit time.

  • Last mile transit time (in days)= Delivered date - Handover date
Example:
2
courier_tracking_link
string or null

The field contains the official tracking URL of the last-mile carrier, if available. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US".

Example:
https://www.fedex.com/apps/fedextrack/?tracknumbers=61293150000079650812&cntry_code=US
courier_redirect_link
string or null

The field provides the link for modifying delivery instructions (such as delivery date and shipping address), if supported by the last-mile carrier. The language parameter of this link is determined by the destination country/region and the language associated with the shipment. If the destination country/region and language data is unavailable, AfterShip will default the language parameter to "US".

Example:
https://www.fedex.com/apps/fedextrack/?action=track&tracknumbers=61293150000079650812&cntry_code=US
source

The field indicates the source of last-mile carrier.

Allowed values:
systemuser
Example:
system
customers
array[object]

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

role
string or null

The role of the customer, indicating whether the customer is an individual or a company.

Example:
sender
name
string or null

Customer name associated with the tracking.

Example:
Steve Young
phone_number
string or null

The phone number(s) to receive SMS notifications. Phone numbers should begin with a + sign and include the area code.

Example:
+8613800138000
email
string or null

Email address(es) to receive email notifications.

language
string or null

The preferred language of the customer. If you have set up AfterShip notifications in different languages, we use this to send the tracking updates to the customer in their preferred language.

Example:
en
Example
preparing...