Customer
The customer resource.
/customerList customers
Retrieve a paginated list of customers. Filter, order, and select columns with PostgREST query parameters.
Query parameters
selectstringComma-separated columns to return. Defaults to all.
orderstringColumn to sort by, e.g. `createdAt.desc`.
limitintegerMaximum rows to return.
offsetintegerRows to skip, for pagination.
curl --request GET \
--url '<your-host>/customer?select=*&limit=10' \
--header 'Authorization: Bearer <api-key>'[
{
"id": "abc123def456",
"name": "Example",
"companyId": "xyz789",
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-01T00:00:00Z",
"taxPercent": 0,
"readableId": "xyz789",
"onHold": true
}
]/customerRetrieve a customer
Fetch a single customer by filtering on `id`.
Query parameters
idstringMatch on the customer's `id`, e.g. `eq.{id}`.
curl --request GET \
--url '<your-host>/customer?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'{
"id": "abc123def456",
"name": "Example",
"companyId": "xyz789",
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-01T00:00:00Z",
"taxPercent": 0,
"readableId": "xyz789",
"onHold": true
}/customerCreate a customer
Create a new customer.
Body parameters
namestringrequiredcustomerTypeIdstringcustomerStatusIdstringReferences customerStatus.id
accountManagerIdstringReferences user.id
logostringassigneestringReferences user.id
companyIdstringrequiredReferences company.id
customFieldsobjectcurrencyCodestringReferences currencyCode.code
phonestringfaxstringwebsitestringtaxPercentnumberrequiredtagsarraysalesContactIdstringReferences customerContact.id
defaultCcarrayintercompanyCompanyIdstringReferences company.id
readableIdstringrequiredcustomerSincedateThe day the business acquired the account. Null is unknown.
depositBalancenumberDeposit the business holds against the account, in the company currency.
autopayEnabledbooleanAn automatic payment schedule stands on the account. Null is unknown.
onHoldbooleanrequiredA credit hold stands on the account; deliveries and service are refused while it does.
holdReasonstringaccountKindcustomerAccountKindrequiredWhat this account is to the business. Set by an importer from the source system's own fields or an explicit reviewed list, never from a pattern in a name. A question about customers reads only accountKind = customer.
curl --request POST \
--url <your-host>/customer \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"name":"Example","companyId":"xyz789","taxPercent":0,"readableId":"xyz789","onHold":true,"accountKind":"string"}'{
"id": "abc123def456",
"name": "Example",
"companyId": "xyz789",
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-01T00:00:00Z",
"taxPercent": 0,
"readableId": "xyz789",
"onHold": true
}/customerUpdate a customer
Update an existing customer, matched on `id`.
Body parameters
namestringrequiredcustomerTypeIdstringcustomerStatusIdstringReferences customerStatus.id
accountManagerIdstringReferences user.id
logostringassigneestringReferences user.id
companyIdstringrequiredReferences company.id
customFieldsobjectcurrencyCodestringReferences currencyCode.code
phonestringfaxstringwebsitestringtaxPercentnumberrequiredtagsarraysalesContactIdstringReferences customerContact.id
defaultCcarrayintercompanyCompanyIdstringReferences company.id
readableIdstringrequiredcustomerSincedateThe day the business acquired the account. Null is unknown.
depositBalancenumberDeposit the business holds against the account, in the company currency.
autopayEnabledbooleanAn automatic payment schedule stands on the account. Null is unknown.
onHoldbooleanrequiredA credit hold stands on the account; deliveries and service are refused while it does.
holdReasonstringaccountKindcustomerAccountKindrequiredWhat this account is to the business. Set by an importer from the source system's own fields or an explicit reviewed list, never from a pattern in a name. A question about customers reads only accountKind = customer.
curl --request PATCH \
--url '<your-host>/customer?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"name":"Example"}'{
"id": "abc123def456",
"name": "Example",
"companyId": "xyz789",
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-01T00:00:00Z",
"taxPercent": 0,
"readableId": "xyz789",
"onHold": true
}/customerDelete a customer
Delete a customer, matched on `id`. Returns 204 No Content.
Query parameters
idstringThe `id` of the customer to delete, e.g. `eq.{id}`.
curl --request DELETE \
--url '<your-host>/customer?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'