Delete a tracking.
tracking ID
Content-Type
Delete tracking
Tracking response for returning single tracking
Meta data
meta code
error message, only exist if the response status is not 2xx
error type, only exist if the response status is not 2xx
Object describes the tracking information.Show all...
A system-generated tracking ID by default, which can be customized by the user when creating a tracking.
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.
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.
The date and time the shipment was updated. It uses the format YYYY-MM-DDTHH:mm:ssZ for the timezone GMT +0.
Tracking number.
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.
Whether or not AfterShip will continue tracking the shipment. Value is false when no further updates for a few days since last update.
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.
The ISO Alpha-3 code (3 letters) for the origin country/region. E.g. USA for the United States.
The state of the sender’s address.
The city of the sender’s address.
The postal code of the sender’s address.
The sender address that the shipment is shipping from.
The ISO Alpha-3 code (3 letters) for the destination country/region. E.g. USA for the United States.
The state of the recipient’s address.
The city of the recipient’s address.
The postal code of the recipient’s address.
The shipping address that the shipment is shipping to.
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.
The field contains the estimated delivery date provided by the carrier.
Text field for the note.
A globally-unique identifier for the order.
The URL for the order in your system or store.
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.
Number of packages under the tracking.
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:
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:
The carrier service type for the shipment.
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
Physical dimensions of the package (length, width and height).
Signed by information for delivered shipment.
Source of how this tracking is added.
Current status of tracking. (See tag definition)
Normalized tracking message. (See subtag definition)
By default this field shows the tracking_number, but you can customize it as you wish with any info (e.g. the order number).
Number of attempts AfterShip tracks at courier's system.
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.
Deprecated
Array of checkpoint object describes the checkpoint information.
Phone number(s) subscribed to receive sms notifications.
Email address(es) subscribed to receive email notifications.
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.
The promised delivery date of the order in shipment recipient’s timezone.
Shipment delivery type
Shipment pickup location for receiver
Shipment pickup note for receiver
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.
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:
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.
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.
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.
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:
The field serves two key purposes:
Whether the tracking is delivered on time or not.
The difference days of the on time.
The tags of the order.
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 time of the shipment based on your custom EDD settings. It uses the format YYYY-MM-DD based on the shipment recipient’s timezone.
A unique, human-readable identifier for the order.
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:
AfterShip AI and custom EDDs always use the format YYYY-MM-DD. All EDDs use the shipment recipient’s timezone.
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:
AfterShip AI and custom EDDs always use the format YYYY-MM-DD. All EDDs use the shipment recipient’s timezone.
Used to add tags to your shipments to help categorize and filter them easily.
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.
The model contains the total amount of carbon emissions generated by the shipment.
The location_id refers to the place where you fulfilled the items.
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.
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.
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.
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.
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...
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...
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.
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.
The field contains the customer information associated with the tracking. A maximum of three customer objects are allowed.
An array of proof of delivery (POD) records, such as a signature or photo captured upon successful delivery.Show all...
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...
Indicates the business direction of the shipment in the e-commerce fulfillment lifecycle.Show all...
The associated return shipment linked to the current outbound shipment.Show all...
The original outbound shipment linked to this return. Use this to trace a return back to its source delivery.Show all...
{ "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 } }