Document - Update
Update one accounting document by ID. On update, entries are recalculated from the current blueprint payload.
Path Parameters
Business slug that scopes this request. If you do not have one yet, call common_accessible_businesses_list and pick a slug from the response.
Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the search parameter to discover valid IDs.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PATCH "https://example.com/v1/business/string/document/0/" \ -H "Content-Type: application/json" \ -d '{}'{ "id": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "number": "string", "is_flagged": true, "is_locked": true, "is_draft": true, "date": "2019-08-24", "description": "string", "contact_id": 0, "contact_name": "string", "balance": 0.1, "attachment_ids": [ 0 ], "type": 0, "blueprint": { "debet_account_id": 0, "debet_entries": [], "credit_account_id": 0, "credit_entries": [], "expense_entries": [] }, "blueprint_type": "string", "import_data": { "id": 0, "trace_id": "df570c03-5a03-4cea-8df0-c162d05127ac", "algo_status": "INITIAL", "data_source": "string", "identifier": "string", "date": "2019-08-24", "amount": 0.1, "description": "string", "contact_hint": "string", "balance_after_transaction": 0, "reference_number": "string", "payment_account_id": 0 }, "entry_ui_rows": [ { "account_name": "string", "account_number": "string", "vat_code": 1, "vat_rate": "string", "is_debet": true, "amount": 0.1 } ], "audit_trail_last_seen_at": "2019-08-24T14:15:22Z", "audit_trail_has_unseen_actions": true, "audit_trail_last_mention_at": "2019-08-24T14:15:22Z", "audit_trail_last_comment_at": "2019-08-24T14:15:22Z", "tag_ids": [ 0 ], "relations": [ { "id": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "related_document": 0, "related_document_summary": { "property1": null, "property2": null }, "description": "string", "role": "ACCRUAL", "type": "ACCRUAL_PAIR", "source_document_signals": { "property1": null, "property2": null }, "related_document_signals": { "property1": null, "property2": null } } ], "relation_network_signals": "string", "relation_entry_signals": "string", "available_link_kinds": "string", "eu_b2b_vat_details_missing": true, "eu_sale_to_private_person": true, "is_deletable": true, "shortcuts": [ { "key": "string", "is_promoted": true } ]}