---
title: "Create a credit note (Gutschrift) for an issued invoice"
method: POST
path: "/invoices/{id}/credit-note"
tags: ["Invoices"]
---

# Create a credit note (Gutschrift) for an issued invoice

`POST /invoices/{id}/credit-note`

## Request

- Base URL: `https://api.lumabill.ch/v1`
- URL: `https://api.lumabill.ch/v1/invoices/{id}/credit-note`
- Auth: HTTP bearer

Creates a credit note linked to the invoice, in the profile's credit note number series, with the invoice's client, currency and VAT settings. Without `items` it credits the whole invoice (every line with its quantity negated). `issue: true` issues it right away: in double-entry mode revenue, receivable and output VAT are reversed on the credit note date, which is also the VAT period of the correction. `settle: true` (implies issue) sets it off against the invoice's open amount; `issue` + `settle` on a full credit cancels the invoice in one step. An invoice can no longer be issued with a negative total: this is the way to correct one.

## Request body

- object
  - `items` object[]: Credited lines with NEGATIVE quantities (default - the invoice's lines negated)
  - `date` string, date: Credit note date (default today)
  - `issue` boolean
  - `settle` boolean
  - `exchangeRate` number, double: Foreign-currency credit note only: CHF per 1 unit of its currency, stored as a manual rate, exactly like `exchangeRate` on an invoice. Omit to use the ESTV/BAZG rate of the credit note date; issuing without any rate is refused with 400 FX_RATE_UNAVAILABLE (nothing written).

## Response `201`

Credit note created

- object
  - `id` string, uuid
  - `invoiceNumber` string, nullable: null for a draft credit note (numbered in the credit note series when issued)
  - `status` 'DRAFT' | 'SENT'
  - `sourceInvoiceId` string, uuid
  - `allocations` CreditAllocation[]
    - `id` string, uuid
    - `creditNoteId` string, uuid
    - `creditNoteNumber` string
    - `invoiceId` string, uuid
    - `invoiceNumber` string
    - `amount` number
    - `date` string, date

## Other responses

- `400`: Validation error
- `401`: Invalid or missing API key
- `404`: Resource not found
- `500`: Internal server error

---

[API](https://skmtc.dev/lumabill/apis/lumabill-api.md) · [All operations](https://skmtc.dev/lumabill/apis/lumabill-api/llms.txt) · [OpenAPI document](https://skmtc.dev/lumabill/apis/lumabill-api/revisions/e48e7099b545?raw)
