Skip to main content

Release Stale Allocations

POST 

/api/v2/inventory-allocations/release-stale

Releases stale allocations: allocations that are still active (planned, awaiting receipt or allocated) on a sales order line that is already fully cancelled, returned or fulfilled. Each one is cancelled and its stock becomes available to other orders.

Required scope: orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Every id is re-checked when the request runs; an allocation that is no longer stale (for example a fulfillment was opened on its line in the meantime) is skipped and counted in skipped, never released. Lines with a fulfillment still in progress are never stale.

List them first with GET /api/v2/inventory-allocations?filter[stale]=yes.

Body:

  • scope (optional, selected | all, default selected) — all releases every stale allocation and ignores ids
  • ids (required unless scope is all, integer[], 1–500 items) — allocation ids to release

Response data: released (count released), skipped (ids that were not stale when the request ran), remaining (with scope: all, stale allocations still left — at most 500 are released per request, so repeat until it is 0)

Requires the inventory.adjust permission.

Request​

Responses​

OK

Response Headers
    Content-Type