Update an existing DRAFT invoice for the authenticated company.
Updates a DRAFT invoice identified by <code>invoice.id</code> in the request body. Only invoices in <code>DRAFT</code> status can be updated — any other status returns 400. If the incoming <code>status</code> is <code>INVOICED</code> or <code>SENT</code>, the invoice is booked into KLARA accounting and inventory transactions are created, identical to the booking behavior of <code>POST /core/v1/invoices</code>. This is the call that finalizes a DRAFT — the GUI equivalent of posting in the final step; <strong>status is caller-controlled</strong>, so keep it <code>DRAFT</code> to re-save without booking. <strong>This endpoint does not send/deliver the invoice</strong> (no email/ePost/eBill/print&send), regardless of <code>postMethod</code>; retrieve the PDF via <code>POST /core/v1/invoices/{id}/printed-document</code> and deliver it yourself. The caller must hold the <code>FINANCE</code> permission on the target company.<br/><br/><strong>Important — finalizing a DRAFT books it without a printed invoice.</strong> Setting <code>status=INVOICED</code>/<code>SENT</code> here creates the accounting booking but <strong>renders/stores no PDF</strong>. To attach the printed invoice to the booking, after this call run (1) <code>POST /core/v1/invoices/{id}/printed-document</code> to render and store the <code>printedFileId</code>, then (2) <code>PUT /core/v1/bookings/{id}/documents</code> to link that <code>printedFileId</code> (in <code>documentIds</code>) to the booking from <code>bookingNumbers</code>.
Request
- Base URL: https://api.klara.ch
- URL: https://api.klara.ch/core/v1/invoices
- Auth: one of:
- API key in header X-API-KEY
- HTTP bearer
Query parameters
When <code>true</code>, allows save/booking even if the document date falls inside a closing or closed fiscal year. Defaults to false.
Request body
Example request
{
"orderType": "INVOICE",
"status": "INVOICED",
"invoiceCode": "INV-2026-001",
"invoiceNumber": 2026001,
"documentDate": "2026-05-28",
"paymentDate": "2026-06-27",
"deliveryDate": "2026-05-25",
"issuedDate": "2026-05-28",
"servicePeriodFrom": "2026-05-01",
"servicePeriodTo": "2026-05-31",
"servicePeriodPattern": "MONTHLY",
"amount": 1080,
"usingVAT": true,
"hasCompanyVat": true,
"subject": "Invoice 2026-001",
"closeAndSignature": "Thank you for your business.",
"ourReference": "ACC-2026",
"yourReference": "PO-9981",
"companyCityAndDate": "Zurich, 28.05.2026",
"postMethod": "SEND_EMAIL",
"delivery": "DHL",
"ibanNumberCHF": "CH9300762011623852957",
"ibanNumberCHW": "CH9300762011623852957",
"referenceNumber": "21 00000 00003 13947 14300 09017",
"qrInvoice": true,
"invoiceType": "MANUAL",
"originDistributionMethod": "SEND_EMAIL",
"order": {
"orderNumber": 2026001,
"orderName": "Consulting Q2 2026",
"companyId": 12345,
"customer": {
"id": 50123,
"customerType": "COMPANY",
"companyId": 12345,
"company": {
"id": 50123,
"name": "Muster AG",
"addresses": [
{
"type": "COMPANY",
"addressType": "MAIN",
"salutation": "MALE",
"firstName": "Hans",
"lastName": "Muster",
"companyName": "Muster AG",
"street": "Bahnhofstrasse",
"homeNumber": "12a",
"additionalAddress": "c/o Finance Department",
"addressLines": "Bahnhofstrasse 12a",
"city": {
"id": 4247,
"addressPostcode": "8005",
"cityName18": "Zuerich",
"cityName27": "Zuerich",
"onrp": 4247,
"postcodeType": 20,
"additionalPostcode": "00",
"basicPostcode": 8005,
"languageCode": 1,
"state": {
"id": 26,
"code": "ZH",
"description": "Zuerich"
},
"country": {
"id": 1,
"countryName": "Switzerland",
"iso2Code": "CH",
"iso3Code": "CHE",
"phoneCode": "41",
"numericCode": "756"
}
},
"validFrom": "2026-01-01",
"validTo": "2026-12-31"
}
],
"emails": [
{
"id": "1001",
"emailAddress": "billing@muster.ch",
"type": "WORK"
}
],
"phones": [
{
"id": 2001,
"phoneNumber": "+41 44 123 45 67",
"type": "WORK"
}
],
"companyBillingAddress": {
"type": "COMPANY",
"addressType": "MAIN",
"salutation": "MALE",
"firstName": "Hans",
"lastName": "Muster",
"companyName": "Muster AG",
"street": "Bahnhofstrasse",
"homeNumber": "12a",
"additionalAddress": "c/o Finance Department",
"addressLines": "Bahnhofstrasse 12a",
"city": {
"id": 4247,
"addressPostcode": "8005",
"cityName18": "Zuerich",
"cityName27": "Zuerich",
"onrp": 4247,
"postcodeType": 20,
"additionalPostcode": "00",
"basicPostcode": 8005,
"languageCode": 1,
"state": {
"id": 26,
"code": "ZH",
"description": "Zuerich"
},
"country": {
"id": 1,
"countryName": "Switzerland",
"iso2Code": "CH",
"iso3Code": "CHE",
"phoneCode": "41",
"numericCode": "756"
}
},
"validFrom": "2026-01-01",
"validTo": "2026-12-31"
},
"corporateIdentificationNumber": "CHE-123.456.789",
"vatNumber": "CHE-123.456.789 MWST",
"hrNumber": "CH-020.3.926.481-3",
"nogaCode": "620100",
"companyNumber": "C-0001",
"companyOriginReference": "ERP-4711",
"website": "https://www.muster.ch",
"language": "de"
},
"person": {
"id": 50124,
"salutation": "MALE",
"firstName": "Hans",
"lastName": "Muster",
"birthday": "1980-04-17",
"addressList": [
{
"type": "COMPANY",
"addressType": "MAIN",
"salutation": "MALE",
"firstName": "Hans",
"lastName": "Muster",
"companyName": "Muster AG",
"street": "Bahnhofstrasse",
"homeNumber": "12a",
"additionalAddress": "c/o Finance Department",
"addressLines": "Bahnhofstrasse 12a",
"city": {
"id": 4247,
"addressPostcode": "8005",
"cityName18": "Zuerich",
"cityName27": "Zuerich",
"onrp": 4247,
"postcodeType": 20,
"additionalPostcode": "00",
"basicPostcode": 8005,
"languageCode": 1,
"state": {
"id": 26,
"code": "ZH",
"description": "Zuerich"
},
"country": {
"id": 1,
"countryName": "Switzerland",
"iso2Code": "CH",
"iso3Code": "CHE",
"phoneCode": "41",
"numericCode": "756"
}
},
"validFrom": "2026-01-01",
"validTo": "2026-12-31"
}
],
"emailList": [
{
"id": "1001",
"emailAddress": "billing@muster.ch",
"type": "WORK"
}
],
"phoneList": [
{
"id": 2001,
"phoneNumber": "+41 44 123 45 67",
"type": "WORK"
}
],
"personNumber": "P-0001",
"personOriginReference": "ERP-8150",
"website": "https://www.muster.ch",
"language": "de"
},
"termsOfPayment": 30,
"priceCategory": "STANDARD",
"uuid": "0d9f4d1e-4a2b-4c8d-9f3e-1b2c3d4e5f60"
},
"invoiceGroup": "DEFAULT"
},
"orderItems": [
{
"position": 1,
"itemNumer": "P0000061123",
"description": "Consulting services",
"articleExtendedDescription": "Sprint 12, May 2026",
"quantity": 10,
"unit": "Hour",
"price": 100,
"amount": 1000,
"posAmount": 1000,
"vat": {
"id": 1,
"vatCode": "1",
"rate": 8.1,
"description": "Normal rate 8.1%",
"validFrom": "2024-01-01",
"validTo": "2099-12-31"
},
"vatCode": "1",
"vatCase": "TAXABLE_SUPPLY",
"articleType": "SERVICE",
"tag": "3400",
"servicePeriodFrom": "2026-05-01",
"servicePeriodTo": "2026-05-31",
"servicePeriodPattern": "MONTHLY",
"specialRates": "SSS1",
"articleSet": "SET-001",
"inventorySelections": [
{
"storagePlaceId": 77,
"quantity": 1,
"serialNumbers": [
"SN-0001",
"SN-0002"
]
}
]
}
],
"attachments": [
{
"fileId": "5f8d0d55-b1a4-4d6e-9a1f-2c3b4d5e6f70"
}
],
"openPositionsLinkedToInvoice": [
{
"bookingTypeCode": "AR_PREPAYMENT",
"bookingDetailUri": "/luz_accounting/api/klara_tenant/companies/12345/bookings/778/booking-details/9912",
"partialPaymentAmount": 250
}
],
"documentAddress": {
"customerId": 50123,
"customerType": "COMPANY",
"address": {
"type": "COMPANY",
"addressType": "MAIN",
"salutation": "MALE",
"firstName": "Hans",
"lastName": "Muster",
"companyName": "Muster AG",
"street": "Bahnhofstrasse",
"homeNumber": "12a",
"additionalAddress": "c/o Finance Department",
"addressLines": "Bahnhofstrasse 12a",
"city": {
"id": 4247,
"addressPostcode": "8005",
"cityName18": "Zuerich",
"cityName27": "Zuerich",
"onrp": 4247,
"postcodeType": 20,
"additionalPostcode": "00",
"basicPostcode": 8005,
"languageCode": 1,
"state": {
"id": 26,
"code": "ZH",
"description": "Zuerich"
},
"country": {
"id": 1,
"countryName": "Switzerland",
"iso2Code": "CH",
"iso3Code": "CHE",
"phoneCode": "41",
"numericCode": "756"
}
},
"validFrom": "2026-01-01",
"validTo": "2026-12-31"
},
"salutation": "MALE",
"personFirstName": "Hans",
"personLastName": "Muster",
"companyName": "Muster AG"
},
"mailingAddress": {
"customerId": 50123,
"customerType": "COMPANY",
"address": {
"type": "COMPANY",
"addressType": "MAIN",
"salutation": "MALE",
"firstName": "Hans",
"lastName": "Muster",
"companyName": "Muster AG",
"street": "Bahnhofstrasse",
"homeNumber": "12a",
"additionalAddress": "c/o Finance Department",
"addressLines": "Bahnhofstrasse 12a",
"city": {
"id": 4247,
"addressPostcode": "8005",
"cityName18": "Zuerich",
"cityName27": "Zuerich",
"onrp": 4247,
"postcodeType": 20,
"additionalPostcode": "00",
"basicPostcode": 8005,
"languageCode": 1,
"state": {
"id": 26,
"code": "ZH",
"description": "Zuerich"
},
"country": {
"id": 1,
"countryName": "Switzerland",
"iso2Code": "CH",
"iso3Code": "CHE",
"phoneCode": "41",
"numericCode": "756"
}
},
"validFrom": "2026-01-01",
"validTo": "2026-12-31"
},
"salutation": "MALE",
"personFirstName": "Hans",
"personLastName": "Muster",
"companyName": "Muster AG"
},
"emailDistribution": {
"subject": "Invoice INV-2026-001",
"emailAddress": "billing@muster.ch",
"ccEmailAddresses": [
"accounting@muster.ch"
],
"replyTo": "finance@my-company.ch",
"emailText": "Please find our invoice attached."
},
"printedFileId": "5f8d0d55-b1a4-4d6e-9a1f-2c3b4d5e6f70"
}Response
Invoice updated successfully.
Example response
{
"orderType": "INVOICE",
"status": "INVOICED",
"invoiceCode": "INV-2026-001",
"invoiceNumber": 2026001,
"documentDate": "2026-05-28",
"paymentDate": "2026-06-27",
"deliveryDate": "2026-05-25",
"issuedDate": "2026-05-28",
"servicePeriodFrom": "2026-05-01",
"servicePeriodTo": "2026-05-31",
"servicePeriodPattern": "MONTHLY",
"amount": 1080,
"usingVAT": true,
"hasCompanyVat": true,
"subject": "Invoice 2026-001",
"closeAndSignature": "Thank you for your business.",
"ourReference": "ACC-2026",
"yourReference": "PO-9981",
"companyCityAndDate": "Zurich, 28.05.2026",
"postMethod": "SEND_EMAIL",
"delivery": "DHL",
"ibanNumberCHF": "CH9300762011623852957",
"ibanNumberCHW": "CH9300762011623852957",
"referenceNumber": "21 00000 00003 13947 14300 09017",
"qrInvoice": true,
"invoiceType": "MANUAL",
"originDistributionMethod": "SEND_EMAIL"
}Changes
No recorded changes to this operation across all 1 revision of this API.