Order Cancellation Deallocation Plan Plan order cancellations while preserving protected allocations.
Plan order cancellations while preserving protected allocations. Supply current order lines, requested cancellation quantities, allocation records and explicit release ranks. All quantities are nonnegative safe whole integers in the single declared common unit. A stock ID identifies one exact item-location tuple; every line references a declared stock ID, and every allocation inherits its line's stock identity and common unit. No unit conversion, substitution or approval is inferred. For each independent line, consume already-unallocated quantity first, then release the highest numeric rank before lower ranks, never taking an allocation below its protected quantity. Release ranks must be unique within a line; the same rank on different lines is allowed. The allocation plan is returned in descending rank order. A line that cannot satisfy its entire requested cancellation is blocked atomically: its applied cancellation and releases are zero, its order and allocations remain unchanged, and its exact shortage is reported. Other valid lines still receive their own plans. Stock release totals sum only actual proposed allocation releases, excluding cancellations of quantity that was already unallocated. Totals retain stock identity and use the declared common unit. Duplicate IDs or stock tuples, duplicate ranks within a line, unknown references, allocations above the ordered quantity, protection above allocation and unsafe sums reject the whole request during preflight. Up to 128 stocks, 128 lines and 256 allocations are supported within the shared 36,000-byte, 6,000-node and depth-24 input profile and 500,000-byte output guard. These are workload bounds. This supplied-record plan does not cancel orders, release stock, authorize changes or prove physical inventory; it is distinct from order splitting, reservation expiry and order-edit reconciliation. Use authorized, non-sensitive data. The report describes supplied records and does not change external systems.
Agent API guide → · Website orders show the report on your private order page.
Your input · JSON Load a small example The complete checkout request must fit within 40,000 UTF-8 bytes. Your input is validated again before an order is created.