Skip to main content

Approve & run

POST 

/api/send-plans/:sendPlan/ai-approval

Approve the plan as summarised and run it: hold the source stock (unless hold is false), queue every network draft for the destinations kept in, create the draft supplier POs for the supplier orders kept in, and record the approval (who, when, the numbers approved, what was left out). Nothing is submitted to Amazon, Walmart or TikTok.

Required scope: send-plans:write

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

Body: fingerprint (required, from GET ai-approval), excluded_destination_ids (int[]), excluded_supplier_keys ("supplier_id:destination_warehouse_id"[]), hold (bool, default true), narrative (the text the approver read).

Responses: 201 with the run state (status running | done | partial, drafts as SendPlanDraft resources, purchase_orders, po_error); 409 when the plan changed since the summary (review again); 403 without integrations.update (drafts), warehouse_transfers.create (hold) or purchase_orders.create (when supplier orders are included) — nothing is created; 422 for scenarios, send runs, a plan still calculating, or when everything is switched off. Needs send_planner.draft; API tokens: send-plans:write.

Request​

Responses​

Created

Response Headers
    Content-Type