Part

The part resource.

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

List parts

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

Retrieve a part

Fetch a single part by filtering on `id`.

Query parameters

idstring

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

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

Create a part

Create a new part.

Body parameters

approvedbooleanrequired
approvedBystring

References user.id

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

Update a part

Update an existing part, matched on `id`.

Body parameters

approvedbooleanrequired
approvedBystring

References user.id

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

Delete a part

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

Query parameters

idstring

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

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