Unit Of Measure

The unit of measure resource.

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

List unit of measures

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

Retrieve a unit of measure

Fetch a single unit of measure by filtering on `id`.

Query parameters

idstring

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

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

Create a unit of measure

Create a new unit of measure.

Body parameters

codestringrequired
namestringrequired
activebooleanrequired
companyIdstringrequired

References company.id

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

Update a unit of measure

Update an existing unit of measure, matched on `id`.

Body parameters

codestringrequired
namestringrequired
activebooleanrequired
companyIdstringrequired

References company.id

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

Delete a unit of measure

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

Query parameters

idstring

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

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