Customers & vendors
People and businesses you sell to and buy from.
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 customers and vendors
/contactsBy name A–Z unless sort and dir say otherwise. Archived contacts are left out unless includeArchived is set; kind keeps customers or vendors; q searches the name and email.
Parameters
limitintegerquerycursorstring · PageCursorquerysortstringqueryOne of:
namecreatedAtdirstring · SortDirectionqueryOne of:
ascdescqstringquerykindstringqueryOne of:
customervendorincludeArchivedboolean · QueryBooleanquery
Response 200
A page of ContactDto ({ items, nextCursor, total }, see paging).
Errors 400 · 401 · 403 · 404 · 409 · 429
Add a customer or vendor
/contactsA contact is a customer, a vendor or both (isCustomer defaults to true). Invoices need a customer; expenses can name a vendor.
Request body
CreateContactInput
namestringrequiredisCustomerbooleanisVendorbooleanemailstring (email) or nullphonestring or nullbillingAddressAddressInputShow 6 fields
line1stringline2stringcitystringregionstringpostalCodestringcountrystring
notesstring or null
Response 200
ContactDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Get a customer or vendor
/contacts/{id}Parameters
idstring (uuid)path · required
Response 200
ContactDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Change a customer or vendor
/contacts/{id}Omitted fields stay as they are. isArchived: true leaves it out of lists and stops new invoices to it (contacts are archived, not deleted). Send version from your last read (409 version_conflict if it changed). Invoices already issued keep the details they were issued with.
Parameters
idstring (uuid)path · required
Request body
UpdateContactInput
versionintegerrequirednamestringisCustomerbooleanisVendorbooleanemailstring (email) or nullphonestring or nullbillingAddressAddressInputShow 6 fields
line1stringline2stringcitystringregionstringpostalCodestringcountrystring
notesstring or nullisArchivedboolean
Response 200
ContactDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Get what a customer owes
/contacts/{id}/balanceThe customer’s open invoices with their balances, payments with money not yet applied, and credit notes with credit left, plus the totals owed (totalReceivable) and held as credit (totalCredits).
Parameters
idstring (uuid)path · required
Response 200
CustomerBalanceDto
contactIdstringopenInvoicesarray of OpenInvoiceDtounappliedPaymentsarray of objectShow 5 fields of each item
idstringdatestring · PlainDateStringunappliedAmountstring · DecimalStringreferencestring or nullisRefundableDepositboolean
openCreditNotesarray of objectShow 4 fields of each item
idstringnumberstringissueDatestring · PlainDateStringbalancestring · DecimalString
totalReceivablestring · DecimalStringtotalCreditsstring · DecimalString
Errors 400 · 401 · 403 · 404 · 409 · 429
Archive or restore many contacts
/contacts/bulkUp to 100 contacts, each with the version from your last read. A stale version fails only that contact; the response has one result per contact, with the updated contact (and its new version) when it went through.
Request body
BulkContactsInput
actionstringrequiredOne of:
archiveunarchiveitemsarray of objectrequiredShow 2 fields of each item
idstring · Uuidrequiredversionintegerrequired
Response 200
BulkContactsResultDto
resultsarray of objectShow 4 fields of each item
idstringokbooleancontactContactDtooptionalerrorobjectoptionalShow 2 fields
codestringmessagestring
succeededintegerfailedinteger
Errors 400 · 401 · 403 · 404 · 409 · 429
Schemas
The types these endpoints take or return, by name. Type names above link here.
Address
line1stringoptionalline2stringoptionalcitystringoptionalregionstringoptionalpostalCodestringoptionalcountrystringoptional
AddressInput
line1stringline2stringcitystringregionstringpostalCodestringcountrystring
ContactDto
idstringnamestringisCustomerbooleanisVendorbooleanemailstring or nullphonestring or nullbillingAddressAddressnotesstring or nullisArchivedbooleanversionintegercreatedAtstring
DecimalString
decimal string
string
OpenInvoiceDto
idstringnumberstringissueDatestring · PlainDateStringdueDatestring · PlainDateStringtotalstring · DecimalStringbalanceDuestring · DecimalStringisOverdueboolean
PageCursor
string
PlainDateString
string
QueryBoolean
boolean
SortDirection
string
One of: asc desc
Uuid
string (uuid)