Updates a Financial document

Update a purchase financial document with PUT semantics: read the document, modify it, and send the complete resource back — the fields are replaced as sent. Status transitions are accepted and have their real side effects. Fields required on a validated document are only enforced when the document is validated (validated_at present in the payload), not before.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Identifier of the financial document to update.

Body Params
string
required

Company identifier, as returned by the credentials endpoint (/resources/api_public/credentials).

string
required

Identifier of the financial document to update.

string

Document currency (ISO 4217).

integer

Total amount in cents. Ignored when line_items are provided, since the line items own the totals.

string

Document number. Must be unique per vendor for purchases; a duplicate returns a 409 with the same machine-readable invoice_number error key as the create endpoint.

string

Document date.

string

Due date.

string
enum
required

Status of the document. Transitions have real side effects: sent_to_pay enqueues a payment request in Factorial, and paid marks the document as paid (manual payment). Once a document is sent_to_pay, its payment lifecycle is owned by the payment flow in Factorial — do not set paid manually on it; the payment reconciliation does.

Allowed:
string

Validation timestamp, as returned by the read endpoint (e.g. 2020-01-01T00:00:00.000Z). Setting it on a not-yet-validated document validates it: the strict required-field set (currency, amounts, document number, dates, vendor, legal entity) is enforced on that transition, not before.

taxes
array
required

Tax breakdown, as returned by the read endpoint — send back what you read (adjusted to your changes). Replaced as sent; ignored when line_items are provided, since the line items own the totals.

taxes*
line_items
array

Purchase-invoice line items. Rows are addressed by id, never by position: rows carrying an id update the matching line item, rows without an id create new ones, and persisted rows missing from the set are deleted. Send an empty array to remove all line items, or omit the field entirely to leave them untouched. When present they own the document totals.

line_items
string
string

Vendor identifier (Finance contact).

string
enum

Type of the financial document. One of invoice, credit_note, receipt.

Allowed:
string

For credit notes, the referenced original document by internal id (e.g. 135).

string

Free-text internal notes about the financial document. Kept unchanged when the field is absent.

Response

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json