create-credit-note
Create a draft credit note for the whole of an issued sales invoice (any status except draft). It is how an invoice is reversed, since issued invoices can't be deleted. Returns creditNote with its id, status draft, no number or issue date yet, and an invoice summary. Fails if the invoice already has a credit note that isn't cancelled. Nothing is applied until submit-credit-note; check it with get-credit-note. To reissue a corrected invoice, copy it with duplicate-invoice. Requires the invoice:write scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| companyId | Yes | ID of the company that owns the invoice, as returned by list-companies | |
| invoiceId | Yes | ID of the issued invoice to credit, as returned by list-invoices |