{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/aftership/main/json-schema/aftership-estimated-delivery-date-response-schema.json", "title": "Estimated_delivery_date Response", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/aftership-estimated-delivery-date-api-openapi.yml#/components/schemas/Estimated_delivery_date_Response", "x-stoplight": { "id": "40b6fc86060b5" }, "type": "object", "required": [ "id", "slug", "origin_address", "destination_address" ], "properties": { "id": { "type": "string", "x-stoplight": { "id": "txwag8whxm10j" }, "description": "A string that acts as a unique identifier for the estimated delivery date value generated by AfterShip Predict API" }, "slug": { "type": "string", "description": "AfterShip's unique code of courier. Please refer to https://track.aftership.com/couriers/download.", "minLength": 1, "x-stoplight": { "id": "lbaa05enrsf0c" } }, "service_type_name": { "type": [ "string", "null" ], "description": "AfterShip’s unique code represents carrier’s shipping and delivery options. Refer to [Download Link](https://assets.aftership.com/downloads/service_type_list.csv).", "minLength": 1, "x-stoplight": { "id": "7anehie9tjx2a" } }, "origin_address": { "type": "object", "description": "The location from where the package is picked up by the carrier to be delivered to the final destination.", "x-stoplight": { "id": "slojj1xwsknox" }, "required": [ "country_region" ], "properties": { "country_region": { "type": "string", "description": "The country/region of the origin location from where the package is picked up by the carrier to be delivered to the final destination. Use 3 letters of ISO 3166-1 country/region code.", "minLength": 1, "x-stoplight": { "id": "2yxuigtg9pnun" } }, "state": { "type": [ "string", "null" ], "description": "State, province, or the equivalent location of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without state. \nEither `origin_address.state` or `origin_address.postal_code` is required.", "minLength": 1, "maxLength": 256, "x-stoplight": { "id": "q0unlbi2ewtwx" } }, "city": { "type": [ "string", "null" ], "description": "City of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without City.", "minLength": 1, "maxLength": 256, "x-stoplight": { "id": "49w0fp9in9ukm" } }, "postal_code": { "type": [ "string", "null" ], "description": "Postal code of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without postal code. \nEither `origin_address.state` or `origin_address.postal_code` is required.", "minLength": 1, "maxLength": 256, "x-stoplight": { "id": "nxn45r0gsdklr" } }, "raw_location": { "type": [ "string", "null" ], "description": "Raw location of the origin address. A raw address will help AI to identify the accurate location of the origin address.", "minLength": 1, "maxLength": 512, "x-stoplight": { "id": "0z8k4qoirr090" } } } }, "destination_address": { "type": "object", "description": "The final destination of the customer where the delivery will be made.", "x-stoplight": { "id": "vjpub5i3oyvso" }, "required": [ "country_region" ], "properties": { "country_region": { "type": "string", "description": "The country/region of the destination location where the package will be delivered. Use 3 letters of ISO 3166-1 country code.", "minLength": 1, "x-stoplight": { "id": "ncnxcjyhfdtx0" } }, "state": { "type": [ "string", "null" ], "description": "State, province, or the equivalent location of the destination address where the package will be delivered.\nEither `destination_address.state` or `destination_address.postal_code` is required.", "minLength": 1, "maxLength": 256, "x-stoplight": { "id": "sevqes9hst531" } }, "city": { "type": [ "string", "null" ], "description": "City of the destination address where the package will be delivered.", "minLength": 1, "maxLength": 256, "x-stoplight": { "id": "vo0g195wsafjr" } }, "postal_code": { "type": [ "string", "null" ], "description": "Postal code of the destination address.\nEither `destination_address.state` or `destination_address.postal_code` is required.", "minLength": 1, "maxLength": 256, "x-stoplight": { "id": "ghkjgot2i0vvn" } }, "raw_location": { "type": [ "string", "null" ], "description": "Raw location of the destination address. A raw address will help AI to identify the accurate location of the destination address.", "minLength": 1, "maxLength": 512, "x-stoplight": { "id": "thmjibeacpde1" } } } }, "weight": { "type": [ "object", "null" ], "description": "AfterShip uses this object to calculate the total weight of the order.", "x-stoplight": { "id": "wtnoqqnwo0zuf" }, "required": [ "unit", "value" ], "properties": { "unit": { "type": "string", "description": "The weight unit of the package. ", "x-stoplight": { "id": "2np5gtq194rjb" } }, "value": { "type": "number", "description": "The weight of the shipment.", "x-stoplight": { "id": "tsxccbksqmdh5" } } } }, "package_count": { "type": [ "integer", "null" ], "description": "The number of packages.", "x-stoplight": { "id": "d5mu2bz6vhl9d" } }, "pickup_time": { "type": [ "string", "null" ], "description": "The local pickup time in the origin address time zone of the package.\n\nEither `pickup_time` or `estimated_pickup` is required.", "x-stoplight": { "id": "kudykb4y9b4nl" } }, "estimated_pickup": { "type": [ "object", "null" ], "description": "The local pickup time of the package.\nEither `pickup_time` or `estimated_pickup` is required.", "x-stoplight": { "id": "lvlrgi312chfh" }, "required": [ "order_time" ], "properties": { "order_time": { "type": "string", "description": "The local order time in the origin address time zone of the package.", "minLength": 1, "x-stoplight": { "id": "mjepmn5afgrtl" } }, "order_cutoff_time": { "type": [ "string", "null" ], "description": "Order cut off time in the origin address time zone. The default value set by AfterShip is 18:00:00.", "minLength": 1, "x-stoplight": { "id": "y8dzxp6d1vxmb" } }, "business_days": { "type": [ "array", "null" ], "description": "Operating days in a week. Number refers to the weekday.\nE.g., [1,2,3,4,5] means operating days are from Monday to Friday.\nAfterShip will set [1,2,3,4,5] as the default value.", "x-stoplight": { "id": "t980et6dsz2vm" }, "items": { "type": "integer", "description": "Operating days in a week. Number refers to the weekday.\nE.g., [1,2,3,4,5] means operating days are from Monday to Friday.\nAfterShip will set [1,2,3,4,5] as the default value.", "x-stoplight": { "id": "ifan2t4e19a46" } } }, "order_processing_time": { "type": [ "object", "null" ], "x-stoplight": { "id": "4f4dybzr8r8j6" }, "properties": { "unit": { "type": "string", "minLength": 1, "description": "Processing time of an order, from being placed to being picked up. Only support day as value now.\nAfterShip will set day as the default value.", "x-stoplight": { "id": "j17iidd06s8h0" } }, "value": { "type": "number", "description": "Processing time of an order, from being placed to being picked up.\nAfterShip will set 0 as the default value.", "x-stoplight": { "id": "e44lr7kg9645f" } } } }, "pickup_time": { "type": [ "string", "null" ], "description": "The local pickup time of the package. ", "x-stoplight": { "id": "yipnxu5x7rt9d" } } } }, "estimated_delivery_date": { "type": "string", "description": "The estimated arrival date of the shipment, provided by AfterShip.", "minLength": 1, "x-stoplight": { "id": "qjas9kod90oba" } }, "confidence_code": { "type": "number", "x-stoplight": { "id": "sikywwuonop5i" }, "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": "The earliest estimated delivery date of the shipment, provided by AfterShip.", "minLength": 1, "x-stoplight": { "id": "124tdtumjcnyy" } }, "estimated_delivery_date_max": { "type": "string", "description": "The latest estimated delivery date of the shipment, provided by AfterShip.", "minLength": 1, "x-stoplight": { "id": "54toustiy68ro" } } } }