Sales Invoice - Update
Update one sales invoice by ID. Precondition: invoice must be editable (draft state). If invoice is locked by status/workflow, API returns `423`.
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 sales invoice. If the ID is not known, use invoicing_sales_invoices_list with relevant filters and/or the search parameter to locate the sales invoice.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PATCH "https://example.com/v1/invoicing/string/invoice/0/" \ -H "Content-Type: application/json" \ -d '{ "description": "Updated invoice description" }'{ "id": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "friendly_name": "string", "receiver": 0, "receiver_info": { "id": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "customer_id": "string", "type": "UNSET", "name": "string", "name_aliases": [ "string" ], "contact_business_id": "string", "xrechnung_buyer_reference": "string", "notes": "string", "phone_number": "string", "is_invoicing_enabled": true, "invoicing_email": "user@example.com", "invoicing_electronic_address": "string", "invoicing_electronic_address_scheme": "string", "invoicing_einvoice_address": "string", "invoicing_einvoice_operator": "string", "invoicing_tax_code": "string", "invoicing_street": "string", "invoicing_city": "string", "invoicing_postal_code": "string", "invoicing_country": "st", "invoicing_language": "fi", "buyer_postal_address_details_xml_override": "string", "can_be_invoiced": true, "can_be_invoiced_via_email": true, "can_be_invoiced_via_einvoice": true }, "contact_person": "string", "invoice_number": 0, "invoicing_date": "2019-08-24", "payment_condition_days": 0, "due_date": "2019-08-24", "reference": "string", "penalty_interest": 0.1, "currency": "string", "vat_country": "string", "description": "string", "is_credit_note_for": 0, "original_invoice_collection": { "invoice_id": 0, "is_registered_to_kravia": true, "kravia_invoice_status": "string", "automatic_debt_collection_status": "NOT_STARTED" }, "credit_notes": [ 0 ], "pdf": { "id": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "file": "http://example.com", "name": "string", "type": "string", "preview": { "image": "http://example.com", "blurhash": "string", "blurhash_w": 0, "blurhash_h": 0 }, "folder_id": 0, "blurhash": "string", "blurhash_w": 0, "blurhash_h": 0, "is_deletable": true, "analysis_badges": [ { "key": "string", "label": "string", "value": "string" } ], "analysis_results": [ { "values": [ { "type": "ATTACHMENT_TYPE", "value": "string" } ], "analysis_data": null } ], "analysis_status": "PENDING", "notes": "string" }, "xrechnung_ubl_xml": "http://example.com", "rows": [ { "id": 0, "code": "string", "name": "string", "unit": "string", "amount": 0.1, "vat_rate": 0.1, "vat_code": 1, "product": 0, "product_count": 0.1, "description": "string", "total_vat_amount": 0.1, "total_amount": 0.1, "account_id": 0 } ], "status": "DRAFT", "total_vat_amount": 0.1, "total_amount": 0.1, "is_editable": true, "is_deletable": true, "is_active_recurrence_template": true, "is_recurrence_active": true, "is_recurrence_end_exceeded": true, "is_recurrence_applied": true, "is_past_due": true, "delivery_method": "EMAIL", "is_sendable": true, "last_delivery_at": "2019-08-24T14:15:22Z", "recurrence_rule": null, "recurrence_parent_id": 0, "recurrence_reference_method": "KEEP", "recurrence_email_subject": "string", "recurrence_email_content": "string", "recurrence_end": "2019-08-24", "next_recurrences": [ "2019-08-24" ], "is_registered_to_kravia": true, "earliest_debt_collection_date": "2019-08-24", "attachments": [ 0 ], "settlement_date": "2019-08-24", "seller_reference": "string", "buyer_reference": "string", "bank_transaction": { "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 }, "payment_date": "2019-08-24", "document": { "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_automatic_debt_collection_enabled": true, "automatic_debt_collection_status": "NOT_STARTED", "external_status_messages": [ { "id": 0, "message": "string" } ], "tag_ids": [ 0 ]}Sales Invoice - Retrieve GET
Retrieve one sales invoice by ID. When an invoice is linked to imported banking data, related bank transaction and document details are included in the response. If ID is unknown, call `invoicing_sales_invoices_list` with `invoice_number` first, then use `search` as fallback.
Sales Invoice - Delete DELETE
Delete one sales invoice by ID.