Credit notes
Credits against invoices.
Paths are relative to https://evenbooks.org/api/v1. How keys, errors, paging and versions work is in the guide; the whole reference is also an OpenAPI 3.1 document.
Administrator key marks endpoints that need a key with the admin role, Write access those a read-only key can’t call, and Idempotent those that accept an idempotency key.
List credit notes
/credit-notesCredit notes are credits you give a customer, used against their invoices or refunded. Newest issue date first unless sort and dir say otherwise. List items leave lines empty and omit allocations: get one credit note for those.
Parameters
limitintegerquerycursorstring · PageCursorquerysortstringqueryOne of:
issueDatenumbertotalcustomerdirstring · SortDirectionqueryOne of:
ascdescstatusstring · DocumentStatusqueryOne of:
draftissuedpaidvoidcontactIdstring · Uuidqueryfromstring · PlainDateStringquerytostring · PlainDateStringqueryqstringquery
Response 200
A page of CreditNoteDto ({ items, nextCursor, total }, see paging).
Errors 400 · 401 · 403 · 404 · 409 · 429
Create a draft credit note
/credit-notesA draft has no number and is not in the books yet; issue it with POST /credit-notes/{id}/issue. invoiceId links it to an issued invoice of the same customer (for reference; applying it is a separate step). The customer’s details are copied onto the credit note.
Request body
CreateCreditNoteInput
contactIdstring · UuidrequiredinvoiceIdstring · Uuid or nullissueDatestring · PlainDateStringrequiredreasonstring or nulllinesarray of DocumentLineInputrequiredShow 7 fields of each item
itemIdstring · Uuid or nulldescriptionstringrequiredquantitystring · NonNegativeDecimalStringunitPricestring · DecimalStringrequireddiscountDiscountInput or nullincomeAccountIdstring · UuidrequiredtaxRateIdsarray of string · Uuid
documentDiscountDiscountInput or nullShow 2 fields
typestringrequiredOne of:
percentfixedvaluestring · NonNegativeDecimalStringrequired
Response 200
CreditNoteDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Get a credit note
/credit-notes/{id}Includes its lines and its allocations (amounts applied to invoices).
Parameters
idstring (uuid)path · required
Response 200
CreditNoteDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Change a draft credit note
/credit-notes/{id}Drafts only (409 immutable once issued). Send version from your last read (409 version_conflict if it changed). Omitted fields stay as they are; lines, when sent, replace all lines.
Parameters
idstring (uuid)path · required
Request body
UpdateCreditNoteInput
contactIdstring · UuidinvoiceIdstring · Uuid or nullissueDatestring · PlainDateStringreasonstring or nulllinesarray of DocumentLineInputShow 7 fields of each item
itemIdstring · Uuid or nulldescriptionstringrequiredquantitystring · NonNegativeDecimalStringunitPricestring · DecimalStringrequireddiscountDiscountInput or nullincomeAccountIdstring · UuidrequiredtaxRateIdsarray of string · Uuid
documentDiscountDiscountInput or nullShow 2 fields
typestringrequiredOne of:
percentfixedvaluestring · NonNegativeDecimalStringrequired
versionintegerrequired
Response 200
CreditNoteDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Delete a draft credit note
/credit-notes/{id}Only drafts can be deleted (409 immutable otherwise). Void an issued credit note instead.
Parameters
idstring (uuid)path · required
Response 204
Done; no body
No body.
Errors 400 · 401 · 403 · 404 · 409 · 429
Apply a credit note to invoices
/credit-notes/{id}/applyUses the credit to pay down invoices of the same customer: each allocation lowers that invoice’s balance and the credit note’s, and posts to the books on date (default: the credit note date). The total cannot exceed what is left on the credit note (400 over_allocation). Issued credit notes only; needs version from your last read; refused in a locked period (409 period_locked).
Parameters
idstring (uuid)path · required
Request body
ApplyCreditNoteInput
versionintegerrequireddatestring · PlainDateStringallocationsarray of PaymentAllocationInputrequiredShow 2 fields of each item
invoiceIdstring · Uuidrequiredamountstring · PositiveDecimalStringrequired
idempotencyKeystring · IdempotencyKey
Response 200
CreditNoteDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Issue a credit note
/credit-notes/{id}/issueGives the draft the next credit note number and posts it to the books on its issue date (income and sales tax reduced, the customer holds a credit). With applyToInvoiceId it is applied to that invoice at once, up to the invoice’s balance. Send version from your last read (409 version_conflict); the total must be above zero, and a locked period is refused (409 period_locked).
Parameters
idstring (uuid)path · required
Request body
IssueCreditNoteInput
versionintegerrequiredapplyToInvoiceIdstring · Uuid or nullidempotencyKeystring · IdempotencyKey
Response 200
CreditNoteDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Void a credit note
/credit-notes/{id}/voidCancels an issued credit note by posting a reversing entry on date (default: its issue date). Refused once any of it is applied to invoices or refunded (409 invalid_state); void its refunds first. Needs version from your last read; refused in a locked period (409 period_locked). Delete a draft instead.
Parameters
idstring (uuid)path · required
Request body
VoidInvoiceInput (fields under Schemas)
Response 200
CreditNoteDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Schemas
The types these endpoints take or return, by name. Type names above link here.
Address
line1stringoptionalline2stringoptionalcitystringoptionalregionstringoptionalpostalCodestringoptionalcountrystringoptional
AllocationDto
idstringsourceTypestringOne of:
paymentcredit_notepaymentIdstring or nullcreditNoteIdstring or nullinvoiceIdstringinvoiceNumberstring or nulloptionalamountstring · DecimalStringdatestring · PlainDateStringstatusstringOne of:
activereversedjournalEntryIdstring or nullreversalJournalEntryIdstring or nullsourceLabelstringoptional
CreditNoteDto
idstringnumberstring or nullstatusstring · DocumentStatusOne of:
draftissuedpaidvoidcontactIdstringcontactNamestringoptionalinvoiceIdstring or nullinvoiceNumberstring or nulloptionalcustomerSnapshotCustomerSnapshotDtoissueDatestring · PlainDateStringreasonstring or nulldocumentDiscountDiscount or nullcurrencystringsubtotalstring · DecimalStringdiscountTotalstring · DecimalStringnetTotalstring · DecimalStringtaxTotalstring · DecimalStringtotalstring · DecimalStringtaxSummaryarray of TaxSummaryDtoamountUsedstring · DecimalStringbalancestring · DecimalStringjournalEntryIdstring or nullvoidJournalEntryIdstring or nullvoidReasonstring or nulllinesarray of DocumentLineDtoallocationsarray of AllocationDtooptionalversionintegercreatedAtstring
CustomerSnapshotDto
namestringemailstring or nulloptionalphonestring or nulloptionaladdressAddressoptional
DecimalString
decimal string
string
Discount
typestringOne of:
percentfixedvaluestring · NonNegativeDecimalString
DiscountInput
typestringrequiredOne of:
percentfixedvaluestring · NonNegativeDecimalStringrequired
DocumentLineDto
idstringlineNointegeritemIdstring or nulldescriptionstringquantitystringunitPricestringdiscountDiscount or nullincomeAccountIdstringincomeAccountNamestringoptionaltaxRateIdsarray of stringtaxesarray of LineTaxDtogrossstring · DecimalStringlineDiscountstring · DecimalStringdocumentDiscountSharestring · DecimalStringnetstring · DecimalStringtaxTotalstring · DecimalStringtotalstring · DecimalString
DocumentLineInput
itemIdstring · Uuid or nulldescriptionstringrequiredquantitystring · NonNegativeDecimalStringunitPricestring · DecimalStringrequireddiscountDiscountInput or nullincomeAccountIdstring · UuidrequiredtaxRateIdsarray of string · Uuid
DocumentStatus
string
One of: draft issued paid void
IdempotencyKey
string
LineTaxDto
taxRateIdstringnamestringratestringamountstring · DecimalString
NonNegativeDecimalString
string
PageCursor
string
PaymentAllocationInput
invoiceIdstring · Uuidrequiredamountstring · PositiveDecimalStringrequired
PlainDateString
string
PositiveDecimalString
string
SortDirection
string
One of: asc desc
TaxSummaryDto
taxRateIdstringnamestringratestringtaxablestring · DecimalStringamountstring · DecimalStringliabilityAccountIdstring
Uuid
string (uuid)
VoidInvoiceInput
versionintegerrequiredreasonstringrequireddatestring · PlainDateStringidempotencyKeystring · IdempotencyKey