Create a draft purchase order
create_purchase_orderCreates a draft purchase order with its supplier, receiving warehouse, lines and charges. Nothing is sent to the supplier. Returns the PO id, number and sku_url.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | Validate only; saves nothing. | |
| currency_id | No | ||
| supplier_id | No | The supplier id. Alternatively give supplier_name. | |
| currency_code | No | ISO currency code, e.g. USD. | |
| supplier_name | No | ||
| supplier_notes | No | ||
| financial_lines | No | Charges: [{description, quantity, amount, financial_line_type_id}]. | |
| idempotency_key | No | A repeat with this key replays the first result. | |
| payment_term_id | No | ||
| purchase_order_date | Yes | ISO date. | |
| purchase_order_lines | No | Lines: [{product_id or sku, quantity, amount (unit cost), description}]. | |
| purchase_order_number | No | ||
| estimated_delivery_date | No | ISO date. | |
| destination_warehouse_id | No | Receiving warehouse id; omit only for a dropship PO. |