Tracking

id
string

Tracking ID.

>= 1 characters
Example:
my2uktymyz72xld1f7l3h01z
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

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
number or null

Shipment weight provied by carrier.

Example:
0.7
shipment_weight_unit
string or null

Weight unit provied by carrier.

Example:
kg
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. Comma separated for multiple values.

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

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
coordinates
array[number]

Deprecated as of March 2013

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
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.

Example:
false
order_promised_delivery_date
string or null

The promised delivery date of the order. It uses the format YYYY-MM-DD. This has no timezone and uses whatever date you provide.

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)

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

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

>= 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_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).

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

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

>= 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
Example
preparing...