Item Shelf Life

The item shelf life resource.

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

List item shelf lifes

Retrieve a paginated list of item shelf lifes. 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/itemShelfLife
curl --request GET \
  --url 'https://rest.carbon.ms/itemShelfLife?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "itemId": "xyz789",
    "mode": "string",
    "triggerTiming": "string",
    "companyId": "xyz789",
    "createdBy": "string",
    "createdAt": "2026-01-01T00:00:00Z",
    "calculateFromBom": true,
    "days": 0
  }
]
GET/itemShelfLife

Retrieve a item shelf life

Fetch a single item shelf life by filtering on `itemId`.

Query parameters

itemIdstring

Match on the item shelf life's `itemId`, e.g. `eq.{id}`.

GEThttps://rest.carbon.ms/itemShelfLife
curl --request GET \
  --url 'https://rest.carbon.ms/itemShelfLife?itemId=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "itemId": "xyz789",
  "mode": "string",
  "triggerTiming": "string",
  "companyId": "xyz789",
  "createdBy": "string",
  "createdAt": "2026-01-01T00:00:00Z",
  "calculateFromBom": true,
  "days": 0
}
POST/itemShelfLife

Create a item shelf life

Create a new item shelf life.

Body parameters

modeshelfLifeModerequired
daysnumber
triggerProcessIdstring

References process.id

triggerTimingshelfLifeTriggerTimingrequired
companyIdstringrequired

References company.id

customFieldsobject
calculateFromBombooleanrequired
POSThttps://rest.carbon.ms/itemShelfLife
curl --request POST \
  --url https://rest.carbon.ms/itemShelfLife \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"mode":"string","triggerTiming":"string","companyId":"xyz789","calculateFromBom":true}'
Response
{
  "itemId": "xyz789",
  "mode": "string",
  "triggerTiming": "string",
  "companyId": "xyz789",
  "createdBy": "string",
  "createdAt": "2026-01-01T00:00:00Z",
  "calculateFromBom": true,
  "days": 0
}
PATCH/itemShelfLife

Update a item shelf life

Update an existing item shelf life, matched on `itemId`.

Body parameters

modeshelfLifeModerequired
daysnumber
triggerProcessIdstring

References process.id

triggerTimingshelfLifeTriggerTimingrequired
companyIdstringrequired

References company.id

customFieldsobject
calculateFromBombooleanrequired
PATCHhttps://rest.carbon.ms/itemShelfLife
curl --request PATCH \
  --url 'https://rest.carbon.ms/itemShelfLife?itemId=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"mode":"string"}'
Response
{
  "itemId": "xyz789",
  "mode": "string",
  "triggerTiming": "string",
  "companyId": "xyz789",
  "createdBy": "string",
  "createdAt": "2026-01-01T00:00:00Z",
  "calculateFromBom": true,
  "days": 0
}
DELETE/itemShelfLife

Delete a item shelf life

Delete a item shelf life, matched on `itemId`. Returns 204 No Content.

Query parameters

itemIdstring

The `itemId` of the item shelf life to delete, e.g. `eq.{id}`.

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