Skip to main content

Draft Available Send Plan Quantity

POST 

/api/send-plans/:sendPlan/drafts/:draft/draft-available

Draft the quantity available now for a failed group whose source has fewer units than the plan assumed. Each short line is cut to the stock at that source (whole cases, never under the network's per-line minimum) as an audited edit with the reason stock_changed, and the group is drafted again with its stock held, in the background.

Required scope: send-plans:write

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

Authentication: Bearer Personal Access Token with the send-plans:write scope. The token's user also needs permission to create send planner drafts.

No request body. Returns 202 with tracked_job_log_id, the drafts being created, and fitted (sku, from, to for every line that was cut). drafts is empty when nothing is available at the source now.

Returns 404 when the group is not part of the plan, and 422 when the group is no longer failed or the plan can no longer be drafted.

Request​

Responses​

Accepted

Response Headers
    Content-Type