Update a credit note
sales:invoices.writehttps://api.holded.com/api/v2/credit-notes/{creditNoteId}Replaces all mutable fields of an existing credit note. This is a full replacement — any field you omit will be reset to its default value. To avoid accidentally clearing data, first fetch the credit note with GET, modify the fields you need, and send back the full object.
Parameters
Path parameters
stringrequiredCredit Note ID (24-char hex ObjectId)
Request body
Issue date in ISO 8601 format. Accepts date (YYYY-MM-DD) or datetime (e.g. 2026-01-15T00:00:00+00:00)
Payment due date in ISO 8601 format. Accepts date (YYYY-MM-DD) or datetime (e.g. 2026-01-15T00:00:00+00:00)
Line items to include
Kind of line. `product` and `service` are billable lines whose amount (`units` × `price`, less `discount`, plus `taxes`) is added to the document total. `title` is a section-header line that shows only its `name` and carries no amount — it does not contribute to the total. Other values are special-purpose lines. Omit this field for an ordinary priced line item.
productshippingtitleroundingrefundecotaxwrappingserviceIdentifier of an existing catalog product to link this line to. The id is stored as a reference associating the line with the product (used for stock and reporting). Each line field (`price`, `taxes`, ...) is taken as sent; api2 stores the line values you provide and does not itself read them back from the product record. Leave unset for a free-text line that is not a catalog product.
Identifier of the variant of `product_id` to link this line to. Requires `product_id`. Leave unset for a line without variant.
Tax keys applied to this line. When omitted, the contact default tax applies, or, if the contact has none, the account default tax when the request asks for it, else no tax.
Whether this line is a supply expense (suplido) paid on behalf of the client. Excluded from the tax base.
Identifier of the design template to apply to the document
Structured shipping address. Omit to leave unchanged (update) or unset (create). Pass null to clear it. The address fields (name, address_line_1, city, ...) are only used with type=manual; with billing, hidden or contact they are ignored. Use type=contact with contact_address_id to point to an address saved on the contact.
Address mode: manual (uses the address fields), billing (the billing address of the contact), hidden (no address displayed) or contact (an address saved on the contact, requires contact_address_id)
billinghiddenmanualcontactName of the shipping recipient (the given name when family_name is also sent)
Family name of the shipping recipient
Company or organization of the shipping recipient
Primary address line
Secondary address line
City or locality
Postal or ZIP code
State, province, or region
Country name
ISO 3166-1 alpha-2 country code
Contact email for shipping
Contact phone number for shipping
Mobile number for shipping
Identifier of an address saved on the contact (shipping_id in the contact shipping_addresses). Required when type is contact
Request
import requests
url = "https://api.holded.com/api/v2/credit-notes/{creditNoteId}"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"date": "2026-01-15",
"due_date": "2026-01-31",
"items": [
{
"name": "string",
"type": "product",
"description": "string",
"product_id": "string",
"variant_id": "string",
"units": 0,
"price": 0,
"discount": 0,
"taxes": [
"s_iva_21"
],
"sku": "string",
"account": "string",
"project_id": "string",
"unit_type": "string",
"supplied": false
}
],
"design_id": "string",
"shipping_address": {
"type": "manual",
"name": "string",
"family_name": "string",
"organization": "string",
"address_line_1": "string",
"address_line_2": "string",
"city": "string",
"postal_code": "string",
"province": "string",
"country": "string",
"country_code": "ES",
"email": "string",
"phone": "string",
"mobile": "string",
"contact_address_id": "string"
}
}
response = requests.put(url, headers=headers, json=payload)
print(response.json())Responses
Response
{
"id": "string"
}Success responses
200Credit note updatedapplication/jsonError responses
400Bad requestapplication/json401Invalid or missing API keyapplication/json403Insufficient permissionsapplication/json404Credit note not foundapplication/json429Rate limit exceededapplication/json500Internal server errorapplication/json