Create inventory order

POST/api/v1/purchase-orders

Create a new purchase order for inventory restocking.

Operation ID: create_order_api_v1_purchase_orders_post·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

vendor_idstringrequired

Vendor UUID.

statusstringrequired

Order status (draft, submitted, confirmed, received, cancelled).

namestringrequired

Order name/title.

po_numberstringrequired

Purchase order number.

line_itemsarray · LineItem

Products being ordered.

feesarray · Fee

Additional fees (shipping, handling, etc.).

paymentsarray · Payment-Input

Payments made on this order.

descriptionstring

Order notes.

totalinteger

Total order amount in cents (calculated if not provided).

balanceinteger

Remaining balance in cents (total minus payments).

shipping_costinteger

Freight/shipping cost in cents.

ship_from_location_idstring

Source location; defaults to vendor.default_location_id.

ship_to_location_idstring

Destination location.

production_run_idstring

Linked production run (for copacker orders).

expected_delivery_datestring · date-time

Expected delivery date (ISO 8601).

payment_term_idstring

Payment term ID for net terms (defaults to vendor's).

expected_paid_onstring · date-time

Expected payment date (ISO 8601). Auto-calculated from delivery + net terms if not provided.

Responses

201Successful Response

successboolean
messagestring
codestring
dataOrderResponse

400Bad Request - Invalid input

401Unauthorized - Authentication required

403Forbidden - Insufficient permissions

422Validation Error

detailarray · ValidationErrorValidationError
5 fields
locarray · string | integerrequired
msgstringrequired
typestringrequired
inputobject
ctxobject