Skip to main content
Scope: payables:write  ·  Idempotency-Key: optional Submits a draft the business created. It runs the same submit as the Cleo web app, so the business’s approval rules apply. The body is optional. Use it to answer custom fields before the bill is submitted.
Behavior change. The API used to skip required custom fields on submit. Now every required bill-level field needs an answer, stored on the draft or sent in this request. Without one, the call fails with 422 validation_error and the bill stays a draft.
string
required
The draft’s id.

Body

array
Answers to the business’s bill-level (ROOT) custom fields: [{ fieldId, value }]. Each answer replaces the draft’s stored answer to the same field. The draft’s other answers stay. See Write answers for the value shapes.
array
Answers to line-level (INVOICE_ITEM) custom fields, by line item: [{ id, customFields }]. id is the line item’s id from the payable’s items. Each answer replaces the line’s stored answer to the same field. Lines you leave out keep their answers. The lines themselves are not changed.
Unknown fields answer 400 validation_error.

Required custom fields

Every required, turned-on bill-level field must have an answer after your answers are merged with the stored ones. The 422 names each missing field by label and id. Answers are checked before anything is written, so a refused request changes nothing.

Example

A draft whose required fields are already answered needs no body:

Response

200 with the payable, including items, attachments and the merged customFields.

Errors