Storage Unit

The storage unit resource.

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

List storage units

Retrieve a paginated list of storage units. 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/storageUnit
curl --request GET \
  --url 'https://rest.carbon.ms/storageUnit?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "locationId": "xyz789",
    "active": true,
    "companyId": "xyz789",
    "createdBy": "string",
    "createdAt": "2026-01-01T00:00:00Z",
    "name": "Example",
    "storageTypeIds": []
  }
]
GET/storageUnit

Retrieve a storage unit

Fetch a single storage unit by filtering on `id`.

Query parameters

idstring

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

GEThttps://rest.carbon.ms/storageUnit
curl --request GET \
  --url 'https://rest.carbon.ms/storageUnit?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "locationId": "xyz789",
  "active": true,
  "companyId": "xyz789",
  "createdBy": "string",
  "createdAt": "2026-01-01T00:00:00Z",
  "name": "Example",
  "storageTypeIds": []
}
POST/storageUnit

Create a storage unit

Create a new storage unit.

Body parameters

locationIdstringrequired

References location.id

warehouseIdstring

References warehouse.id

activebooleanrequired
companyIdstringrequired

References company.id

customFieldsobject
namestringrequired
tagsarray
parentIdstring

References storageUnit.id

storageTypeIdsarrayrequired
POSThttps://rest.carbon.ms/storageUnit
curl --request POST \
  --url https://rest.carbon.ms/storageUnit \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"locationId":"xyz789","active":true,"companyId":"xyz789","name":"Example","storageTypeIds":[]}'
Response
{
  "id": "abc123def456",
  "locationId": "xyz789",
  "active": true,
  "companyId": "xyz789",
  "createdBy": "string",
  "createdAt": "2026-01-01T00:00:00Z",
  "name": "Example",
  "storageTypeIds": []
}
PATCH/storageUnit

Update a storage unit

Update an existing storage unit, matched on `id`.

Body parameters

locationIdstringrequired

References location.id

warehouseIdstring

References warehouse.id

activebooleanrequired
companyIdstringrequired

References company.id

customFieldsobject
namestringrequired
tagsarray
parentIdstring

References storageUnit.id

storageTypeIdsarrayrequired
PATCHhttps://rest.carbon.ms/storageUnit
curl --request PATCH \
  --url 'https://rest.carbon.ms/storageUnit?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"locationId":"xyz789"}'
Response
{
  "id": "abc123def456",
  "locationId": "xyz789",
  "active": true,
  "companyId": "xyz789",
  "createdBy": "string",
  "createdAt": "2026-01-01T00:00:00Z",
  "name": "Example",
  "storageTypeIds": []
}
DELETE/storageUnit

Delete a storage unit

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

Query parameters

idstring

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

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