---
title: "Update a credit note"
method: PUT
path: "/companies/{companyId}/credit-notes/{creditNoteId}"
tags: ["credit-notes"]
---

# Update a credit note

`PUT /companies/{companyId}/credit-notes/{creditNoteId}`

Updates an existing credit note. Only draft credit notes can be updated.

**Scope:** `credit-notes:write`

## Request body

- CreditNote
  - `id` string, uuid, required — The unique identifier of the credit note
  - `invoiceRef` object — Reference to the original invoice being credited
    - `id` string, uuid — The unique identifier of the original invoice
    - `invoiceNumber` string — The invoice number of the original invoice
  - `customerRef` object
    - `id` string, uuid
    - `name` string
  - `contactDetailRef` object, nullable
    - `id` string, uuid, nullable
    - `email` string, nullable
    - `phone` string, nullable
  - `invoiceNumber` string, nullable — The credit note number
  - `orderNumberReference` string, nullable — The order number associated with the invoice.
  - `projectReference` string, nullable — The project reference associated with the credit note.
  - `buyerReference` string, nullable — The buyer reference associated with the credit note.
  - `contractReference` string, nullable — The contract reference associated with the credit note.
  - `currency` string, required — ISO 4217 currency code
  - `currencyRate` number, double
  - `totalAmount` number, double
  - `totalTax` number, double
  - `paidAmount` number, double
  - `status` 'draft' | 'published' — The status of the credit note
  - `creditDate` string, date, required
  - `dueDate` string, date, required
  - `publishedDateTime` string, date-time, nullable — The date when the credit note was published (null for draft)
  - `lineItems` InvoiceItem[], required
    - union
      - object
        - `id` integer, nullable — Should not be set for new items
        - `itemRef` object, nullable — Identifier of an existing salesItem to use as a template. Fields itemType and quantity are required. Values in other fields will be overridden by values from this referenced item
          - `id` string, uuid — Reference to existing salesItem id
          - `description` string, nullable
        - `description` string, required
        - `itemType` 'salesItem', required
        - `productType` 'goods' | 'services', required
        - `unitType` 'unspecified' | 'piece' | 'hour' | 'day' | 'month' | 'kilogram' | 'gram' | 'liter' | 'meter' | 'centimeter' | 'millimeter' | 'meterSquared' | 'meterCubic' | 'mile' | 'kilometer' | 'gigabyte' | 'hectar' | 'words' | 'year' | 'week' | 'minute' | 'megabyte' | 'ton'
        - `quantity` number, double, required
        - `unitPrice` number, double, required
        - `taxRate` number, double, required
        - `bookkeepingAccountNumber` integer, nullable — Use the `bookkeepingAccountNumber` field in the line items to specify an accounting account other than the account that would be automatically be selected based on the item productType, taxRate, customer and company settings. Accounts that would be automatically selected cannot be set on this field.
        - `taxReduction` LineItemTaxReduction, nullable — Tax reduction details for a line item. Only applicable to line items with productType `services` and unitType `hour` or `unspecified`.
          - `taxReductionType` 'rot' | 'rut', required — The tax reduction type for this line item. Must match the invoice-level taxReduction type.
          - `jobType` 'rotConstruction' | 'rotElectricity' | 'rotGlassPlate' | 'rotSoilWork' | 'rotSweeping' | 'rotPainting' | 'rotPlumbing' | 'rutChildServices' | 'rutDataITServices' | 'rutRemovalServices' | 'rutClothingCare' | 'rutPersonalHelpCare' | 'rutRepair' | 'rutSnow' | 'rutCleaning' | 'rutGardening' | 'rutWaterWashingOfTextiles' | 'rutFurnishing' | 'rutTransportOfHouseholdGoods' | 'rutHousingSupervision', required — The job type categorizing the work. The prefix must match the tax reduction type: - ROT types: rotConstruction, rotElectricity, rotGlassPlate, rotSoilWork, rotSweeping, rotPainting, rotPlumbing - RUT types: rutChildServices, rutDataITServices, rutRemovalServices, rutClothingCare, rutPersonalHelpCare, rutRepair, rutSnow, rutCleaning, rutGardening, rutWaterWashingOfTextiles, rutFurnishing, rutTransportOfHouseholdGoods, rutHousingSupervision
      - object
        - `id` integer, nullable — Should not be set for new items
        - `itemRef` object, nullable — Identifier of an existing descriptionOnlyItem to use as a template. The field itemType is required.
          - `id` string, uuid — Reference to existing descriptionOnlyItem id
          - `description` string, nullable
        - `description` string, required
        - `itemType` 'descriptionOnlyItem', required
  - `billingAddress` AddressWithCountrySubdivision
    - `line1` string, required
    - `line2` string, nullable
    - `city` string, required
    - `postalCode` string, required
    - `country` string, country, required — ISO 3166-1 alpha-2 country code
    - `countrySubdivision` string, nullable — ISO 3166-2 subdivision code (e.g. ENG, SCT, WLS, NIR for GB). Currently required for GB (United kingdom) country.
  - `deliveryAddress` Address
    - `line1` string
    - `line2` string, nullable
    - `city` string
    - `postalCode` string
    - `country` string, country — ISO 3166-1 alpha-2 country code
  - `attachmentRefs` object[], nullable
    - `id` string, uuid
    - `name` string
  - `journalEntryRef` object, nullable
    - `id` string, uuid
  - `metadata` object, nullable — Metadata fields for the invoice as string key-value pairs. These fields can be used for filtering.All metadata keys must start with a letter or underscore and contain only alphanumeric characters and underscores.

## Response `200`

Credit note updated successfully

- CreditNote
  - `id` string, uuid, required — The unique identifier of the credit note
  - `invoiceRef` object — Reference to the original invoice being credited
    - `id` string, uuid — The unique identifier of the original invoice
    - `invoiceNumber` string — The invoice number of the original invoice
  - `customerRef` object
    - `id` string, uuid
    - `name` string
  - `contactDetailRef` object, nullable
    - `id` string, uuid, nullable
    - `email` string, nullable
    - `phone` string, nullable
  - `invoiceNumber` string, nullable — The credit note number
  - `orderNumberReference` string, nullable — The order number associated with the invoice.
  - `projectReference` string, nullable — The project reference associated with the credit note.
  - `buyerReference` string, nullable — The buyer reference associated with the credit note.
  - `contractReference` string, nullable — The contract reference associated with the credit note.
  - `currency` string, required — ISO 4217 currency code
  - `currencyRate` number, double
  - `totalAmount` number, double
  - `totalTax` number, double
  - `paidAmount` number, double
  - `status` 'draft' | 'published' — The status of the credit note
  - `creditDate` string, date, required
  - `dueDate` string, date, required
  - `publishedDateTime` string, date-time, nullable — The date when the credit note was published (null for draft)
  - `lineItems` InvoiceItem[], required
    - union
      - object
        - `id` integer, nullable — Should not be set for new items
        - `itemRef` object, nullable — Identifier of an existing salesItem to use as a template. Fields itemType and quantity are required. Values in other fields will be overridden by values from this referenced item
          - `id` string, uuid — Reference to existing salesItem id
          - `description` string, nullable
        - `description` string, required
        - `itemType` 'salesItem', required
        - `productType` 'goods' | 'services', required
        - `unitType` 'unspecified' | 'piece' | 'hour' | 'day' | 'month' | 'kilogram' | 'gram' | 'liter' | 'meter' | 'centimeter' | 'millimeter' | 'meterSquared' | 'meterCubic' | 'mile' | 'kilometer' | 'gigabyte' | 'hectar' | 'words' | 'year' | 'week' | 'minute' | 'megabyte' | 'ton'
        - `quantity` number, double, required
        - `unitPrice` number, double, required
        - `taxRate` number, double, required
        - `bookkeepingAccountNumber` integer, nullable — Use the `bookkeepingAccountNumber` field in the line items to specify an accounting account other than the account that would be automatically be selected based on the item productType, taxRate, customer and company settings. Accounts that would be automatically selected cannot be set on this field.
        - `taxReduction` LineItemTaxReduction, nullable — Tax reduction details for a line item. Only applicable to line items with productType `services` and unitType `hour` or `unspecified`.
          - `taxReductionType` 'rot' | 'rut', required — The tax reduction type for this line item. Must match the invoice-level taxReduction type.
          - `jobType` 'rotConstruction' | 'rotElectricity' | 'rotGlassPlate' | 'rotSoilWork' | 'rotSweeping' | 'rotPainting' | 'rotPlumbing' | 'rutChildServices' | 'rutDataITServices' | 'rutRemovalServices' | 'rutClothingCare' | 'rutPersonalHelpCare' | 'rutRepair' | 'rutSnow' | 'rutCleaning' | 'rutGardening' | 'rutWaterWashingOfTextiles' | 'rutFurnishing' | 'rutTransportOfHouseholdGoods' | 'rutHousingSupervision', required — The job type categorizing the work. The prefix must match the tax reduction type: - ROT types: rotConstruction, rotElectricity, rotGlassPlate, rotSoilWork, rotSweeping, rotPainting, rotPlumbing - RUT types: rutChildServices, rutDataITServices, rutRemovalServices, rutClothingCare, rutPersonalHelpCare, rutRepair, rutSnow, rutCleaning, rutGardening, rutWaterWashingOfTextiles, rutFurnishing, rutTransportOfHouseholdGoods, rutHousingSupervision
      - object
        - `id` integer, nullable — Should not be set for new items
        - `itemRef` object, nullable — Identifier of an existing descriptionOnlyItem to use as a template. The field itemType is required.
          - `id` string, uuid — Reference to existing descriptionOnlyItem id
          - `description` string, nullable
        - `description` string, required
        - `itemType` 'descriptionOnlyItem', required
  - `billingAddress` AddressWithCountrySubdivision
    - `line1` string, required
    - `line2` string, nullable
    - `city` string, required
    - `postalCode` string, required
    - `country` string, country, required — ISO 3166-1 alpha-2 country code
    - `countrySubdivision` string, nullable — ISO 3166-2 subdivision code (e.g. ENG, SCT, WLS, NIR for GB). Currently required for GB (United kingdom) country.
  - `deliveryAddress` Address
    - `line1` string
    - `line2` string, nullable
    - `city` string
    - `postalCode` string
    - `country` string, country — ISO 3166-1 alpha-2 country code
  - `attachmentRefs` object[], nullable
    - `id` string, uuid
    - `name` string
  - `journalEntryRef` object, nullable
    - `id` string, uuid
  - `metadata` object, nullable — Metadata fields for the invoice as string key-value pairs. These fields can be used for filtering.All metadata keys must start with a letter or underscore and contain only alphanumeric characters and underscores.

## Other responses

- `400` — Bad request
- `404` — Credit note not found

---

[API](https://skmtc.net/bokio/apis/company-api.md) · [All operations](https://skmtc.net/bokio/apis/company-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bokio/company-api/versions/1bb5d09ce15e/schema)
