{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/aftership/main/json-schema/aftership-tracking-response-get-multiple-v1-schema.json", "title": "Tracking response for get trackings", "description": "Tracking response for getting tracking", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/aftership-tracking-api-openapi.yml#/components/schemas/Tracking_response_get_multiple.v1", "type": "object", "required": [ "meta" ], "properties": { "meta": { "$ref": "#/$defs/Meta.v1" }, "data": { "type": "object", "properties": { "pagination": { "type": "object", "description": "The Pagination holds the information for the pagination when the response contains multiple objects.", "x-stoplight": { "id": "br2w36rzkm6jc" }, "properties": { "total": { "type": "integer", "x-stoplight": { "id": "zxfmih684rjbd" }, "description": "The total number of trackings." }, "next_cursor": { "type": "string", "x-stoplight": { "id": "myfrcvk07kece" }, "description": "A string representing the cursor value for the next page of results." }, "has_next_page": { "type": "boolean", "x-stoplight": { "id": "zmeas9mpkz2ds" }, "description": "To indicate if next page is available." } } }, "trackings": { "description": "Array of [tracking object](../../model/resource/tracking.json)", "type": "array", "items": { "$ref": "#/$defs/Tracking", "x-stoplight": { "id": "tdehjrjz0yj1s" } } } } } }, "$defs": { "Checkpoint": { "x-stoplight": { "id": "ag7g0fudz5euk" }, "title": "Checkpoint", "type": "object", "description": "Object describes checkpoint information.\n\n
", "x-tags": [ "Resource" ], "properties": { "created_at": { "type": "string", "minLength": 1, "description": "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.", "x-stoplight": { "id": "zu8czui1spi5j" } }, "slug": { "type": "string", "minLength": 1, "description": "The unique code of courier for this checkpoint. Get courier slug [here](../../reference/api.json/paths/~1couriers/get)", "x-stoplight": { "id": "4owl79ms8d3u9" } }, "checkpoint_time": { "type": "string", "minLength": 1, "description": "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:\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ", "x-stoplight": { "id": "9awzp75k9febs" } }, "location": { "type": [ "string", "null" ], "minLength": 1, "description": "Location info provided by carrier", "x-stoplight": { "id": "u93y11ihmeov8" } }, "city": { "type": [ "string", "null" ], "minLength": 1, "description": "City info provided by carrier", "x-stoplight": { "id": "fabvm8mmikdej" } }, "state": { "type": [ "string", "null" ], "minLength": 1, "description": "State info provided by carrier", "x-stoplight": { "id": "1v0inuoj4e74y" } }, "postal_code": { "type": [ "string", "null" ], "minLength": 1, "description": "Postal code info provided by carrier", "x-stoplight": { "id": "pf7bhy5eyojon" } }, "coordinate": { "type": [ "object", "null" ], "description": "The latitude and longitude coordinates indicate the precise location of the shipments that are currently in transit.", "x-stoplight": { "id": "zum7wa9pis108" }, "properties": { "latitude": { "type": "number", "x-stoplight": { "id": "g76n61cbre4zl" }, "description": "Represents the latitude.", "readOnly": true }, "longitude": { "type": "number", "x-stoplight": { "id": "snidkwtd2epur" }, "description": "Represents the longitude.", "readOnly": true } } }, "country_region": { "type": [ "string", "null" ], "description": "Country/Region ISO Alpha-3 (three letters) of the checkpoint", "x-stoplight": { "id": "j5fqociyv0ljk" } }, "country_region_name": { "type": [ "string", "null" ], "description": "Country/Region name of the checkpoint, may also contain other location info.", "x-stoplight": { "id": "gsg0p1qckju58" } }, "message": { "type": "string", "minLength": 1, "description": "Checkpoint message", "x-stoplight": { "id": "cznxhuyp14g5q" } }, "tag": { "$ref": "#/$defs/Tag.v1", "x-stoplight": { "id": "l0bsiywldok3r" } }, "subtag": { "type": "string", "minLength": 1, "description": "Current subtag of checkpoint. ([See subtag definition](../../docs/enum/delivery_sub_statuses.md))", "x-stoplight": { "id": "7w23827daymn0" } }, "subtag_message": { "type": "string", "minLength": 1, "description": "Normalized checkpoint message. ([See subtag message definition](../../docs/enum/delivery_sub_statuses.md))", "x-stoplight": { "id": "gtmk5cuw7wtwb" } }, "raw_tag": { "type": [ "string", "null" ], "minLength": 1, "description": "Checkpoint raw status provided by courier", "x-stoplight": { "id": "9hl14tav56q2k" } }, "events": { "type": "array", "x-stoplight": { "id": "yaarhzzr9lwlb" }, "description": "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](../../docs/enum/events.md#events) (Beta Feature)\n- The events' value for the same checkpoint message is subject to change as we consistently strive to enhance the performance of this feature.", "items": { "type": "object", "properties": { "code": { "type": "string", "x-stoplight": { "id": "ga8y1l7lzhe0n" }, "description": "Represents the event code." }, "reason": { "type": [ "object", "null" ], "x-stoplight": { "id": "d19xczf0ux5qf" }, "description": "Describes the specific reason that led to the event.", "properties": { "code": { "type": "string", "x-stoplight": { "id": "cttlv8n2ojzes" }, "description": "The code of the reason. " } } } } } }, "source": { "x-stoplight": { "id": "2tkhtf7zk4pwk" }, "description": "The source of the checkpoint, which can either be from the carrier or when the user marks the tracking as completed.", "enum": [ "carrier", "user" ] }, "hash": { "type": "string", "x-stoplight": { "id": "bu7ulg24vi728" }, "description": "Unique hash identifier for each checkpoint event, could be used for deduplication.", "readOnly": true } } }, "Meta.v1": { "title": "meta", "type": "object", "description": "Meta data", "required": [ "code" ], "properties": { "code": { "type": "integer", "description": "meta code" }, "message": { "type": "string", "description": "error message, only exist if the response status is not 2xx" }, "type": { "type": "string", "enum": [ "BadRequest", "Unauthorized", "Forbidden", "NotFound", "TooManyRequests", "InternalError" ], "description": "error type, only exist if the response status is not 2xx" } } }, "Tag.v1": { "x-stoplight": { "id": "zcw4ttoz76bsj" }, "type": "string", "title": "tag", "enum": [ "Pending", "InfoReceived", "InTransit", "OutForDelivery", "AttemptFail", "Delivered", "AvailableForPickup", "Exception", "Expired" ], "description": "Current status of tracking. ([See tag definition](../../docs/enum/delivery_statuses.md))" }, "Tracking": { "description": "Object describes the tracking information.\n\n", "x-stoplight": { "id": "85e38d6ce6521" }, "type": "object", "title": "Tracking", "x-tags": [ "Resource" ], "properties": { "id": { "type": "string", "description": "A system-generated tracking ID by default, which can be customized by the user when creating a tracking.\n", "x-stoplight": { "id": "cxja2lu8zfupm" }, "pattern": "[0-9a-zA-Z-_]{1,128}" }, "legacy_id": { "type": "string", "x-stoplight": { "id": "7r0ag0tqoaa1l" }, "description": "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." }, "created_at": { "type": "string", "minLength": 1, "description": "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.", "x-stoplight": { "id": "mdam4rz03101q" } }, "updated_at": { "type": "string", "minLength": 1, "description": "The date and time the shipment was updated. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0.", "x-stoplight": { "id": "mdtq9vt7cln4z" } }, "tracking_number": { "type": "string", "minLength": 1, "description": "Tracking number.", "x-stoplight": { "id": "oqhmkeml2dqas" } }, "slug": { "type": "string", "minLength": 1, "description": "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](https://www.aftership.com/docs/tracking/others/supported-couriers).", "x-stoplight": { "id": "5k6b1k0td71d2" } }, "active": { "type": "boolean", "description": "Whether or not AfterShip will continue tracking the shipment. Value is false when no further updates for a few days since last update.", "x-stoplight": { "id": "zlxzpdlsudlup" } }, "custom_fields": { "type": [ "object", "null" ], "description": "Custom fields that accept an object with string field. In order to protect the privacy of your customers, do not include any [personal data](https://www.aftership.com/legal/dpa#:~:text=Personal%20Data%20means,that%20natural%20person) in custom fields.", "x-stoplight": { "id": "hc8c5xstqkevs" }, "additionalProperties": { "type": "string", "x-stoplight": { "id": "ivboi1s75tc09" } } }, "transit_time": { "type": [ "integer", "null" ], "description": "Total transit time in days.\n\n- For delivered shipments: Transit time (in days) = Delivered date - Pick-up date\n- For undelivered shipments: Transit time (in days) = Current date - Pick-up date\n\nValue as `null` for the shipment without pick-up date.", "x-stoplight": { "id": "3edc9tvm5xice" } }, "origin_country_region": { "type": [ "string", "null" ], "minLength": 1, "description": "The [ISO Alpha-3](https://support.aftership.com/en/article/iso3-country-code-rlpi07/) code (3 letters) for the origin country/region. E.g. USA for the United States.", "x-stoplight": { "id": "lg4bgkpqich9d" } }, "origin_state": { "type": [ "string", "null" ], "description": "The state of the sender’s address.", "x-stoplight": { "id": "gfszuw9f9bsb1" } }, "origin_city": { "type": [ "string", "null" ], "description": "The city of the sender’s address.", "x-stoplight": { "id": "47c70cejlgh6k" } }, "origin_postal_code": { "type": [ "string", "null" ], "description": "The postal code of the sender’s address.", "x-stoplight": { "id": "tifkzldeihitn" } }, "origin_raw_location": { "type": [ "string", "null" ], "description": "The sender address that the shipment is shipping from.", "x-stoplight": { "id": "aaptwiqo10vwv" } }, "destination_country_region": { "type": [ "string", "null" ], "description": "The [ISO Alpha-3](https://support.aftership.com/en/article/iso3-country-code-rlpi07/) code (3 letters) for the destination country/region. E.g. USA for the United States.", "x-stoplight": { "id": "w36bba5uszpu5" } }, "destination_state": { "type": [ "string", "null" ], "description": "The state of the recipient’s address.", "x-stoplight": { "id": "pgb8c9dqxvpxm" } }, "destination_city": { "type": [ "string", "null" ], "description": "The city of the recipient’s address.", "x-stoplight": { "id": "1vq30jhzrh2jq" } }, "destination_postal_code": { "type": [ "string", "null" ], "description": "The postal code of the recipient’s address.", "x-stoplight": { "id": "erlb4rvw3in9k" } }, "destination_raw_location": { "type": [ "string", "null" ], "description": "The shipping address that the shipment is shipping to.", "x-stoplight": { "id": "w50z2discs59u" } }, "courier_destination_country_region": { "type": [ "string", "null" ], "description": "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.", "x-stoplight": { "id": "lqezfz5kkst9u" } }, "courier_estimated_delivery_date": { "description": "The field contains the estimated delivery date provided by the carrier.", "x-stoplight": { "id": "kg1to2qu44j2a" }, "type": [ "object", "null" ], "properties": { "estimated_delivery_date": { "type": [ "string", "null" ], "x-stoplight": { "id": "mpmyano2sxclg" }, "description": "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:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ" }, "estimated_delivery_date_min": { "type": [ "string", "null" ], "x-stoplight": { "id": "9r41arlc85sjm" }, "description": "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:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ" }, "estimated_delivery_date_max": { "type": [ "string", "null" ], "x-stoplight": { "id": "qy1qm46vuapor" }, "description": "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:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ" } } }, "note": { "type": [ "string", "null" ], "description": "Text field for the note.", "x-stoplight": { "id": "p6jf151eq3tph" } }, "order_id": { "type": [ "string", "null" ], "description": "A globally-unique identifier for the order.", "x-stoplight": { "id": "8dmmcvb0udi7g" } }, "order_id_path": { "type": [ "string", "null" ], "description": "The URL for the order in your system or store.", "x-stoplight": { "id": "z7ond9zx1dmhc" } }, "order_date": { "type": [ "string", "null" ], "description": "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.", "x-stoplight": { "id": "idtthxq18dkxq" } }, "shipment_package_count": { "type": [ "number", "null" ], "description": "Number of packages under the tracking.", "x-stoplight": { "id": "hdjjl0d9uouqx" } }, "shipment_pickup_date": { "type": [ "string", "null" ], "minLength": 1, "description": "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:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ", "x-stoplight": { "id": "vin3rqt104uij" } }, "shipment_delivery_date": { "type": [ "string", "null" ], "minLength": 1, "description": "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:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ", "x-stoplight": { "id": "pq7hqb96dq6gz" } }, "shipment_type": { "type": [ "string", "null" ], "minLength": 1, "description": "The carrier service type for the shipment.", "x-stoplight": { "id": "7aw6mydlwk3qk" } }, "shipment_weight": { "type": [ "object", "null" ], "description": "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", "x-stoplight": { "id": "jyj21fo6q7oub" }, "properties": { "unit": { "type": "string", "x-stoplight": { "id": "6dz3wdq28kt0s" }, "description": "The unit in which the value field is expressed." }, "value": { "type": "number", "x-stoplight": { "id": "m2r4qiavxyf6c" }, "description": "The total amount of shipment weight." } } }, "shipment_dimensions": { "type": [ "object", "null" ], "x-stoplight": { "id": "4si68jb6q1h2j" }, "description": "Physical dimensions of the package (length, width and height).", "readOnly": true, "properties": { "unit": { "type": "string", "x-stoplight": { "id": "40nwrbtlde4wf" }, "description": "The unit in which the dimension values are expressed. Allowed values: cm, in" }, "length": { "type": "number", "x-stoplight": { "id": "533abytqbg9ap" }, "description": "The length of the shipment package." }, "width": { "type": "number", "x-stoplight": { "id": "fw6ajmp7diqj5" }, "description": "The width of the shipment package." }, "height": { "type": "number", "x-stoplight": { "id": "u68r7q0tdn13y" }, "description": "The height of the shipment package." } } }, "signed_by": { "type": [ "string", "null" ], "description": "Signed by information for delivered shipment.", "x-stoplight": { "id": "ou55pbuyi9c8s" } }, "source": { "type": "string", "minLength": 1, "description": "Source of how this tracking is added.", "x-stoplight": { "id": "gqhhejuq7enqw" } }, "tag": { "$ref": "#/$defs/Tag.v1", "x-stoplight": { "id": "zcw4ttoz76bsj" } }, "subtag": { "type": "string", "minLength": 1, "description": "Current subtag of tracking. ([See subtag definition](../../docs/enum/delivery_sub_statuses.md))", "x-stoplight": { "id": "ues79yoiwdb9c" } }, "subtag_message": { "type": "string", "minLength": 1, "description": "Normalized tracking message. ([See subtag definition](../../docs/enum/delivery_sub_statuses.md))", "x-stoplight": { "id": "o7f0hujvn0vk1" } }, "title": { "type": "string", "minLength": 1, "description": "By default this field shows the `tracking_number`, but you can customize it as you wish with any info (e.g. the order number).", "x-stoplight": { "id": "7hrsb1c469748" } }, "tracked_count": { "type": "number", "description": "Number of attempts AfterShip tracks at courier's system.", "x-stoplight": { "id": "kiavnm2cxtem7" } }, "language": { "description": "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.", "type": [ "string", "null" ], "x-stoplight": { "id": "101i7f37z5gae" } }, "unique_token": { "type": "string", "minLength": 1, "deprecated": true, "description": "Deprecated", "x-stoplight": { "id": "pfwgk0hm16h0o" } }, "checkpoints": { "type": "array", "description": "Array of checkpoint object describes the checkpoint information.", "x-stoplight": { "id": "fls5bqyjffakv" }, "items": { "$ref": "#/$defs/Checkpoint", "x-stoplight": { "id": "ag7g0fudz5euk" } } }, "subscribed_smses": { "type": "array", "description": "Phone number(s) subscribed to receive sms notifications.", "x-stoplight": { "id": "9gakdu0fdg1cr" }, "items": { "type": "string", "x-stoplight": { "id": "xb7fnk65qo1ke" } } }, "subscribed_emails": { "type": "array", "description": "Email address(es) subscribed to receive email notifications.", "x-stoplight": { "id": "6byp7z9gjzl74" }, "items": { "type": "string", "x-stoplight": { "id": "nohm024901rw1" } } }, "return_to_sender": { "type": "boolean", "description": "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`.", "x-stoplight": { "id": "dc058629cok6i" } }, "order_promised_delivery_date": { "type": [ "object", "null" ], "description": "The promised delivery date of the order in shipment recipient’s timezone.", "x-stoplight": { "id": "mcalgi7v11ckk" }, "properties": { "promised_delivery_date": { "type": [ "string", "null" ], "x-stoplight": { "id": "8znaiva1jye3g" }, "description": "The promised delivery date of the order. \nIt uses the formats:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ" }, "promised_delivery_date_min": { "type": [ "string", "null" ], "x-stoplight": { "id": "zrgm5kz68crqs" }, "description": "Earliest promised delivery date of the order. \nIt uses the formats:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ" }, "promised_delivery_date_max": { "type": [ "string", "null" ], "x-stoplight": { "id": "etbf5ct2yzs05" }, "description": "Latest promised delivery date of the order. \nIt uses the formats:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ" } } }, "delivery_type": { "type": [ "string", "null" ], "description": "Shipment delivery type\n- pickup_at_store\n- pickup_at_courier\n- door_to_door", "x-stoplight": { "id": "34eh2pxqk7bpg" } }, "pickup_location": { "type": [ "string", "null" ], "description": "Shipment pickup location for receiver", "x-stoplight": { "id": "o8630dpp5s4t7" } }, "pickup_note": { "type": [ "string", "null" ], "description": "Shipment pickup note for receiver", "x-stoplight": { "id": "znsxb6xypmv2t" } }, "courier_tracking_link": { "type": [ "string", "null" ], "minLength": 1, "description": "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.", "x-stoplight": { "id": "n6roi7zoka82f" } }, "first_attempted_at": { "type": [ "string", "null" ], "minLength": 1, "description": "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:\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ", "x-stoplight": { "id": "1nl6r2ptiz2ux" } }, "courier_redirect_link": { "type": [ "string", "null" ], "minLength": 1, "description": "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.", "x-stoplight": { "id": "l9wvmlbfpq9m5" } }, "tracking_account_number": { "type": [ "string", "null" ], "description": "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](../../docs/enum/additional_tracking_fields.md) for more details.", "x-stoplight": { "id": "a9bqpoefesxpz" } }, "tracking_key": { "type": [ "string", "null" ], "description": "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](../../docs/enum/additional_tracking_fields.md) for more details.", "x-stoplight": { "id": "cmjbmic75y8ow" } }, "tracking_ship_date": { "type": [ "string", "null" ], "description": "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:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ\nThe field serves two key purposes:\n- 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\n- Required by certain carriers to retrieve tracking information as an additional tracking field.\n", "x-stoplight": { "id": "cf3kar40tbf5k" } }, "on_time_status": { "type": [ "string", "null" ], "description": "Whether the tracking is delivered on time or not.", "x-stoplight": { "id": "yyf8idqnwbv9s" } }, "on_time_difference": { "type": [ "number", "null" ], "description": "The difference days of the on time.", "x-stoplight": { "id": "i9kfgjee8guk0" } }, "order_tags": { "type": "array", "description": "The tags of the order.", "x-stoplight": { "id": "q9qbc7g33rrr1" }, "items": { "type": "string", "x-stoplight": { "id": "b3mmq7w881xjs" } } }, "aftership_estimated_delivery_date": { "type": [ "object", "null" ], "description": "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.", "x-stoplight": { "id": "aem0yqpi17b5u" }, "properties": { "estimated_delivery_date": { "type": "string", "description": "The estimated arrival date of the shipment.", "x-stoplight": { "id": "mgqspjtuwt6ym" } }, "confidence_code": { "type": "number", "x-stoplight": { "id": "vvl3hdd9lyvnk" }, "description": "Indicates the confidence level and associated reason for an AI EDD prediction request. For a comprehensive list of confidence codes, refer to [this document](../../docs/enum/confidence_codes.md#confidence-codes)." }, "estimated_delivery_date_min": { "type": "string", "description": "Earliest estimated delivery date of the shipment.", "x-stoplight": { "id": "r7i1fnrmsh4n6" } }, "estimated_delivery_date_max": { "type": "string", "description": "Latest estimated delivery date of the shipment.", "x-stoplight": { "id": "51nf99logjukp" } } } }, "custom_estimated_delivery_date": { "type": [ "object", "null" ], "description": "Estimated delivery time of the shipment based on your [custom EDD settings](https://admin.aftership.com/settings/promised-delivery-date). It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone.", "x-stoplight": { "id": "q9x8ooe0g2upf" }, "properties": { "type": { "type": "string", "enum": [ "range", "specific" ], "description": "The format of the EDD. Either a single date or a date range.", "x-stoplight": { "id": "6n5pk0tkn40af" } }, "datetime": { "type": [ "string", "null" ], "description": "The specific EDD date.", "x-stoplight": { "id": "kmc7zhvwvqp7c" } }, "datetime_min": { "type": [ "string", "null" ], "description": "For a date range EDD format, the date for the lower end of the range.", "x-stoplight": { "id": "gq9jwjhf2x5f6" } }, "datetime_max": { "type": [ "string", "null" ], "description": "For a date range EDD format, the date for the upper end of the range.", "x-stoplight": { "id": "mdgm5eo1pkf5h" } } } }, "order_number": { "type": [ "string", "null" ], "description": "A unique, human-readable identifier for the order.", "x-stoplight": { "id": "7o48lnihq94l3" } }, "first_estimated_delivery": { "type": [ "object", "null" ], "description": "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:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ\n AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone.", "x-stoplight": { "id": "hh6ao95ap2hf3" }, "properties": { "type": { "type": "string", "enum": [ "range", "specific" ], "description": "The format of the EDD. Either a single date or a date range.", "x-stoplight": { "id": "zi9cqxlbjdpmr" } }, "source": { "type": "string", "description": "The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings.", "enum": [ "Carrier EDD", "AfterShip EDD", "Custom EDD", "Order EDD" ], "x-stoplight": { "id": "tytlfua2ewngl" } }, "datetime": { "type": [ "string", "null" ], "description": "The latest EDD time.", "x-stoplight": { "id": "z0f7c7fy4lk9f" } }, "datetime_min": { "type": [ "string", "null" ], "description": "For a date range EDD format, the date and time for the lower end of the range.", "x-stoplight": { "id": "y16dc2h9yw7yb" } }, "datetime_max": { "type": [ "string", "null" ], "description": "For a date range EDD format, the date and time for the upper end of the range.", "x-stoplight": { "id": "ie29bqqkbdeml" } } } }, "latest_estimated_delivery": { "type": [ "object", "null" ], "description": "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:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ\n AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone.", "x-stoplight": { "id": "c8b1s1h74aa3l" }, "properties": { "type": { "type": "string", "enum": [ "range", "specific" ], "description": "The format of the EDD. Either a single date or a date range.", "x-stoplight": { "id": "nsdx4v7ky9wm4" } }, "source": { "type": "string", "description": "The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings.", "enum": [ "Carrier EDD", "AfterShip EDD", "Custom EDD", "Order EDD" ], "x-stoplight": { "id": "43og381lh3igs" } }, "datetime": { "type": [ "string", "null" ], "description": "The latest EDD time.", "x-stoplight": { "id": "0mtzl11ixh6bb" } }, "datetime_min": { "type": [ "string", "null" ], "description": "For a date range EDD format, the date and time for the lower end of the range.", "x-stoplight": { "id": "b16ab78y852zq" } }, "datetime_max": { "type": [ "string", "null" ], "description": "For a date range EDD format, the date and time for the upper end of the range.", "x-stoplight": { "id": "zyrjpftzihizd" } }, "revise_reason": { "type": [ "string", "null" ], "x-stoplight": { "id": "au8i5eudb392u" }, "description": "Explains the reason for a change to the latest_estimated_delivery. This string will only have a value if:\n1. The source for the latest EDD is AfterShip EDD. \n2. The reason for the change is known.\nFor a comprehensive list of reasons, please refer to [this document](../../docs/enum/edd_revise_reasons.md#).\n" } } }, "shipment_tags": { "type": "array", "description": "Used to add tags to your shipments to help categorize and filter them easily.", "maxItems": 50, "x-stoplight": { "id": "n2hz9edtocz8x" }, "items": { "type": "string", "maxLength": 32, "x-stoplight": { "id": "klv3uvgsscjfn" } } }, "courier_connection_id": { "type": [ "string", "null" ], "description": "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](https://admin.aftership.com/carrier-connection))\nIn 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.", "minLength": 1, "x-stoplight": { "id": "8hpi8gf24thl8" } }, "carbon_emissions": { "type": [ "object", "null" ], "x-stoplight": { "id": "v5uie75c3kray" }, "description": "The model contains the total amount of carbon emissions generated by the shipment. \n- 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.\n- 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.\n- It’s a paid service and only for Tracking Enterprise users, please contact your customer success manager if you want to know more.", "properties": { "unit": { "type": "string", "x-stoplight": { "id": "a28ex68lfv4of" }, "description": "The unit in which the value field is expressed. Allowed values: kg", "readOnly": true }, "value": { "type": "number", "x-stoplight": { "id": "cpr55pp7pm3q8" }, "description": "The total amount of carbon emissions", "readOnly": true } } }, "location_id": { "type": [ "string", "null" ], "x-stoplight": { "id": "ydzbctpgbxw53" }, "description": "The location_id refers to the place where you fulfilled the items. \n - 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.\n- Please make sure you add your locations [here](https://admin.aftership.com/settings/locations-and-rules) before passing the location_id and verify that the location's status is active. Learn more about adding locations [here](https://support.aftership.com/en/article/manage-ship-from-locations-via-aftership-tracking-okbhj4/?bust=1702871142396)." }, "shipping_method": { "type": [ "string", "null" ], "x-stoplight": { "id": "pkxdj6w6z0pey" }, "description": "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." }, "failed_delivery_attempts": { "type": [ "integer", "null" ], "x-stoplight": { "id": "96wldsihcjrgz" }, "description": "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.", "readOnly": true }, "signature_requirement": { "x-stoplight": { "id": "38r19tj09ns5d" }, "description": "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.", "enum": [ "signature_required", "adult_signature_required", "indirect_signature_required", "no_signature_required", null ], "type": "string", "readOnly": true }, "delivery_location_type": { "type": [ "string", "null" ], "x-stoplight": { "id": "a5n0jegg7gg62" }, "description": "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." }, "aftership_tracking_url": { "type": [ "string", "null" ], "x-stoplight": { "id": "teda2suewrgzd" }, "description": "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.\n\n- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain [here](https://support.aftership.com/en/article/set-up-a-custom-domain-for-the-branded-tracking-page-gow8in/).\n- If you connect to a Shopify store and enable the \"Redirect customers to your proxy URL from notification\" option, the proxy URL will be displayed. You can find more details [here](https://support.aftership.com/en/article/learn-more-about-tracking-page-embedding-using-proxy-url-10ia283/#4-redirect-customers-to-proxy-url).\n\nThe field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it.\n" }, "aftership_tracking_order_url": { "type": [ "string", "null" ], "x-stoplight": { "id": "mp3rlequ9kt9b" }, "description": "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.\n\n- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain [here](https://support.aftership.com/en/article/set-up-a-custom-domain-for-the-branded-tracking-page-gow8in/).\n- If you connect to a Shopify store and enable the \"Redirect customers to your proxy URL from notification\" option, the proxy URL will be displayed. You can find more details [here](https://support.aftership.com/en/article/learn-more-about-tracking-page-embedding-using-proxy-url-10ia283/#4-redirect-customers-to-proxy-url).\n\nThe field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it.\n" }, "first_mile": { "type": [ "object", "null" ], "x-stoplight": { "id": "obtfqg7dlrsbi" }, "description": "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. ", "properties": { "tracking_number": { "type": "string", "x-stoplight": { "id": "8f35y6earlf70" }, "description": "The tracking number of the first-mile carrier." }, "slug": { "type": "string", "x-stoplight": { "id": "xm3e5edjqwjqb" }, "description": "The unique code of the carrier responsible for the first-mile of the shipment. Find all the courier slugs [here](https://www.aftership.com/docs/tracking/others/supported-couriers)." }, "transit_time": { "type": [ "integer", "null" ], "x-stoplight": { "id": "9no03hz8wfcfg" }, "description": "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.\n- First mile transit time (in days) = Handover date - Pickup date \n" }, "courier_redirect_link": { "type": [ "string", "null" ], "x-stoplight": { "id": "3nfmoplnomr54" }, "description": "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\"." }, "courier_tracking_link": { "type": [ "string", "null" ], "x-stoplight": { "id": "0rsg72y2xurjv" }, "description": "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\"." } } }, "last_mile": { "type": [ "object", "null" ], "x-stoplight": { "id": "ybb09aupz5zlv" }, "description": "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.", "properties": { "tracking_number": { "type": "string", "x-stoplight": { "id": "p9kw9ds1tq2u9" }, "description": "The tracking number of the last-mile carrier." }, "slug": { "type": "string", "x-stoplight": { "id": "2zcp3bgwu7i3g" }, "description": "The unique code of the carrier responsible for the last-mile of the shipment. Find all the courier slugs [here](https://www.aftership.com/docs/tracking/others/supported-couriers)." }, "transit_time": { "type": [ "integer", "null" ], "x-stoplight": { "id": "g9uyyiie5257u" }, "description": "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.\n- Last mile transit time (in days)= Delivered date - Handover date" }, "courier_tracking_link": { "type": [ "string", "null" ], "x-stoplight": { "id": "uv5713a4wo7qf" }, "description": "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\"." }, "courier_redirect_link": { "type": [ "string", "null" ], "x-stoplight": { "id": "ep5coabc4hxhx" }, "description": "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\"." }, "source": { "x-stoplight": { "id": "ugrteygsuketi" }, "description": "The field indicates the source of last-mile carrier.\n", "enum": [ "system", "user" ] } } }, "customers": { "type": "array", "x-stoplight": { "id": "zaml2lcqlce9p" }, "description": "The field contains the customer information associated with the tracking. A maximum of three customer objects are allowed.", "items": { "x-stoplight": { "id": "7y5z99xgeev88" }, "type": "object", "properties": { "role": { "type": [ "string", "null" ], "x-stoplight": { "id": "98cuwhnhvp4mw" }, "description": "The role of the customer, indicating whether the customer is an individual or a company." }, "name": { "type": [ "string", "null" ], "x-stoplight": { "id": "jieszn741j491" }, "description": "Customer name associated with the tracking." }, "phone_number": { "type": [ "string", "null" ], "x-stoplight": { "id": "wtaftsxrrsiq5" }, "description": "The phone number(s) to receive SMS notifications. Phone numbers should begin with a `+` sign and include the area code.\n" }, "email": { "type": [ "string", "null" ], "x-stoplight": { "id": "z1pdcnx1juoob" }, "description": "Email address(es) to receive email notifications." }, "language": { "type": [ "string", "null" ], "x-stoplight": { "id": "pcfk6alevd2f6" }, "description": "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." }, "id": { "type": [ "string", "null" ], "x-stoplight": { "id": "6dw6geeylop7y" }, "description": "The customer's identifier on the merchant or platform (for example, Shopify) side." } } } }, "proof_of_delivery": { "type": [ "array", "null" ], "x-stoplight": { "id": "vchcxwr9d0l1o" }, "description": "An array of proof of delivery (POD) records, such as a signature or photo captured upon successful delivery.\n\nThis field returns a value only after the feature is enabled. Please contact your customer success manager if you'd like to know more.", "readOnly": true, "items": { "type": "object", "x-stoplight": { "id": "n2z7kyrhzds1t" }, "properties": { "type": { "type": "string", "x-stoplight": { "id": "khse95m08j6ae" }, "description": "The file type of the proof of delivery record. Currently, only images are supported." }, "url": { "type": "string", "x-stoplight": { "id": "w2zrmgcyx6yw5" }, "description": "The URL of the proof of delivery record." } } } }, "multi_piece_info": { "type": [ "object", "null" ], "x-stoplight": { "id": "acqod7q3o3r0w" }, "description": "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.\n\nThis field contains multi-piece shipment metadata describing a group of packages that belong to the same shipment.\n\nThis field returns a value only when your subscription plan includes a multi-piece feature. To enable, go to [AfterShip Tracking Admin > Settings > Shipment tracking > Multi-piece shipments](https://admin.aftership.com/tracking/settings/shipment-tracking-rule).", "readOnly": true, "properties": { "type": { "type": "string", "x-stoplight": { "id": "3cwrk6kg3lnuy" }, "description": "Indicates the role of the current tracking object within the multi-piece shipment.\n\nPossible values:\n- `master`: The main tracking number representing the entire shipment. It may not always exist.\n- `child`: A sub-tracking number belonging to one of the pieces in the shipment.", "enum": [ "master", "child" ] }, "pieces": { "type": "array", "x-stoplight": { "id": "ou311whkbpp14" }, "description": "List of all pieces in the MPS, including the master and all child pieces.", "items": { "type": "object", "x-stoplight": { "id": "wlufeblkrumed" }, "properties": { "tracking_id": { "type": "string", "x-stoplight": { "id": "pquvthihqehxo" }, "description": "AfterShip system-assigned unique identifier for the piece." }, "tracking_number": { "type": "string", "x-stoplight": { "id": "hhtrkkbhq0j7u" }, "description": "Carrier-assigned tracking number for the piece." }, "type": { "type": "string", "x-stoplight": { "id": "merxqyydqdr77" }, "description": "Type of the piece within the MPS: `master` or `child`.", "enum": [ "master", "child" ] }, "trackable": { "type": "boolean", "x-stoplight": { "id": "x3kq9mps5trkb" }, "description": "Indicates whether the tracking number can be used to retrieve tracking updates on the carrier's side. If not, it means the carrier can only return a child tracking number, but cannot independently provide tracking updates for the sub-shipment. In this case, it is not recommended for you to import this tracking number into AfterShip for tracking." } } } } } }, "shipment_direction": { "type": [ "string", "null" ], "x-stoplight": { "id": "iwlqsuiflsuzr" }, "description": "Indicates the business direction of the shipment in the e-commerce fulfillment lifecycle.\n\nPossible values:\n- `forward`: A forward (outbound-to-customer) shipment created for order fulfillment.\n- `return`: A return (customer-to-merchant) shipment created for after-sales return or exchange.\n\nThis field is populated in either of the following cases:\n1. You explicitly provided it when creating the tracking.\n2. AfterShip automatically detected a linked forward or return shipment.\n\nIt also determines which related shipment object (`forward_shipment` or `return_shipment`) may appear in the response.", "enum": [ "forward", "return", null ] }, "return_shipment": { "type": [ "object", "null" ], "x-stoplight": { "id": "6i08zztgpwfqi" }, "description": "The associated return shipment linked to the current outbound shipment.\n\nThis field is only present when `shipment_direction = \"forward\"` and AfterShip has detected a linked return shipment.", "readOnly": true, "properties": { "id": { "type": "string", "x-stoplight": { "id": "qm7835odb1yfx" }, "description": "AfterShip system-assigned unique identifier of the linked return shipment.\n\nThis field is only returned when both of the following conditions are met:\n1. AfterShip has detected a linked return shipment.\n2. The Auto-import for return shipments feature is enabled in your AfterShip account.\n\nWhen auto-import is disabled, `id` will not be returned, but `tracking_number` and `slug` may still be present.\n\nTo enable this feature, go to [AfterShip Tracking Admin > Settings > Shipment Tracking > Return Shipments](https://admin.aftership.com/tracking/settings/shipment-tracking-rule)." }, "tracking_number": { "type": "string", "x-stoplight": { "id": "eg2qzjb4ap0hl" }, "description": "Carrier-assigned tracking number of the linked return shipment. Can be used together with `return_shipment.slug` to create a new tracking subscription and retrieve the return shipment's checkpoints." }, "slug": { "type": "string", "x-stoplight": { "id": "kxh36uwjszfn7" }, "description": "Carrier slug (identifier) of the linked return shipment. Can be used together with `return_shipment.tracking_number` to subscribe to tracking updates for the return shipment." } } }, "forward_shipment": { "type": [ "object", "null" ], "x-stoplight": { "id": "an3uraqcwqkd5" }, "description": "The original outbound shipment linked to this return. Use this to trace a return back to its source delivery.\n\nThis field is only present when `shipment_direction = \"return\"` and AfterShip has detected a linked forward shipment.", "readOnly": true, "properties": { "id": { "type": "string", "x-stoplight": { "id": "dv0ib62o2wp78" }, "description": "AfterShip system-assigned unique identifier of the linked outbound shipment." } } } } } } }