Create credit note

Creates a draft credit note for a customer in the credential-bound company; approving it (creditNote.approve) is a separate action that numbers it and posts it to the ledger. Every line item and surcharge names the income account it credits back by account_id (the chart-of-accounts id from the chart of accounts list: use it when the account has no code) or by account_code; when both are sent they must name the same account. An account_id that is not an active income account of the company is refused with 422 credit_note_line_account_unavailable, naming the line in error.fields. Each line names its tax rule by tax_rule_id (the id from the tax rules list: use it when the rule has no code) or by tax_code; with neither, the account's default tax rule applies, and the rate is always the rule's own. A tax_rule_id that is not a sales or no-VAT tax rule of the company is refused with 422 credit_note_line_tax_rule_unavailable; a tax_rule_id and tax_code that name different rules with 422 credit_note_line_tax_rule_mismatch. Omit number for a new credit note; for a credit note already issued in another system pass its original number in number, never in reference: approval keeps it. A number another credit note already uses is refused with 422 credit_note_number_taken (see the Invoice numbering guide). Send an optional Idempotency-Key to replay the stored response safely for 24 hours. Requires the credit-notes:write OAuth scope.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Fields accepted to create credit note. The schema identifies required and optional values.

uuid
required
date
required
uuid
required
string
enum
required
Allowed:
string | null
string | null
uuid | null
uuid | null

Where returned goods go; empty: the credited invoice's warehouse, else the main one.

uuid | null
uuid | null
date | null
date | null
string | null
enum
Allowed:
integer | null
≥ 0
number | null
0 to 100
string | null

Original number of a credit note issued in another system, never in reference; omit for a new one. A number in use is refused.

line_items
array of objects
required
length ≥ 1
line_items*
Headers
string
required
length ≤ 191

Required unique key whose request hash and terminal response are stored durably for 24 hours.

Responses

Language
Credentials
OAuth2
Missing 1 required scope
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*