Create new purchase orders to track inventory replenishment from your suppliers. Use the POST method with /v2/purchase_orders to create orders in draft status and include product details, delivery dates, and payment terms.
| Property | Type | Required | Description |
|---|---|---|---|
supplier_id | string | Required | Identifier for the supplier providing the products |
warehouse_id | string | Required | Identifier for the warehouse where products will be received |
products | array | Required | Array of products to order (must contain at least one product) |
order_date | string (date-time) | Optional | Date when the order was placed with the supplier. Format: ISO 8601 |
expected_delivery_date | string (date-time) | Optional | Expected delivery date for the shipment. Format: ISO 8601 |
payment_terms | enumerated string | Optional | Payment terms: none, cash_on_delivery, payment_on_receipt, payment_in_advance, net_7, net_15, net_30, net_45, net_60 |
payment_status | enumerated string | Optional | Payment status: none, unpaid, partially_paid, paid, refunded, credit_issued, other |
currency_code | string | Optional | ISO 4217 currency code (default: "USD") |
shipping_carrier | string | Optional | Shipping carrier name for tracking the shipment |
tracking_number | string | Optional | Tracking number for the shipment from supplier |
reference_number | string | Optional | Your custom reference number for internal tracking |
note_to_supplier | string | Optional | Special instructions or notes for the supplier |
Each product in the products array must include:
| Property | Type | Required | Description |
|---|---|---|---|
sku | string | Required | Stock Keeping Unit identifier |
quantity | integer | Required | Quantity to order (minimum: 1) |
supplier_sku | string | Optional | Supplier's SKU for this product |
cost | number | Optional | Unit cost of the product (minimum: 0) |
On successful creation, the response includes:
- The complete purchase order details (all properties from GET operation)
- Auto-generated
purchase_order_id - Auto-generated
order_number create_dateandmodify_datetimestamps- Full product details for each product
POST /v2/purchase_orders
- Productionhttps://api.shipstation.com/v2/purchase_orders
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.shipstation.com/v2/purchase_orders \
-H 'Content-Type: application/json' \
-H 'api-key: YOUR_API_KEY_HERE' \
-d '{
"supplier_id": "se-567",
"order_date": "2025-01-15T00:00:00Z",
"expected_delivery_date": "2025-02-01T00:00:00Z",
"payment_terms": "net_30",
"payment_status": "unpaid",
"currency_code": "USD",
"shipping_carrier": "UPS",
"tracking_number": "1Z12345E1234567890",
"reference_number": "REF-12345",
"warehouse_id": "se-123456",
"note_to_supplier": "Please expedite delivery",
"products": [
{
"sku": "WIDGET-001",
"supplier_sku": "SUPP-WIDGET-001",
"quantity": 100,
"cost": 9.99
}
]
}'Common errors when creating purchase orders:
- 400 Bad Request: Missing required fields (
supplier_idorproducts)
Validation rules:
productsarray must contain at least one productquantitymust be greater than 0costmust be 0 or positive- Date formats must follow ISO 8601 standard
- Supplier with the given ID was not found