Tracking

id
string

Tracking ID.

Example:
bff5a3bac79b472991a204172473a635
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
last_updated_at
string

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

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 shipments. Value is false when tag (status) is Delivered, Expired, or further updates for 30 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"}
customer_name
string or null

Customer name of the tracking.

Example:
Steve Young
transit_time
integer or null

Total transit time in days.Show all...

Example:
9
origin_country_iso3
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_iso3
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_iso3
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
emails
array[string]

Email address(es) to receive email notifications.

Example:
expected_delivery
string or null

The estimated delivery date provided by the carrier. It uses the shipment recipient’s timezone and 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-05T12: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
smses
array[string]

The phone number(s) to receive sms notifications. Phone number should begin with + and Area Code before phone number.

Example:
["+8613800138000"]
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_iso3
string or null

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

Example:
USA
country_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.
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

Additional field required by some carriers to retrieve the tracking info. The date the shipment was sent, using the format YYYYMMDD. Refer to our article on additional tracking fields for more details.

Example:
20220101
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
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
next_couriers
array[object]

The next couriers get the second carrier information from user or AfterShip.

slug
string
required

Unique code of courier. Get courier here

Example:
usps
tracking_number
string
required

Tracking number.

Example:
61293150000079650811
source
string

Source of next couriers.

Allowed values:
usersystem
Example:
system
tracking_origin_country
string or null

(Legacy) Replaced by origin_country_iso3. Additional field required by some carriers to retrieve the tracking info. The origin country/region of the shipment. Refer to our article on additional tracking fields for more details.

Example:
CHN
tracking_destination_country
string or null

(Legacy) Replaced by destination_country_iso3. Additional field required by some carriers to retrieve the tracking info. The destination country/region of the shipment. Refer to our article on additional tracking fields for more details.

Example:
USA
tracking_postal_code
string or null

(Legacy) Replaced by destination_postal_code. Additional field required by some carriers to retrieve the tracking info. The postal code of the recipient’s address. Refer to our article on additional tracking fields for more details.

Example:
90213
tracking_state
string or null

(Legacy) Replaced by destination_state. Additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on additional tracking fields for more details.

Example:
CA
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
Example
preparing...