Skip to content

Create order

POST/api/v1/orders

Create a new draft order with per-line billing rules.

Operation ID: create_order_orders·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

customer_idstringrequired

Customer the order is for.

project_idstring

Project / job (optional).

order_descriptionstring

Order description.

order_start_datestring

Order start (YYYY-MM-DD).

first_invoice_datestring

First invoice date (YYYY-MM-DD); anchors the term clock.

term_monthsinteger

Term length in months.

discount_centsinteger

Contract-level discount (cents).

tax_treatmentstring

Tax treatment label.

currencystring

Currency code.

linesarray · OrderLineInputOrderLineInput

Order-form lines.

7 fields
catalog_item_idstring

Catalog item this line is based on (optional).

descriptionstring

Line description.

qtynumber | stringrequired

Ordered quantity / hours (up to 2 decimal places).

unit_price_centsnumber | stringrequired

Unit price in cents; up to 2 decimal places of a cent for sub-cent rates (e.g. 5.25 = $0.0525).

billing_rulestring

flat, per_unit, recurring, usage_metered, or prepaid_block.

billing_timingstring

Recurring only: each_period, first_upfront, all_upfront.

ramp_scheduleobject

Pre-agreed step qty/price schedule (frozen at signing).

Responses

201Successful Response

successboolean
messagestring
codestring
dataapp__api__v1__schemas__orders__OrderResponse

400Bad Request - Invalid input

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

401Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

403Forbidden - Insufficient permissions

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

404Not Found - Resource does not exist

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

422Validation Error

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.