List expiry risks
curl --request GET \
--url https://api.insightchain.ai/v1/inventory/expiry_risks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.insightchain.ai/v1/inventory/expiry_risks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.insightchain.ai/v1/inventory/expiry_risks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "952d1a0d-1745-42a2-843d-409d48e548b4",
"window_days": 90,
"data_as_of": "2026-11-21T04:02:11.000+00:00",
"demand_source": {
"source": "daily_demand",
"history_complete": true,
"history_as_of": "2026-11-21T04:10:00.000+00:00",
"fallback_reason": null
},
"stale": false,
"count": 1,
"total": 1,
"has_more": false,
"at_risk": [
{
"item": "MAT-00000311",
"description": "Hand cream 75 ml",
"location": "1004",
"mean_daily_demand": 1.4,
"total_at_risk_units": 21,
"total_at_risk_value": 567,
"lots": [
{
"lotCode": "LOT-2026-0412",
"expiryDate": "2026-12-10",
"daysToExpiry": 19,
"onHand": 48,
"projectedSold": 27,
"atRiskUnits": 21,
"atRiskValue": 567,
"status": "at_risk"
}
]
}
],
"duration_ms": 55,
"notes": [
"FEFO: demand consumes earliest-expiring lots first; at-risk = units projected to expire unsold before their date."
],
"object": "list",
"data": [
{
"item": "MAT-00000311",
"description": "Hand cream 75 ml",
"location": "1004",
"mean_daily_demand": 1.4,
"total_at_risk_units": 21,
"total_at_risk_value": 567,
"lots": [
{
"lotCode": "LOT-2026-0412",
"expiryDate": "2026-12-10",
"daysToExpiry": 19,
"onHand": 48,
"projectedSold": 27,
"atRiskUnits": 21,
"atRiskValue": 567,
"status": "at_risk"
}
]
}
],
"next_cursor": null
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}Inventory
List expiry risks
Lots projected to expire unsold (FEFO).
Key scope: read (or execute). Answers the list object (object, data, has_more, next_cursor); the same rows stay under at_risk, deprecated.
GET
/
v1
/
inventory
/
expiry_risks
List expiry risks
curl --request GET \
--url https://api.insightchain.ai/v1/inventory/expiry_risks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.insightchain.ai/v1/inventory/expiry_risks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.insightchain.ai/v1/inventory/expiry_risks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "952d1a0d-1745-42a2-843d-409d48e548b4",
"window_days": 90,
"data_as_of": "2026-11-21T04:02:11.000+00:00",
"demand_source": {
"source": "daily_demand",
"history_complete": true,
"history_as_of": "2026-11-21T04:10:00.000+00:00",
"fallback_reason": null
},
"stale": false,
"count": 1,
"total": 1,
"has_more": false,
"at_risk": [
{
"item": "MAT-00000311",
"description": "Hand cream 75 ml",
"location": "1004",
"mean_daily_demand": 1.4,
"total_at_risk_units": 21,
"total_at_risk_value": 567,
"lots": [
{
"lotCode": "LOT-2026-0412",
"expiryDate": "2026-12-10",
"daysToExpiry": 19,
"onHand": 48,
"projectedSold": 27,
"atRiskUnits": 21,
"atRiskValue": 567,
"status": "at_risk"
}
]
}
],
"duration_ms": 55,
"notes": [
"FEFO: demand consumes earliest-expiring lots first; at-risk = units projected to expire unsold before their date."
],
"object": "list",
"data": [
{
"item": "MAT-00000311",
"description": "Hand cream 75 ml",
"location": "1004",
"mean_daily_demand": 1.4,
"total_at_risk_units": 21,
"total_at_risk_value": 567,
"lots": [
{
"lotCode": "LOT-2026-0412",
"expiryDate": "2026-12-10",
"daysToExpiry": 19,
"onHand": 48,
"projectedSold": 27,
"atRiskUnits": 21,
"atRiskValue": 567,
"status": "at_risk"
}
]
}
],
"next_cursor": null
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
},
"request_id": "<string>",
"details": [
"<unknown>"
],
"limit": 123,
"code": "<string>",
"field": "<string>"
}Authorizations
Query Parameters
Response
OK