Fetch delivery promise details
The Delivery Promise API provides fulfillment and delivery promise-related information, such as promise date, eligibility, availability, and SLA tier, for all valid fulfillment paths for each item or offer at the SKU level. This API accepts multiple active SKUs (up to 30). However, it provides delivery promise details only for SKUs where inventory is available.
The following is a sample request.
{ "header": { "headerAttributes": { "martId": "202", "buId": "0" } }, "payload": { "requestId": "6261274564_1677576988850", "destinations": [ { "address": { "city": "Milpitas", "addressType": "RESIDENTIAL", "postalCode": "95035", "addressLineOne": "261 Odyssey Ln", "addressLineTwo": "222", "isPOBox": false, "countryCode": "US", "stateCode": "CA" }, "fulfillmentType": "DELIVERY" } ], "offerSelections": [ { "offers": [ { "sku": "WH40DDD", "lineId": "5615355772_1677576988850", "salesUnit": "Each", "requestedQuantity": { "measurementValue": 1, "unitOfMeasure": "EA" } } ] } ] }
}
The following is a sample of a successful response when all SKUs and offers are valid (the requested quantity is available for each SKU).
{ "status": "ACCEPTED", "header": { "headerAttributes": { "buId": "0", "martId": "202" } }, "payload": { "offers": [ { "availableQuantity": { "measurementValue": 1, "unitOfMeasure": "EA" }, "requestedQuantity": { "measurementValue": 1, "unitOfMeasure": "EA" }, "lineId": "249ac8e1-e6c2-4806-81a5-54215eb16b99", "salesUnit": "Each", "sku": "FFUW0127PTY" } ], "destinations": [ { "address": { "city": "Milpitas", "addressType": "RESIDENTIAL", "postalCode": "95035", "addressLineOne": "261 Odyssey Ln", "addressLineTwo": "222", "isPOBox": false, "countryCode": "US", "stateCode": "CA" }, "fulfillmentType": "DELIVERY", "destinationId": "0" } ], "fulfillmentPlans": [ { "fulfillmentModules": [ { "fulfillmentGroups": [ { "fulfillmentOptions": [ { "fulfillments": [ { "lineItemAttributesList": [ { "availableQuantity": { "measurementValue": 1, "unitOfMeasure": "EA" }, "fulfillmentChannel": [ "WFS_FULFILLED" ], "lineId": "249ac8e1-e6c2-4806-81a5-54215eb16b99" } ], "sla": { "tier": "TWO_DAY", "speed": "EXPEDITED" }, "accessMode": { "mode": "NATIONAL_CARRIER" }, "fulfillmentTime": { "date": { "minPromiseDate": "2023-03-03T22:59:00.000Z", "maxPromiseDate": "2023-03-03T22:59:00.000Z" } }, "fulfillmentId": "9e5ad7a4-385e-49ba-bb9b-b1b680d5542e", "nodeType": "FC" } ], "fulfillmentMode": "UNSCHEDULED", "accessType": "DELIVERY_ADDRESS", "isDefault": true, "fulfillmentType": "DELIVERY" } ] } ], "name": "UNSCHEDULED_DELIVERY" } ] } ], "prepurchaseHandle": "0208c5cc-a4e1-446e-b09a-af397afcec6f" }
}
The following is a partially successful sample response when at least one SKU or offer has an error. For example, the requested quantity is not available for any SKU.
{ "status": "FAIL", "errors": [ { "code": "206.WSAAS.100", "description": "Partial content found", "info": "Partial content found", "severity": "ERROR", "category": "REQUEST" } ], "header": { "headerAttributes": { "buId": "0", "martId": "202" } }, "payload": { "offers": [ { "requestedQuantity": { "measurementValue": 10, "unitOfMeasure": "EA" }, "lineId": "249ac8e1-e6c2-4806-81a5-54215eb16b98", "salesUnit": "Each", "sku": "FFLA-XL" }, { "availableQuantity": { "measurementValue": 1, "unitOfMeasure": "EA" }, "requestedQuantity": { "measurementValue": 1, "unitOfMeasure": "EA" }, "lineId": "249ac8e1-e6c2-4806-81a5-54215eb16b99", "salesUnit": "Each", "sku": "FFLA-L" } ], "destinations": [ { "address": { "city": "Milpitas", "addressType": "RESIDENTIAL", "postalCode": "95035", "addressLineOne": "261 Odyssey Ln", "addressLineTwo": "222", "isPOBox": false, "countryCode": "US", "stateCode": "CA" }, "fulfillmentType": "DELIVERY", "destinationId": "0" } ], "fulfillmentPlans": [ { "fulfillmentModules": [ { "fulfillmentGroups": [ { "fulfillmentOptions": [ { "fulfillments": [ { "lineItemAttributesList": [ { "availableQuantity": { "measurementValue": 1, "unitOfMeasure": "EA" }, "fulfillmentChannel": [ "WFS_FULFILLED" ], "lineId": "249ac8e1-e6c2-4806-81a5-54215eb16b99" } ], "sla": { "tier": "TWO_DAY", "speed": "EXPEDITED" }, "accessMode": { "mode": "NATIONAL_CARRIER" }, "fulfillmentTime": { "date": { "minPromiseDate": "2023-03-03T22:59:00.000Z", "maxPromiseDate": "2023-03-03T22:59:00.000Z" } }, "fulfillmentId": "115e6236-48a6-4e99-a64b-2b73397f315c", "nodeType": "FC" } ], "fulfillmentMode": "UNSCHEDULED", "accessType": "DELIVERY_ADDRESS", "isDefault": true, "fulfillmentType": "DELIVERY" } ] } ], "name": "UNSCHEDULED_DELIVERY" }, { "fulfillmentGroups": [ { "fulfillmentOptions": [ { "fulfillments": [ { "lineItemAttributesList": [ { "lineId": "249ac8e1-e6c2-4806-81a5-54215eb16b98" } ], "errors": [ { "code": "500.UP_MCF.108", "field": "field_1", "description": "INVENTORY_NOT_FOUND", "severity": "ERROR", "category": "APPLICATION" } ], "fulfillmentId": "9fa7a3b8-27ed-457c-a71e-1116b49c4c11" } ], "fulfillmentMode": "UNSCHEDULED", "isDefault": true, "fulfillmentType": "DELIVERY" } ] } ], "name": "ERROR" } ] } ], "prepurchaseHandle": "96d672ef-e6eb-4037-9a52-1d9562f19493" }
}
The following is a sample response on failures.
{ "status": "FAIL", "errors": [ { "code": "ERR_EXT_DATA_0021001", "description": "The payload structure is not valid. Please correct the payload.", "info": "[Error [code=400.WSAAS.100, field=offerSelections[0].offers[0].requestedQuantity.measurementValue, description=Bad Request, info=measurementValue must be greater than zero, severity=ERROR, category=DATA, causes=null]]", "severity": "ERROR", "category": "REQUEST" } ]
}
The description and info might change based on the error.
Updated about 2 months ago