Skip to main content

Draft supplier POs (supplier-direct sends)

POST 

/api/send-plans/:sendPlan/supplier-purchase-orders

Create draft purchase orders from the plan's supplier-direct suggestions: what your warehouses can't cover of a network's need, ordered from a supplier that ships straight to that network (supplier profile → Ships to Fulfillment Networks). One draft PO per supplier × network, delivered to the network's warehouse, quantities rounded to whole cases and at least the supplier's minimum; the PO's expected delivery date is today + that supplier's lead time for the network. Each line is priced at the supplier's price for the product, or its average cost when the supplier has no price (or a $0 price). Nothing is sent to the supplier: the POs are drafts. Use Preview supplier POs first to see what would be created. A suggestion that already has a PO is skipped. The next plan counts the PO as on its way to the network (line inbound, meta.on_order), so the units aren't suggested again.

Required scope: send-plans:write

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

Body: line_ids (optional, integer[]): only these lines' suggestions; omit for every suggestion in the plan.

Response: created (id, number, supplier_id, supplier_name, destination_warehouse_id, products, units per PO) and skipped (suggestions that already had a PO).

Needs the send_planner.draft and purchase_orders.create permissions (403 with an explanation otherwise). API tokens: send-plans:write.

Request​

Responses​

OK

Response Headers
    Content-Type