Process labels in bulk and receive a large number of labels and customs forms in bulk responses. Batching is ideal for workflows that need to process hundreds or thousands of labels quickly.
ShipStation API v2 (2.0.0)
- Mock serverhttps://docs.shipstation.com/_mock/openapi/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 GET \
'https://docs.shipstation.com/_mock/openapi/v2/purchase_orders?order_number=02162026-02&status=draft&warehouse_id=string&reference_number=string&create_date_start=2025-01-01T00%3A00%3A00Z&page_size=50' \
-H 'api-key: YOUR_API_KEY_HERE'{ "purchase_orders": [ { … } ], "total": 150, "page": 2, "pages": 3, "links": { "first": { … }, "next": { … } } }
Payment terms for the order
Payment status for the order
List of products in the purchase order
- Mock serverhttps://docs.shipstation.com/_mock/openapi/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://docs.shipstation.com/_mock/openapi/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
}
]
}'{ "purchase_order_id": "se-234", "order_number": "02162026-02", "supplier_id": "se-567", "status": "draft", "order_date": "2025-01-15T00:00:00Z", "expected_delivery_date": "2025-02-01T00:00:00Z", "create_date": "2025-01-14T10:30:00Z", "modify_date": "2025-01-14T10:30: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": [ { … } ] }
- Mock serverhttps://docs.shipstation.com/_mock/openapi/v2/purchase_orders/{purchase_order_id}
- Productionhttps://api.shipstation.com/v2/purchase_orders/{purchase_order_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs.shipstation.com/_mock/openapi/v2/purchase_orders/se-234 \
-H 'api-key: YOUR_API_KEY_HERE'{ "purchase_order_id": "se-234", "order_number": "02162026-02", "supplier_id": "se-567", "status": "open", "order_date": "2025-01-15T00:00:00Z", "expected_delivery_date": "2025-02-01T00:00:00Z", "create_date": "2025-01-14T10:30:00Z", "modify_date": "2025-01-14T10:30: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": [ { … } ] }
Request
Update an existing purchase order.
Editing limitations:
- In the
draftstatus, all fields can be edited. - Once a purchase order moves to any other status (open, receiving, received, cancelled, or closed), updating via PUT is no longer allowed.
- For purchase orders in
openstatus, use the POST /v2/purchase_orders/{purchase_order_id}/shipping_details endpoint to update shipping-related details.
- Mock serverhttps://docs.shipstation.com/_mock/openapi/v2/purchase_orders/{purchase_order_id}
- Productionhttps://api.shipstation.com/v2/purchase_orders/{purchase_order_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://docs.shipstation.com/_mock/openapi/v2/purchase_orders/se-234 \
-H 'Content-Type: application/json' \
-H 'api-key: YOUR_API_KEY_HERE' \
-d '{
"supplier_id": "67890",
"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
}
]
}'{ "purchase_order_id": "se-234", "order_number": "02162026-02", "supplier_id": "se-567", "status": "open", "order_date": "2025-01-15T00:00:00Z", "expected_delivery_date": "2025-02-01T00:00:00Z", "create_date": "2025-01-14T10:30:00Z", "modify_date": "2025-01-14T10:30: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": [ { … } ] }
Request
Update shipping-related details for a purchase order in open status.
Editing limitations:
- Once a purchase order moves to any higher status (receiving, received, cancelled, or closed), updating shipping details is no longer allowed.
- Only the following fields can be modified: shipping_carrier, payment_terms, payment_status, order_date, expected_delivery_date, note_to_supplier, tracking_number, currency_code, and reference_number.
- Mock serverhttps://docs.shipstation.com/_mock/openapi/v2/purchase_orders/{purchase_order_id}/shipping_details
- Productionhttps://api.shipstation.com/v2/purchase_orders/{purchase_order_id}/shipping_details
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://docs.shipstation.com/_mock/openapi/v2/purchase_orders/{purchase_order_id}/shipping_details' \
-H 'Content-Type: application/json' \
-H 'api-key: YOUR_API_KEY_HERE' \
-d '{
"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",
"note_to_supplier": "Please expedite delivery"
}'{ "purchase_order_id": "se-234", "order_number": "02162026-02", "supplier_id": "se-567", "status": "open", "order_date": "2025-01-15T00:00:00Z", "expected_delivery_date": "2025-02-01T00:00:00Z", "create_date": "2025-01-14T10:30:00Z", "modify_date": "2025-01-14T10:30: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": [ { … } ] }
- Mock serverhttps://docs.shipstation.com/_mock/openapi/v2/purchase_orders/{purchase_order_id}/status
- Productionhttps://api.shipstation.com/v2/purchase_orders/{purchase_order_id}/status
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.shipstation.com/_mock/openapi/v2/purchase_orders/se-234/status \
-H 'Content-Type: application/json' \
-H 'api-key: YOUR_API_KEY_HERE' \
-d '{
"status": "open"
}'{ "purchase_order_id": "se-234", "status": "open" }
List of products being received
Location where inventory is received
Quantity received and accepted. At least one of received_quantity or rejected_quantity must be provided and greater than 0.
Quantity rejected (damaged, missing, etc.). At least one of received_quantity or rejected_quantity must be provided and greater than 0.
Lot number. Note - Availability depends on your ShipStation account plan.
- Mock serverhttps://docs.shipstation.com/_mock/openapi/v2/purchase_orders/{purchase_order_id}/receives
- Productionhttps://api.shipstation.com/v2/purchase_orders/{purchase_order_id}/receives
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.shipstation.com/_mock/openapi/v2/purchase_orders/se-234/receives \
-H 'Content-Type: application/json' \
-H 'api-key: YOUR_API_KEY_HERE' \
-d '{
"product_receives": [
{
"sku": "WIDGET-001",
"inventory_location_id": "se-12345",
"received_quantity": 95,
"rejected_quantity": 5,
"lot": "LOT-2025-001",
"expiration_date": "2026-01-01T00:00:00Z"
}
]
}'{ "purchase_order_id": "se-234", "status": "receiving" }
- Mock serverhttps://docs.shipstation.com/_mock/openapi/v2/purchase_orders/{purchase_order_id}/documents/order_summary
- Productionhttps://api.shipstation.com/v2/purchase_orders/{purchase_order_id}/documents/order_summary
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs.shipstation.com/_mock/openapi/v2/purchase_orders/se-234/documents/order_summary \
-H 'api-key: YOUR_API_KEY_HERE'- Mock serverhttps://docs.shipstation.com/_mock/openapi/v2/purchase_orders/{purchase_order_id}/documents/received_summary
- Productionhttps://api.shipstation.com/v2/purchase_orders/{purchase_order_id}/documents/received_summary
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs.shipstation.com/_mock/openapi/v2/purchase_orders/se-234/documents/received_summary \
-H 'api-key: YOUR_API_KEY_HERE'Webhooks
Webhooks are a powerful feature that can save you from sending repeated polling requests to check on the state of something. With webhooks, ShipStation will automatically contact your servers when the stage changes. This can include parcel tracking events, notification when a batch operation completes, and more.