201Successful Response
Schema: app__core__success__SuccessEnvelope_OrderResponse___2
successbooleanmessagestringcodestringdataapp__api__v1__schemas__inventory__inventory__OrderResponse
/api/v1/purchase-ordersCreate a new purchase order for inventory restocking.
Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.
Schema: InventoryOrderCreate
vendor_idstringrequiredVendor UUID.
statusstringrequiredOrder status (draft, submitted, confirmed, received, cancelled).
namestringrequiredOrder name/title.
po_numberstringrequiredPurchase order number.
line_itemsarray · LineItemProducts being ordered.
feesarray · FeeAdditional fees (shipping, handling, etc.).
paymentsarray · Payment-InputPayments made on this order.
descriptionstringOrder notes.
totalintegerTotal order amount in cents (calculated if not provided).
balanceintegerRemaining balance in cents (total minus payments).
shipping_costintegerFreight/shipping cost in cents.
ship_from_location_idstringSource location; defaults to vendor.default_location_id.
ship_to_location_idstringDestination location.
production_run_idstringLinked production run (for copacker orders).
expected_delivery_datestring · dateExpected delivery date (YYYY-MM-DD).
payment_term_idstringPayment term ID for net terms (defaults to vendor's).
expected_paid_onstring · dateExpected payment date (YYYY-MM-DD). Auto-calculated from delivery + net terms if not provided.
Schema: app__core__success__SuccessEnvelope_OrderResponse___2
successbooleanmessagestringcodestringdataapp__api__v1__schemas__inventory__inventory__OrderResponseSchema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.