Create a new purchase order
Create a new purchase order with items, payments, and optional metadata.
Key Features
- Create orders with multiple line items
- Support for both product ID and SKU lookup for items
- Automatic product name and details population
- Optional payments - can include payments when creating the order
- Optional shipping address (
ship_to) information - Optional custom fields and tags at both order and order item level
- Automatic total calculation from line items plus tax/shipping
- Stock count updates - incoming quantities are automatically updated
Product Identification
For each line item, you must provide either:
product_id: The internal product IDsku: The product SKU (supports both internal SKU and alternate SKUs)
Order Status Values
Valid order statuses include: active, completed, deleted
Defaults to active if not provided.
Total Calculation
The order cost (order_cost) is automatically calculated as:
sum of (item quantities × unit prices)
The order total (total_cost) is automatically calculated as:
order_cost + total_tax + total_shipping_cost
Note: order_cost, total_cost, total_paid, and total_due are calculated automatically
on the backend and cannot be edited directly.
Payments
If payments array is provided, it replaces all existing payments for the order.
Totals are automatically recalculated after payments are updated.
Authorizations
Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.
Body
Date when the purchase order was created (YYYY-MM-DD)
"2024-01-15"
ID of the supplier
123
Array of line items for the purchase order
1ID of the warehouse
1
ID of the location
1
Milestone status (token or numeric id). Also accepts 30 (production_active) and 88 (delivered) by id. Writes a milestone row and updates the PO header.
active, production_started, production_completed, in_transit, completed, deleted "active"
Array of purchase order numbers used to identify the purchase order across various systems
255Date when the purchase order was invoiced (YYYY-MM-DD)
"2024-01-16"
Total shipping cost
x >= 050
Total tax amount
x >= 080
Public notes visible to suppliers
"Please ship via express delivery"
Internal private notes
"Rush order - expedite processing"
Requested shipping date (YYYY-MM-DD)
"2024-01-20"
Expected arrival date (YYYY-MM-DD)
"2024-01-25"
Shipping address information
Array of payments for this purchase order. If provided, replaces all existing payments. Totals are automatically recalculated after payments are updated.
Custom field values for the purchase order
Tags to associate with the purchase order
255Response
Purchase order created successfully