Invoice object plus optional InvoiceItem, Payment, Client, etc.); the document type is set to credit note automatically. As a convenience a CreditNote object is also accepted in place of Invoice.Invoice.client_id is required. A credit note is typically issued against a source invoice — set Invoice.subscription_id to that invoice's id (optional). See Add New Invoice for the full reference of the remaining header / item / payment fields and their defaulting.curl --location --globoff 'https://.daftra.com/api2/credit_notes.json' \
--header 'Accept: application/json' \
--header 'apikey: ' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"Invoice": {
"client_id": 15,
"subscription_id": 2415,
"date": "2026-06-25",
"currency_code": "USD",
"store_id": 0,
"notes": "string"
},
"InvoiceItem": [
{
"item": "Consulting service",
"unit_price": 100,
"quantity": 1,
"product_id": 12
}
]
}'{
"result": "successful",
"code": 202,
"id": 5021
}