Quote Sales Order Commitment
Beta/v1/sales/sales-orders/actions/quote-commitmentIdempotent with Idempotency-Key header. Learn more
Previews the ship-by date a set of commitment inputs would produce, without creating or changing anything.
Runs the same resolution an order runs when it is issued: a promised delivery date has the customer's receiving days, the carrier's transit, and the plant's shipping days worked back through it, while a lead time or a pinned ship date is snapped onto the next earlier day the plant ships. The returned steps are that derivation in order, so a caller can show why a date is what it is rather than restating the rules.
At most one of promised_at, lead_time_override_days, and ship_by_override_date may be set; they are alternative answers to the same question.
Advisory rather than binding. Carrier transit comes from a lane cache warmed in the background, so a lane nobody has shipped yet quotes against the service level's default or against no transit at all, and the date stamped at issue may differ once the lane has been rated.
sales_order_idoptional stringAn existing order to preview against. Its customer, ship-to address, carrier, and service level are used, and the commitment fields below replace whatever it currently carries.
Omit it to preview an order that has not been created yet, supplying the parts directly.
buyer_account_idoptional stringThe buying account, used to resolve its lead time and receiving days.
ship_to_address_idoptional stringThe ship-to address, which decides the destination timezone and the lane transit is quoted on.
carrier_idoptional stringCarrier for the shipment.
service_level_idoptional stringService level for the shipment, which the lane's transit estimate is keyed on.
issued_atoptional string (date-time)When the order would be issued. Defaults to now, since a lead time is measured from issue and an order built today but issued next week commits to next week's date.
promised_atoptional string (date-time)Date delivery would be promised to the customer.
lead_time_override_daysoptional integerDays between issue and the order being due to ship, in place of the customer's standing lead time.
ship_by_override_dateoptional string (date-time)The exact date the order would be due to ship.
objectstringenumValues:sales_order_commitment_quoteResource type identifier.
ship_by_datestring (date-time)nullableThe date the order would be due to ship, or null when no rule resolves one.
ship_by_cutoff_atstring (date-time)nullableThat date at the plant's pickup cutoff — the moment freight would have to be tendered by. Null when the shipping calendar carries no cutoff.
lead_time_daysintegernullableCalendar days between issue and the ship-by date.
lead_time_sourcestringnullableenumValues:customerparent_customeraccount_groupWhich rule produced the date.
transit_daysintegernullableDays the carrier needs to cover the lane. Null when the lane has never been quoted and the service level carries no default, or when no service level was supplied to quote one on.
transit_sourcestringnullableenumValues:carrier_laneservice_levelWhere the transit estimate came from.
estimated_delivery_datestring (date-time)nullableWhen freight leaving on the ship-by date would reach the customer: transit walked forward from it and landed on a day their dock receives. Null whenever transit_days is, since an arrival with no journey behind it would just be the ship date wearing a different name.
Reported for every basis, including the ones that do not use transit to decide the ship-by date. An order committed on a lead time has the same journey ahead of it; it simply was not worked backwards from.
calendar_adjustment_daysintegerDays the receiving and shipping calendars pulled the date back, beyond what transit accounted for.
stepsarray of objectThe derivation in order, one entry per rule that moved the date.
codestringenumValues:basisreceive_calendarcarrier_transitWhich rule applied.
datestring (date-time)Where the running date stood after this rule.
days_movedintegerHow far this rule pulled the date back. Zero means the rule applied and changed nothing, which is worth showing: it says the date was already on an open day.
detailstringnullableThe rule's own parameter — where a transit estimate came from, or the cutoff time applied. Null for a rule that takes none, rather than an empty string: snapping onto an open day has no parameter to report.
Responses
Successful response for Quote Sales Order Commitment