List purchase order risks
curl --request GET \
--url https://api.insightchain.ai/v1/inventory/purchase_order_risks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.insightchain.ai/v1/inventory/purchase_order_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/purchase_order_risks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "c1c6ac4a-2680-48e8-9113-12de3960088b",
"data_as_of": null,
"demand_source": {
"source": "order_lines",
"history_complete": false,
"history_as_of": null,
"fallback_reason": "history_not_built"
},
"stale": true,
"count": 32,
"total": 32,
"has_more": false,
"purchase_orders": [
{
"purchase_order": "PO-0000091",
"supplier": {
"external_id": "VEND-000131",
"name": "Guangzhou Footwear Mfg 0131",
"country_code": "MX"
},
"status": "open",
"expected_delivery_date": "2026-11-09",
"days_until_expected": -12.5,
"risk_score": 77.5,
"recommended_action": "expedite",
"factors": [
{
"factor": "overdue",
"points": 52.5,
"detail": "12.5 days past expected delivery"
}
],
"critical_item": null,
"critical_location": null
}
],
"planning": {
"source": "on_request",
"reason": "not_stored"
},
"duration_ms": 70,
"notes": [
"risk_score is the same for the same data: it rises when the order is overdue or has no date, when a disruption reaches its supplier and when the item is close to a stockout, and a little more for a supplier that has delivered late before, which raises the rank but never decides recommended_action."
],
"object": "list",
"data": [
{
"purchase_order": "PO-0000091",
"supplier": {
"external_id": "VEND-000131",
"name": "Guangzhou Footwear Mfg 0131",
"country_code": "MX"
},
"status": "open",
"expected_delivery_date": "2026-11-09",
"days_until_expected": -12.5,
"risk_score": 77.5,
"recommended_action": "expedite",
"factors": [
{
"factor": "overdue",
"points": 52.5,
"detail": "12.5 days past expected delivery"
}
],
"critical_item": null,
"critical_location": null
}
],
"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 purchase order risks
Risk score and action per open purchase order; days until expected follows the supplier network’s predicted arrival when there is one. Read-only.
Key scope: read (or execute). Answers the list object (object, data, has_more, next_cursor); the same rows stay under purchase_orders, deprecated.
GET
/
v1
/
inventory
/
purchase_order_risks
List purchase order risks
curl --request GET \
--url https://api.insightchain.ai/v1/inventory/purchase_order_risks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.insightchain.ai/v1/inventory/purchase_order_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/purchase_order_risks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "c1c6ac4a-2680-48e8-9113-12de3960088b",
"data_as_of": null,
"demand_source": {
"source": "order_lines",
"history_complete": false,
"history_as_of": null,
"fallback_reason": "history_not_built"
},
"stale": true,
"count": 32,
"total": 32,
"has_more": false,
"purchase_orders": [
{
"purchase_order": "PO-0000091",
"supplier": {
"external_id": "VEND-000131",
"name": "Guangzhou Footwear Mfg 0131",
"country_code": "MX"
},
"status": "open",
"expected_delivery_date": "2026-11-09",
"days_until_expected": -12.5,
"risk_score": 77.5,
"recommended_action": "expedite",
"factors": [
{
"factor": "overdue",
"points": 52.5,
"detail": "12.5 days past expected delivery"
}
],
"critical_item": null,
"critical_location": null
}
],
"planning": {
"source": "on_request",
"reason": "not_stored"
},
"duration_ms": 70,
"notes": [
"risk_score is the same for the same data: it rises when the order is overdue or has no date, when a disruption reaches its supplier and when the item is close to a stockout, and a little more for a supplier that has delivered late before, which raises the rank but never decides recommended_action."
],
"object": "list",
"data": [
{
"purchase_order": "PO-0000091",
"supplier": {
"external_id": "VEND-000131",
"name": "Guangzhou Footwear Mfg 0131",
"country_code": "MX"
},
"status": "open",
"expected_delivery_date": "2026-11-09",
"days_until_expected": -12.5,
"risk_score": 77.5,
"recommended_action": "expedite",
"factors": [
{
"factor": "overdue",
"points": 52.5,
"detail": "12.5 days past expected delivery"
}
],
"critical_item": null,
"critical_location": null
}
],
"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