Order-part Optimization
API reference for order-level and order-part-level optimization ingestion
Use this endpoint when you want one optimization per picked part (for example one pick order), while still supporting full-order optimization in the same flow.
Endpoint
Modes
core.OptimizeOrderPart supports two modes:
- Order-part scoped: send
orderPartReference. - Order scoped: omit
orderPartReference.
Order-part scoped mode
- The order is resolved/created from
orderReference. - The part is resolved/created from
orderPartReference. - Products are stored for that specific part.
Order scoped mode
- The order is resolved/created from
orderReference. - No order part is created implicitly.
- Products are stored for the whole order.
Statistics limitation
WarningResults created through
core.OptimizeOrderPartdo not currently populate the legacy optimization statistics used for metrics such as package usage, fill rate, sent volume, products per order, and optimization order count. This applies to both order-scoped and order-part-scoped requests to this endpoint.
Use core.OptimizePostPayment when those legacy optimization statistics are
required. Do not send the same optimization through both endpoints solely to
populate statistics, because that creates separate optimization runs and can
produce inconsistent results.
Important request validation
The endpoint validates input before running optimization:
orderReferenceis required.originCountrymust be a valid ISO country code.destinationCountrymust be a valid ISO country code.
Invalid values return invalid_argument.