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.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
