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

postapi.skrym.com/core.OptimizeOrderPart

Modes

core.OptimizeOrderPart supports two modes:

  1. Order-part scoped: send orderPartReference.
  2. 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

Warning

Results created through core.OptimizeOrderPart do 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:

  • orderReference is required.
  • originCountry must be a valid ISO country code.
  • destinationCountry must be a valid ISO country code.

Invalid values return invalid_argument.