Item Shelf Life
The item shelf life resource.
Basehttps://rest.carbon.ms/itemShelfLife
GET
/itemShelfLifeList item shelf lifes
Retrieve a paginated list of item shelf lifes. Filter, order, and select columns with PostgREST query parameters.
Query parameters
selectstringComma-separated columns to return. Defaults to all.
orderstringColumn to sort by, e.g. `createdAt.desc`.
limitintegerMaximum rows to return.
offsetintegerRows 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
/itemShelfLifeRetrieve a item shelf life
Fetch a single item shelf life by filtering on `itemId`.
Query parameters
itemIdstringMatch 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
/itemShelfLifeCreate a item shelf life
Create a new item shelf life.
Body parameters
modeshelfLifeModerequireddaysnumbertriggerProcessIdstringReferences process.id
triggerTimingshelfLifeTriggerTimingrequiredcompanyIdstringrequiredReferences company.id
customFieldsobjectcalculateFromBombooleanrequiredPOSThttps://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
/itemShelfLifeUpdate a item shelf life
Update an existing item shelf life, matched on `itemId`.
Body parameters
modeshelfLifeModerequireddaysnumbertriggerProcessIdstringReferences process.id
triggerTimingshelfLifeTriggerTimingrequiredcompanyIdstringrequiredReferences company.id
customFieldsobjectcalculateFromBombooleanrequiredPATCHhttps://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
/itemShelfLifeDelete a item shelf life
Delete a item shelf life, matched on `itemId`. Returns 204 No Content.
Query parameters
itemIdstringThe `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