Customer

The customer resource.

Basehttps://rest.carbon.ms/customer
GET/customer

List customers

Retrieve a paginated list of customers. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows to skip, for pagination.

GEThttps://rest.carbon.ms/customer
curl --request GET \
  --url 'https://rest.carbon.ms/customer?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "name": "Example",
    "companyId": "xyz789",
    "createdAt": "2026-01-01T00:00:00Z",
    "taxPercent": 0,
    "customerTypeId": "xyz789",
    "customerStatusId": "xyz789",
    "accountManagerId": "xyz789"
  }
]
GET/customer

Retrieve a customer

Fetch a single customer by filtering on `id`.

Query parameters

idstring

Match on the customer's `id`, e.g. `eq.{id}`.

GEThttps://rest.carbon.ms/customer
curl --request GET \
  --url 'https://rest.carbon.ms/customer?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "name": "Example",
  "companyId": "xyz789",
  "createdAt": "2026-01-01T00:00:00Z",
  "taxPercent": 0,
  "customerTypeId": "xyz789",
  "customerStatusId": "xyz789",
  "accountManagerId": "xyz789"
}
POST/customer

Create a customer

Create a new customer.

Body parameters

namestringrequired
customerTypeIdstring

References customerType.id

customerStatusIdstring

References customerStatus.id

accountManagerIdstring

References user.id

logostring
assigneestring

References user.id

companyIdstringrequired

References company.id

customFieldsobject
currencyCodestring

References currencyCode.code

phonestring
faxstring
websitestring
taxPercentnumberrequired
tagsarray
embeddingstring
salesContactIdstring

References customerContact.id

defaultCcarray
intercompanyCompanyIdstring

References company.id

POSThttps://rest.carbon.ms/customer
curl --request POST \
  --url https://rest.carbon.ms/customer \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"name":"Example","companyId":"xyz789","taxPercent":0}'
Response
{
  "id": "abc123def456",
  "name": "Example",
  "companyId": "xyz789",
  "createdAt": "2026-01-01T00:00:00Z",
  "taxPercent": 0,
  "customerTypeId": "xyz789",
  "customerStatusId": "xyz789",
  "accountManagerId": "xyz789"
}
PATCH/customer

Update a customer

Update an existing customer, matched on `id`.

Body parameters

namestringrequired
customerTypeIdstring

References customerType.id

customerStatusIdstring

References customerStatus.id

accountManagerIdstring

References user.id

logostring
assigneestring

References user.id

companyIdstringrequired

References company.id

customFieldsobject
currencyCodestring

References currencyCode.code

phonestring
faxstring
websitestring
taxPercentnumberrequired
tagsarray
embeddingstring
salesContactIdstring

References customerContact.id

defaultCcarray
intercompanyCompanyIdstring

References company.id

PATCHhttps://rest.carbon.ms/customer
curl --request PATCH \
  --url 'https://rest.carbon.ms/customer?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"name":"Example"}'
Response
{
  "id": "abc123def456",
  "name": "Example",
  "companyId": "xyz789",
  "createdAt": "2026-01-01T00:00:00Z",
  "taxPercent": 0,
  "customerTypeId": "xyz789",
  "customerStatusId": "xyz789",
  "accountManagerId": "xyz789"
}
DELETE/customer

Delete a customer

Delete a customer, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `id` of the customer to delete, e.g. `eq.{id}`.

DELETEhttps://rest.carbon.ms/customer
curl --request DELETE \
  --url 'https://rest.carbon.ms/customer?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content