Supplier Location

The supplier location resource.

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

List supplier locations

Retrieve a paginated list of supplier locations. 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/supplierLocation
curl --request GET \
  --url 'https://rest.carbon.ms/supplierLocation?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "supplierId": "xyz789",
    "addressId": "xyz789",
    "name": "Example",
    "customFields": "string",
    "tags": []
  }
]
GET/supplierLocation

Retrieve a supplier location

Fetch a single supplier location by filtering on `id`.

Query parameters

idstring

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

GEThttps://rest.carbon.ms/supplierLocation
curl --request GET \
  --url 'https://rest.carbon.ms/supplierLocation?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "supplierId": "xyz789",
  "addressId": "xyz789",
  "name": "Example",
  "customFields": "string",
  "tags": []
}
POST/supplierLocation

Create a supplier location

Create a new supplier location.

Body parameters

supplierIdstringrequired

References supplier.id

addressIdstringrequired

References address.id

customFieldsobject
namestringrequired
tagsarray
POSThttps://rest.carbon.ms/supplierLocation
curl --request POST \
  --url https://rest.carbon.ms/supplierLocation \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"supplierId":"xyz789","addressId":"xyz789","name":"Example"}'
Response
{
  "id": "abc123def456",
  "supplierId": "xyz789",
  "addressId": "xyz789",
  "name": "Example",
  "customFields": "string",
  "tags": []
}
PATCH/supplierLocation

Update a supplier location

Update an existing supplier location, matched on `id`.

Body parameters

supplierIdstringrequired

References supplier.id

addressIdstringrequired

References address.id

customFieldsobject
namestringrequired
tagsarray
PATCHhttps://rest.carbon.ms/supplierLocation
curl --request PATCH \
  --url 'https://rest.carbon.ms/supplierLocation?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"supplierId":"xyz789"}'
Response
{
  "id": "abc123def456",
  "supplierId": "xyz789",
  "addressId": "xyz789",
  "name": "Example",
  "customFields": "string",
  "tags": []
}
DELETE/supplierLocation

Delete a supplier location

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

Query parameters

idstring

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

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