openapi: 3.2.0 info: title: Overview Estimated delivery date API version: '1.0' description: '> OAS Schema can be downloaded [here](https://stoplight.io/api/v1/projects/automizely/docs-api-aftership-com/nodes/reference/api.json?branch=production%252F2026-07&deref=optimizedBundle)
' contact: name: AfterShip Support url: https://www.aftership.com/contact-us email: support@aftership.com termsOfService: https://www.aftership.com/terms summary: API Overview servers: - url: https://api.aftership.com/tracking/2026-07 description: API Endpoint security: - as-api-key: [] tags: - name: Estimated delivery date paths: /estimated-delivery-date/predict: parameters: [] post: summary: Prediction for the Estimated Delivery Date operationId: predict responses: '200': description: OK content: application/json: schema: type: object required: - meta - data properties: meta: $ref: '#/components/schemas/Meta.v1' data: $ref: '#/components/schemas/Estimated_delivery_date_Response' examples: '200': value: meta: code: 200 data: estimated_delivery_dates: - id: 0b02015fc7fd4f3c8d5490cece4d124d slug: fedex service_type_name: FEDEX HOME DELIVERY origin_address: country_region: USA state: WA postal_code: '98108' raw_location: Seattle, Washington, 98108, USA, United States city: null destination_address: country_region: USA state: CA postal_code: '92019' raw_location: El Cajon, California, 92019, USA, United States city: null weight: unit: kg value: 1 package_count: 1 pickup_time: '2021-07-01 15:00:00' estimated_pickup: null estimated_delivery_date: '2021-07-04' estimated_delivery_date_min: '2021-07-03' estimated_delivery_date_max: '2021-07-04' - id: 0b02015fc7fd4f3c8d5490cece4d124e slug: fedex service_type_name: FEDEX HOME DELIVERY origin_address: country_region: USA state: WA postal_code: '98108' raw_location: Seattle, Washington, 98108, USA, United States city: null destination_address: country_region: USA state: CA postal_code: '92019' raw_location: El Cajon, California, 92019, USA, United States city: null weight: null package_count: null pickup_time: null estimated_pickup: order_time: '2021-07-01 15:04:05' order_cutoff_time: '20:00:00' business_days: - 1 - 2 - 3 - 4 - 5 - 6 - 7 order_processing_time: unit: day value: 0 pickup_time: '2021-07-01 20:00:00' estimated_delivery_date: '2021-07-03' estimated_delivery_date_min: '2021-07-02' estimated_delivery_date_max: '2021-07-04' '400': description: Bad Request content: application/json: schema: type: object properties: meta: $ref: '#/components/schemas/Meta.v1' data: type: object required: - meta - data examples: '400': value: meta: code: 400 message: some message type: BadRequest data: {} description: "> The estimated delivery date is provided by AfterShip, based on its AI-predictive model. You can display the EDD on the product page, cart, and order checkout page. It indicates when a customer will receive the order.\n\nYou can use [AfterShip’s AI-powered predictive estimated delivery date API](https://www.aftership.com/features/delivery-date-prediction) to provide expected delivery dates to shoppers for online orders without tracking numbers. You can get the earliest date, the latest date, and the most-likely-arrival date through our AI-predictive EDD API. \n\nDisplay accurate estimated delivery dates on the product page, store cart, and order checkout page to encourage customers to check out faster and give them a better customer experience.\n\n[Contact sales](https://www.aftership.com/contact-sales) to activate this feature.\n\n" requestBody: content: application/json: schema: $ref: '#/components/schemas/Estimated_delivery_date_Request' examples: predict: value: slug: fedex service_type_name: FEDEX HOME DELIVERY origin_address: country_region: USA state: WA city: Seattle postal_code: '98108' raw_location: Seattle, Washington, 98108, USA, United States destination_address: country_region: USA state: CA postal_code: '92019' raw_location: El Cajon, California, 92019, USA, United States weight: unit: kg value: 1 package_count: 1 pickup_time: '2021-07-01 15:00:00' description: '' tags: - Estimated delivery date x-stoplight: id: 1o2zu0jrca785 /estimated-delivery-date/predict-batch: parameters: [] post: summary: Batch prediction for the Estimated Delivery Date operationId: predict-batch responses: '200': description: OK content: application/json: schema: type: object properties: meta: $ref: '#/components/schemas/Meta.v1' data: type: object required: - estimated_delivery_dates properties: estimated_delivery_dates: type: array items: $ref: '#/components/schemas/Estimated_delivery_date_Response' required: - meta - data examples: '200': value: meta: code: 200 data: estimated_delivery_dates: - id: 0b02015fc7fd4f3c8d5490cece4d124d slug: fedex service_type_name: FEDEX HOME DELIVERY origin_address: country_region: USA state: WA postal_code: '98108' raw_location: Seattle, Washington, 98108, USA, United States city: null destination_address: country_region: USA state: CA postal_code: '92019' raw_location: El Cajon, California, 92019, USA, United States city: null weight: unit: kg value: 1 package_count: 1 pickup_time: '2021-07-01 15:00:00' estimated_pickup: null estimated_delivery_date: '2021-07-04' estimated_delivery_date_min: '2021-07-03' estimated_delivery_date_max: '2021-07-04' - id: 0b02015fc7fd4f3c8d5490cece4d124e slug: fedex service_type_name: FEDEX HOME DELIVERY origin_address: country_region: USA state: WA postal_code: '98108' raw_location: Seattle, Washington, 98108, USA, United States city: null destination_address: country_region: USA state: CA postal_code: '92019' raw_location: El Cajon, California, 92019, USA, United States city: null weight: null package_count: null pickup_time: null estimated_pickup: order_time: '2021-07-01 15:04:05' order_cutoff_time: '20:00:00' business_days: - 1 - 2 - 3 - 4 - 5 - 6 - 7 order_processing_time: unit: day value: 0 pickup_time: '2021-07-01 20:00:00' estimated_delivery_date: '2021-07-03' estimated_delivery_date_min: '2021-07-02' estimated_delivery_date_max: '2021-07-04' '400': description: Bad Request content: application/json: schema: type: object properties: meta: $ref: '#/components/schemas/Meta.v1' data: type: object required: - meta - data examples: '400': value: meta: code: 400 message: some message type: BadRequest data: {} description: "> The estimated delivery date is provided by AfterShip, based on its AI-predictive model. You can display the EDD on the product page, cart, and order checkout page. It indicates when a customer will receive the order.\n\nYou can use [AfterShip’s AI-powered predictive estimated delivery date API](https://www.aftership.com/features/delivery-date-prediction) to provide expected delivery dates to shoppers for online orders without tracking numbers. You can get the earliest date, the latest date, and the most-likely-arrival date through our AI-predictive EDD API. \n\nDisplay accurate estimated delivery dates on the product page, store cart, and order checkout page to encourage customers to check out faster and give them a better customer experience.\n\n[Contact sales](https://www.aftership.com/contact-sales) to activate this feature.\n\nSupported functionalities require:\n\n1. One `EstimatedDeliveryDate` object for one prediction result.\n2. Maximum 5 `EstimatedDeliveryDate` objects are allowed.\n3. API call will fail if any of the requests `EstimatedDeliveryDate` objects do not meet the specification requirement.\n\n" requestBody: content: application/json: schema: type: object properties: estimated_delivery_dates: type: array maxItems: 5 minItems: 1 items: $ref: '#/components/schemas/Estimated_delivery_date_Request' required: - estimated_delivery_dates examples: predict: value: estimated_delivery_dates: - slug: fedex service_type_name: FEDEX HOME DELIVERY origin_address: country_region: USA state: WA city: Seattle postal_code: '98108' raw_location: Seattle, Washington, 98108, USA, United States destination_address: country_region: USA state: CA postal_code: '92019' raw_location: El Cajon, California, 92019, USA, United States weight: unit: kg value: 1 package_count: 1 pickup_time: '2021-07-01 15:00:00' - slug: fedex service_type_name: FEDEX HOME DELIVERY origin_address: country_region: USA state: WA postal_code: '98108' raw_location: Seattle, Washington, 98108, USA, United States destination_address: country_region: USA state: California postal_code: '92019' raw_location: El Cajon, California, 92019, USA, United States weight: null package_count: null estimated_pickup: order_time: '2021-07-01 15:04:05' order_cutoff_time: '20:00:00' business_days: - 1 - 2 - 3 - 4 - 5 - 6 - 7 order_processing_time: unit: day value: 0 description: '' tags: - Estimated delivery date x-stoplight: id: 0dkrr2qt6lvwv components: schemas: Estimated_delivery_date_Request: x-stoplight: id: buezc13rd1k96 type: object x-examples: example-1: slug: fedex service_type_name: FEDEX HOME DELIVERY origin_address: country_region: USA state: WA postal_code: '98108' raw_location: Seattle, Washington, 98108, USA, United States destination_address: country_region: USA state: CA postal_code: '92019' raw_location: El Cajon, California, 92019, USA, United States weight: null package_count: null estimated_pickup: order_time: '2021-07-01 15:04:05' order_cutoff_time: '20:00:00' business_days: - 1 - 2 - 3 - 4 - 5 - 6 - 7 order_processing_time: unit: day value: 0 estimated_delivery_date: '2021-07-07' estimated_delivery_date_min: '2021-07-03' estimated_delivery_date_max: '2021-07-10' title: Estimated_delivery_date Request required: - slug - origin_address - destination_address properties: slug: type: string description: AfterShip's unique code of courier. Please refer to https://track.aftership.com/couriers/download. minLength: 1 example: fedex x-stoplight: id: 2fkha2qr7unu4 service_type_name: type: - string - 'null' minLength: 1 example: FEDEX HOME DELIVERY x-stoplight: id: xf5a54x0eznad 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). 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: 3l69kjt8h52rv 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 example: USA x-stoplight: id: e8i3q8cgrao1i 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. \n**Either `origin_address.state` or `origin_address.postal_code` is required.**" minLength: 1 example: WA maxLength: 256 x-stoplight: id: x45tzbvglk1kb 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 example: Seattle maxLength: 256 x-stoplight: id: w2dh3z5iuz66d 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. \n**Either `origin_address.state` or `origin_address.postal_code` is required.**" minLength: 1 example: '98108' maxLength: 256 x-stoplight: id: fnr91dv4wzr7x 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 example: Seattle, Washington, 98108, USA, United States maxLength: 512 x-stoplight: id: 4rdm7ly5rzeix destination_address: type: object description: The final destination of the customer where the delivery will be made. x-stoplight: id: 8becp8jxtn0kc 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: 0x042hr28q5rd state: type: - string - 'null' description: 'State, province, or the equivalent location of the destination address where the package will be delivered. **Either `destination_address.state` or `destination_address.postal_code` is required.**' minLength: 1 maxLength: 256 x-stoplight: id: 6kfy7eftkvxvw city: type: - string - 'null' description: City of the destination address where the package will be delivered. minLength: 1 maxLength: 256 x-stoplight: id: 88zharfsrag0i postal_code: type: - string - 'null' description: 'Postal code of the destination address. **Either `destination_address.state` or `destination_address.postal_code` is required.**' minLength: 1 maxLength: 256 x-stoplight: id: soc4rhu323pph 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: 5hxma28s9fb5p weight: type: - object - 'null' description: AfterShip uses this object to calculate the total weight of the order. x-stoplight: id: r8zixon4yhr9t required: - unit - value properties: unit: type: string description: 'The weight unit of the package. ' example: kg x-stoplight: id: p70tijbxdtej6 value: type: number description: The weight of the shipment. example: 1 x-stoplight: id: 33iyg3ulcnbzm package_count: type: - integer - 'null' description: The number of packages. example: 1 x-stoplight: id: gqk68aa256ryf pickup_time: type: - string - 'null' example: '2021-07-01 06:42:30' x-stoplight: id: j6yfz7d6yc8n1 description: 'The local pickup time in the origin address time zone of the package. **Either `pickup_time` or `estimated_pickup` is required.**' estimated_pickup: type: - object - 'null' description: 'The local pickup time of the package. **Either `pickup_time` or `estimated_pickup` is required.**' x-stoplight: id: prba2x0eapziz required: - order_time properties: order_time: type: string description: The local order time in the origin address time zone of the package. minLength: 1 example: '2021-07-01 15:04:05' x-stoplight: id: aweebjla82xtj order_cutoff_time: type: - string - 'null' minLength: 1 example: '20:00:00' x-stoplight: id: abspbd3v6q79o description: Order cut off time in the origin address time zone. The default value set by AfterShip is 18:00:00. business_days: type: - array - 'null' description: 'Operating days in a week. Number refers to the weekday. E.g., [1,2,3,4,5] means operating days are from Monday to Friday. AfterShip will set [1,2,3,4,5] as the default value.' x-stoplight: id: 40m6r0vh76ydy items: type: integer description: 'Operating days in a week. Number refers to the weekday. E.g., [1,2,3,4,5] means operating days are from Monday to Friday. AfterShip will set [1,2,3,4,5] as the default value.' example: 0 x-stoplight: id: synct2dgbd6ib order_processing_time: type: - object - 'null' x-stoplight: id: 56a65mpwjlyye properties: unit: type: string minLength: 1 example: day description: 'Processing time of an order, from being placed to being picked up. Only support day as value now. AfterShip will set day as the default value.' x-stoplight: id: raqv0b7k2ikz0 value: type: number example: 0 description: 'Processing time of an order, from being placed to being picked up. AfterShip will set 0 as the default value.' x-stoplight: id: 4rv3pdeeonpjb Meta.v1: title: meta type: object description: Meta data required: - code properties: code: type: integer example: 200 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 Estimated_delivery_date_Response: x-stoplight: id: 40b6fc86060b5 type: object x-examples: example-1: slug: fedex service_type_name: FEDEX HOME DELIVERY origin_address: country: USA state: WA postal_code: '98108' raw_location: Seattle, Washington, 98108, USA, United States destination_address: country: USA state: CA postal_code: '92019' raw_location: El Cajon, California, 92019, USA, United States weight: null package_count: null estimated_pickup: order_time: '2021-07-01 15:04:05' order_cutoff_time: '20:00:00' business_days: - 1 - 2 - 3 - 4 - 5 - 6 - 7 order_processing_time: unit: day value: 0 estimated_delivery_date: '2021-07-07' estimated_delivery_date_min: '2021-07-03' estimated_delivery_date_max: '2021-07-10' title: Estimated_delivery_date Response 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 example: 56442da79af64b5f894109b5cbaba64c slug: type: string description: AfterShip's unique code of courier. Please refer to https://track.aftership.com/couriers/download. minLength: 1 example: fedex 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 example: FEDEX HOME DELIVERY 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 example: USA 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 example: WA 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 example: Seattle 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 example: '98108' 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 example: Seattle, Washington, 98108, USA, United States 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. Either `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. Either `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. ' example: kg x-stoplight: id: 2np5gtq194rjb value: type: number description: The weight of the shipment. example: 1 x-stoplight: id: tsxccbksqmdh5 package_count: type: - integer - 'null' description: The number of packages. example: 1 x-stoplight: id: d5mu2bz6vhl9d pickup_time: type: - string - 'null' example: '2021-07-01 06:42:30' description: 'The local pickup time in the origin address time zone of the package. Either `pickup_time` or `estimated_pickup` is required.' x-stoplight: id: kudykb4y9b4nl estimated_pickup: type: - object - 'null' description: 'The local pickup time of the package. Either `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 example: '2021-07-01 15:04:05' 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 example: '20:00:00' x-stoplight: id: y8dzxp6d1vxmb business_days: type: - array - 'null' description: 'Operating days in a week. Number refers to the weekday. E.g., [1,2,3,4,5] means operating days are from Monday to Friday. AfterShip 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. E.g., [1,2,3,4,5] means operating days are from Monday to Friday. AfterShip will set [1,2,3,4,5] as the default value.' example: 0 x-stoplight: id: ifan2t4e19a46 order_processing_time: type: - object - 'null' x-stoplight: id: 4f4dybzr8r8j6 properties: unit: type: string minLength: 1 example: day description: 'Processing time of an order, from being placed to being picked up. Only support day as value now. AfterShip will set day as the default value.' x-stoplight: id: j17iidd06s8h0 value: type: number example: 0 description: 'Processing time of an order, from being placed to being picked up. AfterShip will set 0 as the default value.' x-stoplight: id: e44lr7kg9645f pickup_time: type: - string - 'null' example: '2021-07-01 20:00:00' 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 example: '2021-07-03' 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). example: 10001 estimated_delivery_date_min: type: string description: The earliest estimated delivery date of the shipment, provided by AfterShip. minLength: 1 example: '2021-07-02' x-stoplight: id: 124tdtumjcnyy estimated_delivery_date_max: type: string description: The latest estimated delivery date of the shipment, provided by AfterShip. minLength: 1 example: '2021-07-04' x-stoplight: id: 54toustiy68ro securitySchemes: as-api-key: name: as-api-key type: apiKey in: header description: '> Legacy API keys with `aftership-api-key` headers are not supported anymore start from `2023-10` version. For more information, check [authentication](../../docs/quickstart/authentication.md).' x-stoplight: id: fcd9acb5f448a