Quote Sales Order Commitment

Beta
POST/v1/sales/sales-orders/actions/quote-commitment

Idempotent 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.

Permissions requiredValues:sales_orders:read
The role behind your API key or agent must grant every one of these permissions.
sales_order_idoptional string

An 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 string

The buying account, used to resolve its lead time and receiving days.

ship_to_address_idoptional string

The ship-to address, which decides the destination timezone and the lane transit is quoted on.

carrier_idoptional string

Carrier for the shipment.

service_level_idoptional string

Service 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 integer

Days 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_quote

Resource type identifier.

ship_by_datestring (date-time)nullable

The date the order would be due to ship, or null when no rule resolves one.

ship_by_cutoff_atstring (date-time)nullable

That 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_daysintegernullable

Calendar days between issue and the ship-by date.

lead_time_sourcestringnullableenumValues:customerparent_customeraccount_group

Which rule produced the date.

transit_daysintegernullable

Days 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_level

Where the transit estimate came from.

estimated_delivery_datestring (date-time)nullable

When 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_daysinteger

Days the receiving and shipping calendars pulled the date back, beyond what transit accounted for.

stepsarray of object

The derivation in order, one entry per rule that moved the date.

codestringenumValues:basisreceive_calendarcarrier_transit

Which rule applied.

datestring (date-time)

Where the running date stood after this rule.

days_movedinteger

How 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.

detailstringnullable

The 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

200

Successful response for Quote Sales Order Commitment