Skip to navigation

Create Bill

View as Markdown

Creates a bill. bill_date, account_number, vendor_id, and items are required. allow_post is optional; when true, the bill is posted immediately after creation (the workspace must have allow_create_and_post enabled, otherwise the request is rejected with 400). Send payment_term_id to put the bill on a payment term, or due_date for a fixed date; the term wins when both are sent. With neither, the vendor’s default term is used when it has one.

Requires the can_create_bill permission on the key owner’s role.

Keys: secret key only.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

identitystring
The identity for the active workspace.

Request

This endpoint expects an object.
itemslist of objectsRequired
bill_datedatetimeRequired
vendor_idstringRequiredformat: "uuid"
due_datedatetimeOptional
payment_term_idstringOptionalformat: "uuid"

Payment term to apply. Takes precedence over due_date. The document’s due dates and any early-payment discount are worked out from the term and returned in payment_schedule.

exchange_ratedoubleOptional
allow_postbooleanOptional
adjustmentslist of objectsOptional

Response

Created
dataobject
statusboolean
messagestring

Errors

401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error