Draft the next period's invoices

POST/api/v1/contracts/{contract_id}/generate-period-invoices

Draft the next billing period's invoice from recurring (each_period) and per-unit (approved hours x price) order lines. Idempotent per (contract, period): a period already drafted is not re-drafted.

Operation ID: generate_period_invoices_api_v1_contracts__contract_id__generate_period_invoices_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.

Parameters

Path

contract_idstringrequired

Request body

period_datestringrequired

Any date within the billing period to draft (YYYY-MM-DD).

Responses

201Successful Response

successboolean
messagestring
codestring
dataContractInvoiceResult

400Bad Request - Invalid input

401Unauthorized - Authentication required

403Forbidden - Insufficient permissions

404Not Found - Resource does not exist

422Validation Error

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