201Successful Response
Schema: app__core__success__SuccessEnvelope_OrderResponse___1
successbooleanmessagestringcodestringdataapp__api__v1__schemas__orders__OrderResponse
/api/v1/ordersCreate a new draft order with per-line billing rules.
Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.
Schema: OrderCreate
customer_idstringrequiredCustomer the order is for.
project_idstringProject / job (optional).
order_descriptionstringOrder description.
order_start_datestringOrder start (YYYY-MM-DD).
first_invoice_datestringFirst invoice date (YYYY-MM-DD); anchors the term clock.
term_monthsintegerTerm length in months.
discount_centsintegerContract-level discount (cents).
tax_treatmentstringTax treatment label.
currencystringCurrency code.
linesarray · OrderLineInputOrderLineInputOrder-form lines.
catalog_item_idstringCatalog item this line is based on (optional).
descriptionstringLine description.
qtynumber | stringrequiredOrdered quantity / hours (up to 2 decimal places).
unit_price_centsnumber | stringrequiredUnit price in cents; up to 2 decimal places of a cent for sub-cent rates (e.g. 5.25 = $0.0525).
billing_rulestringflat, per_unit, recurring, usage_metered, or prepaid_block.
billing_timingstringRecurring only: each_period, first_upfront, all_upfront.
ramp_scheduleobjectPre-agreed step qty/price schedule (frozen at signing).
Schema: app__core__success__SuccessEnvelope_OrderResponse___1
successbooleanmessagestringcodestringdataapp__api__v1__schemas__orders__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.
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.