# Create a new purchase order Create a new purchase order with products from a supplier. Endpoint: POST /v2/purchase_orders Version: 2.0.0 Security: api_keys ## Request fields (application/json): - `supplier_id` (string, required) Supplier identifier Example: "se-567" - `order_date` (string) Date when the order was placed Example: "2025-01-15T00:00:00Z" - `expected_delivery_date` (string) Expected delivery date Example: "2025-02-01T00:00:00Z" - `payment_terms` (string) Payment terms for the order Enum: "none", "cash_on_delivery", "payment_on_receipt", "payment_in_advance", "net_7", "net_15", "net_30", "net_45", "net_60" - `payment_status` (string) Payment status for the order Enum: "none", "unpaid", "partially_paid", "paid", "refunded", "credit_issued", "other" - `currency_code` (string) ISO 4217 currency code Example: "USD" - `shipping_carrier` (string) Shipping carrier name Example: "UPS" - `tracking_number` (string) Tracking number for the shipment Example: "1Z12345E1234567890" - `reference_number` (string) Optional reference number Example: "REF-12345" - `warehouse_id` (string, required) Warehouse identifier Example: "se-123456" - `note_to_supplier` (string) Note to include for the supplier Example: "Please expedite delivery" - `products` (array, required) List of products in the purchase order - `products.sku` (string, required) SKU of the product Example: "WIDGET-001" - `products.supplier_sku` (string) Supplier's SKU for the product Example: "SUPP-WIDGET-001" - `products.quantity` (integer, required) Quantity to order Example: 100 - `products.cost` (number) Unit cost Example: 9.99 ## Response 200 fields (application/json): - `purchase_order_id` (string) Unique identifier for the created purchase order Example: "se-234" - `order_number` (string) Auto-generated order number Example: "02162026-02" - `supplier_id` (string) Example: "se-567" - `status` (string) Enum: "draft", "open", "receiving", "received", "cancelled", "closed" - `order_date` (string) Example: "2025-01-15T00:00:00Z" - `expected_delivery_date` (string) Example: "2025-02-01T00:00:00Z" - `create_date` (string) Example: "2025-01-14T10:30:00Z" - `modify_date` (string) Example: "2025-01-14T10:30:00Z" - `payment_terms` (string) Enum: "none", "cash_on_delivery", "payment_on_receipt", "payment_in_advance", "net_7", "net_15", "net_30", "net_45", "net_60" - `payment_status` (string) Enum: "none", "unpaid", "partially_paid", "paid", "refunded", "credit_issued", "other" - `currency_code` (string) Example: "USD" - `shipping_carrier` (string) Example: "UPS" - `tracking_number` (string) Example: "1Z12345E1234567890" - `reference_number` (string) Example: "REF-12345" - `warehouse_id` (string) Example: "se-123456" - `note_to_supplier` (string) Example: "Please expedite delivery" - `products` (array) - `products.sku` (string) Example: "WIDGET-001" - `products.supplier_sku` (string) Example: "SUPP-WIDGET-001" - `products.quantity` (integer) Example: 100 - `products.cost` (number) Example: 9.99 ## Response 400 fields (application/json): - `request_id` (string, required) A UUID that uniquely identifies the request id. This can be given to the support team to help debug non-trivial issues that may occur Example: "aa3d8e8e-462b-4476-9618-72db7f7b7009" - `errors` (array, required) The errors associated with the failed API call - `errors.error_source` (string, required) The source of the error, as indicated by the name this informs us if the API call failed because of the carrier, the order source, or the ShipStation API itself. Enum: "carrier", "order_source", "ShipStation" - `errors.error_type` (string, required) The type of error Enum: "account_status", "business_rules", "validation", "security", "system", "integrations" - `errors.error_code` (string, required) The error code specified for the failed API Call Enum: "auto_fund_not_supported", "batch_cannot_be_modified", "carrier_conflict", "carrier_disconnected", "carrier_not_connected", "carrier_not_supported", "confirmation_not_supported", "default_warehouse_cannot_be_deleted", "field_conflict", "field_value_required", "forbidden", "identifier_conflict", "identifiers_must_match", "insufficient_funds", "invalid_address", "invalid_billing_plan", "invalid_field_value", "invalid_identifier", "invalid_status", "invalid_string_length", "label_images_not_supported", "meter_failure", "order_source_not_active", "rate_limit_exceeded", "refresh_not_supported", "request_body_required", "return_label_not_supported", "settings_not_supported", "subscription_inactive", "terms_not_accepted", "tracking_not_supported", "trial_expired", "unauthorized", "unknown", "unspecified", "verification_failure", "warehouse_conflict", "webhook_event_type_conflict", "customs_items_required", "incompatible_paired_labels", "invalid_charge_event", "invalid_object", "no_rates_returned" - `errors.message` (string, required) An error message associated with the failed API call Example: "Body of request cannot be null." - `errors.field_name` (string) The name of the field that caused the error (only present for validation errors) Example: "inventory_warehouse_id" - `errors.field_value` (string) The invalid value that was provided for the field (only present for validation errors) Example: "invalid-id"