Tracking

id
string

Tracking ID.

>= 1 characters
created_at
string

Tracking created date time.

>= 1 characters
updated_at
string

Date and time of the tracking last updated.

>= 1 characters
last_updated_at
string

Date and time the tracking was last updated.

tracking_number
string

Tracking number.

>= 1 characters
slug
string

Unique code of courier. Get courier here

>= 1 characters
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.

custom_fields
object

Custom fields of the tracking.

customer_name
string or null

Customer name of the tracking.

delivery_time
integer or null

Total delivery time in days.Show all...

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. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc.

destination_raw_location
string or null

Shipping address that the shipment is shipping to.

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.

emails
array[string]

Email address(es) to receive email notifications.

expected_delivery
string or null

Expected delivery date. Available format:

  • YYYY-MM-DD
  • YYYY-MM-DDTHH:MM:SS
  • YYYY-MM-DDTHH:MM:SS+TIMEZONE
>= 1 characters
note
string or null

Text field for the note.

order_id
string or null

A globally-unique identifier for the order.

order_id_path
string or null

The URL for the order in your system or store.

order_date
string or null

Date and time of the order created

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. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc.

>= 1 characters
shipment_package_count
number or null

Number of packages under the tracking.

shipment_pickup_date
string or null

Date and time the tracking was picked up.

>= 1 characters
shipment_delivery_date
string or null

Date and time the tracking was delivered.

>= 1 characters
shipment_type
string or null

The carrier service type for the shipment.

>= 1 characters
shipment_weight
number or null

Shipment weight provied by carrier.

shipment_weight_unit
string or null

Weight unit provied by carrier, either in kg or lb.

signed_by
string or null

Signed by information for delivered shipment.

smses
array[string]

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

source
string

Source of how this tracking is added.

>= 1 characters
tag
string
Allowed values:
PendingInfoReceivedInTransitOutForDeliveryAttemptFailDeliveredAvailableForPickupExceptionExpired
subtag
string

Current subtag of tracking. (See subtag definition)

>= 1 characters
subtag_message
string

Normalized tracking message. (See subtag definition)

>= 1 characters
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
tracked_count
number

Number of attempts AfterShip tracks at courier's system.

last_mile_tracking_supported
boolean

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

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

unique_token
string
deprecated

Deprecated

>= 1 characters
checkpoints
array[Checkpoint]

Array of checkpoint object describes the checkpoint information.

created_at
string

Date and time of the tracking created.

>= 1 characters
slug
string

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

>= 1 characters
checkpoint_time
string

Date and time of the checkpoint, provided by courier. Value may be:Show all...

>= 1 characters
location
string or null

Location info provided by carrier (if any)

>= 1 characters
city
string or null

City info provided by carrier (if any)

>= 1 characters
state
string or null

State info provided by carrier (if any)

>= 1 characters
zip
string or null

Location info (if any)

>= 1 characters
coordinates
array[number]

Deprecated as of March 2013

country_iso3
string or null

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

country_name
string or null

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

message
string

Checkpoint message

>= 1 characters
tag
string
Allowed values:
PendingInfoReceivedInTransitOutForDeliveryAttemptFailDeliveredAvailableForPickupExceptionExpired
subtag
string

Current subtag of checkpoint. (See subtag definition)

>= 1 characters
subtag_message
string

Normalized checkpoint message. (See subtag message definition)

>= 1 characters
raw_tag
string

Checkpoint status provided by courier (if any)

>= 1 characters
subscribed_smses
array[string]

Phone number(s) subscribed to receive sms notifications. Comma separated for multiple values

subscribed_emails
array[string]

Email address(es) subscribed to receive email notifications. Comma separated for multiple values

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.

order_promised_delivery_date
string or null

Promised delivery date of an order in YYYY-MM-DD format.

delivery_type
string or null

Shipment delivery type

  • pickup_at_store
  • pickup_at_courier
  • door_to_door
pickup_location
string or null

Shipment pickup location for receiver

pickup_note
string or null

Shipment pickup note for receiver

courier_tracking_link
string or null

Official tracking URL of the courier (if any)

>= 1 characters
first_attempted_at
string or null

date and time of the first attempt by the carrier to deliver the package to the addressee Available format:

  • YYYY-MM-DDTHH:MM:SS
  • YYYY-MM-DDTHH:MM:SS+TIMEZONE
>= 1 characters
courier_redirect_link
string

Delivery instructions (delivery date or address) can be modified by visiting the link if supported by a carrier.

>= 1 characters
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.

tracking_origin_country
string or null

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.

tracking_destination_country
string or null

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.

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.

tracking_postal_code
string or null

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.

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.

tracking_state
string or null

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.

on_time_status
string or null

Whether the tracking is delivered on time or not.

on_time_difference
number or null

The difference days of the on time.

order_tags
array[string]

The tags of the order.

aftership_estimated_delivery_date
object or null

Estimated delivery time of the shipment provided by AfterShip, indicate when the shipment should arrive. Please be noted that the whole aftership_estimated_delivery_date object will be available in February 2022.

estimated_delivery_date
string

The estimated arrival date of the shipment.

confidence_score
null or number

The reliability of the estimated delivery date based on the trend of the transit time for the similar delivery route and the carrier's delivery performance, range from 0.0 to 1.0 (Beta feature).

estimated_delivery_date_min
string

Earliest estimated delivery date of the shipment.

estimated_delivery_date_max
string

Latest estimated delivery date of the shipment.

order_number
string or null

A unique, human-readable identifier for the order.

latest_estimated_delivery
object or null

The latest estimated delivery date. May come from the carrier, AfterShip AI, or based on your custom settings. This can appear in 1 of 3 formats based on the data received.

  1. Date only: YYYY-MM-DD
  2. Date and time: YYYY-MM-DDTHH:mm:ss
  3. Date, time, and time zone: YYYY-MM-DDTHH:mm:ssZ
type
string
required

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

Allowed values:
rangespecific
Example:
range
source
string
required

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

Allowed values:
Courier EDDAI predictive EDDCustom EDD
Example:
Courier 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:
2022-01-01
datetime_max
string or null

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

Example:
2022-01-07T12:00:00
shipment_tags
array[string]

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

<= 50 items
courier_connection_id
string

The courier connection id tells which carrier account you’ve used to handle a shipment so we can track it.

>= 1 characters
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

tracking_number
string
required

Tracking number.

source
string

Source of next couriers.

Allowed values:
usersystem
Example
preparing...