Customer Location
The customer location resource.
Basehttps://rest.carbon.ms/customerLocation
GET
/customerLocationList customer locations
Retrieve a paginated list of customer locations. 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.
GEThttps://rest.carbon.ms/customerLocation
curl --request GET \
--url 'https://rest.carbon.ms/customerLocation?select=*&limit=10' \
--header 'Authorization: Bearer <api-key>'Response
[
{
"id": "abc123def456",
"customerId": "xyz789",
"addressId": "xyz789",
"name": "Example",
"customFields": "string",
"tags": []
}
]GET
/customerLocationRetrieve a customer location
Fetch a single customer location by filtering on `id`.
Query parameters
idstringMatch on the customer location's `id`, e.g. `eq.{id}`.
GEThttps://rest.carbon.ms/customerLocation
curl --request GET \
--url 'https://rest.carbon.ms/customerLocation?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'Response
{
"id": "abc123def456",
"customerId": "xyz789",
"addressId": "xyz789",
"name": "Example",
"customFields": "string",
"tags": []
}POST
/customerLocationCreate a customer location
Create a new customer location.
Body parameters
customerIdstringrequiredReferences customer.id
addressIdstringrequiredReferences address.id
customFieldsobjectnamestringrequiredtagsarrayPOSThttps://rest.carbon.ms/customerLocation
curl --request POST \
--url https://rest.carbon.ms/customerLocation \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"customerId":"xyz789","addressId":"xyz789","name":"Example"}'Response
{
"id": "abc123def456",
"customerId": "xyz789",
"addressId": "xyz789",
"name": "Example",
"customFields": "string",
"tags": []
}PATCH
/customerLocationUpdate a customer location
Update an existing customer location, matched on `id`.
Body parameters
customerIdstringrequiredReferences customer.id
addressIdstringrequiredReferences address.id
customFieldsobjectnamestringrequiredtagsarrayPATCHhttps://rest.carbon.ms/customerLocation
curl --request PATCH \
--url 'https://rest.carbon.ms/customerLocation?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"customerId":"xyz789"}'Response
{
"id": "abc123def456",
"customerId": "xyz789",
"addressId": "xyz789",
"name": "Example",
"customFields": "string",
"tags": []
}DELETE
/customerLocationDelete a customer location
Delete a customer location, matched on `id`. Returns 204 No Content.
Query parameters
idstringThe `id` of the customer location to delete, e.g. `eq.{id}`.
DELETEhttps://rest.carbon.ms/customerLocation
curl --request DELETE \
--url 'https://rest.carbon.ms/customerLocation?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'204 No Content