List purchase proposals
curl --request GET \
--url https://api.insightchain.ai/v1/inventory/purchase_proposals \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.insightchain.ai/v1/inventory/purchase_proposals"
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_proposals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "17fa907e-33cf-4246-9f66-a104157f86a9",
"window_days": 90,
"service_level": 0.95,
"service_level_source": "default",
"data_as_of": null,
"demand_source": {
"source": "order_lines",
"history_complete": false,
"history_as_of": null,
"fallback_reason": "history_not_built"
},
"stale": true,
"count": 65,
"total": 65,
"has_more": false,
"rules": {
"proposals_on_observed_lead_time": 0
},
"proposals": [
{
"item": "MAT-00000026",
"description": "Handbags - Style 00000026",
"quantity": 2141,
"priority": 99.44,
"suggested_supplier": {
"external_id": "VEND-000022",
"name": "Phnom Penh Footwear Mfg 0022",
"country_code": "MX",
"lead_time_days": 52,
"disruption_affected": true
},
"rationale": {
"network_on_hand": 13,
"inbound_quantity": 0,
"network_position": 13,
"mean_daily_demand": 22.7333,
"lead_time_days": 52,
"safety_stock": 653.11,
"reorder_point": 1835.24,
"order_up_to_level": 2153.51,
"network_days_of_cover": 0.57,
"estimated_value": 959596.2,
"supplier_disruption_affected": true,
"alternate_suppliers": [],
"lead_time_source": "supplier_master",
"service_level": 0.95,
"review_period_days": 14,
"parameters": {
"inventory.service_level": {
"value": 0.95,
"origin": "default",
"scope": null,
"setBy": null,
"setAt": null
},
"inventory.review_period_days": {
"value": 14,
"origin": "default",
"scope": null,
"setBy": null,
"setAt": null
}
}
}
}
],
"supplier_updates_applied": 2,
"compliance": {
"mode": "flag",
"excluded": 0,
"excluded_needs": []
},
"planning": {
"source": "on_request",
"reason": "no_stored_result"
},
"duration_ms": 107,
"notes": [
"Proposals fire only when the whole network (on-hand + inbound) sits below the reorder point — transfers cannot fix these."
],
"object": "list",
"data": [
{
"item": "MAT-00000026",
"description": "Handbags - Style 00000026",
"quantity": 2141,
"priority": 99.44,
"suggested_supplier": {
"external_id": "VEND-000022",
"name": "Phnom Penh Footwear Mfg 0022",
"country_code": "MX",
"lead_time_days": 52,
"disruption_affected": true
},
"rationale": {
"network_on_hand": 13,
"inbound_quantity": 0,
"network_position": 13,
"mean_daily_demand": 22.7333,
"lead_time_days": 52,
"safety_stock": 653.11,
"reorder_point": 1835.24,
"order_up_to_level": 2153.51,
"network_days_of_cover": 0.57,
"estimated_value": 959596.2,
"supplier_disruption_affected": true,
"alternate_suppliers": [],
"lead_time_source": "supplier_master",
"service_level": 0.95,
"review_period_days": 14,
"parameters": {
"inventory.service_level": {
"value": 0.95,
"origin": "default",
"scope": null,
"setBy": null,
"setAt": null
},
"inventory.review_period_days": {
"value": 14,
"origin": "default",
"scope": null,
"setBy": null,
"setAt": 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 proposals
Network-level purchase proposals with a suggested supplier. Read-only; planning in the answer says whether it is the latest stored result or one made for this request’s settings. The same proposals are listed as proposed recommendations.
Key scope: read (or execute). Answers the list object (object, data, has_more, next_cursor); the same rows stay under proposals, deprecated.
GET
/
v1
/
inventory
/
purchase_proposals
List purchase proposals
curl --request GET \
--url https://api.insightchain.ai/v1/inventory/purchase_proposals \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.insightchain.ai/v1/inventory/purchase_proposals"
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_proposals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "17fa907e-33cf-4246-9f66-a104157f86a9",
"window_days": 90,
"service_level": 0.95,
"service_level_source": "default",
"data_as_of": null,
"demand_source": {
"source": "order_lines",
"history_complete": false,
"history_as_of": null,
"fallback_reason": "history_not_built"
},
"stale": true,
"count": 65,
"total": 65,
"has_more": false,
"rules": {
"proposals_on_observed_lead_time": 0
},
"proposals": [
{
"item": "MAT-00000026",
"description": "Handbags - Style 00000026",
"quantity": 2141,
"priority": 99.44,
"suggested_supplier": {
"external_id": "VEND-000022",
"name": "Phnom Penh Footwear Mfg 0022",
"country_code": "MX",
"lead_time_days": 52,
"disruption_affected": true
},
"rationale": {
"network_on_hand": 13,
"inbound_quantity": 0,
"network_position": 13,
"mean_daily_demand": 22.7333,
"lead_time_days": 52,
"safety_stock": 653.11,
"reorder_point": 1835.24,
"order_up_to_level": 2153.51,
"network_days_of_cover": 0.57,
"estimated_value": 959596.2,
"supplier_disruption_affected": true,
"alternate_suppliers": [],
"lead_time_source": "supplier_master",
"service_level": 0.95,
"review_period_days": 14,
"parameters": {
"inventory.service_level": {
"value": 0.95,
"origin": "default",
"scope": null,
"setBy": null,
"setAt": null
},
"inventory.review_period_days": {
"value": 14,
"origin": "default",
"scope": null,
"setBy": null,
"setAt": null
}
}
}
}
],
"supplier_updates_applied": 2,
"compliance": {
"mode": "flag",
"excluded": 0,
"excluded_needs": []
},
"planning": {
"source": "on_request",
"reason": "no_stored_result"
},
"duration_ms": 107,
"notes": [
"Proposals fire only when the whole network (on-hand + inbound) sits below the reorder point — transfers cannot fix these."
],
"object": "list",
"data": [
{
"item": "MAT-00000026",
"description": "Handbags - Style 00000026",
"quantity": 2141,
"priority": 99.44,
"suggested_supplier": {
"external_id": "VEND-000022",
"name": "Phnom Penh Footwear Mfg 0022",
"country_code": "MX",
"lead_time_days": 52,
"disruption_affected": true
},
"rationale": {
"network_on_hand": 13,
"inbound_quantity": 0,
"network_position": 13,
"mean_daily_demand": 22.7333,
"lead_time_days": 52,
"safety_stock": 653.11,
"reorder_point": 1835.24,
"order_up_to_level": 2153.51,
"network_days_of_cover": 0.57,
"estimated_value": 959596.2,
"supplier_disruption_affected": true,
"alternate_suppliers": [],
"lead_time_source": "supplier_master",
"service_level": 0.95,
"review_period_days": 14,
"parameters": {
"inventory.service_level": {
"value": 0.95,
"origin": "default",
"scope": null,
"setBy": null,
"setAt": null
},
"inventory.review_period_days": {
"value": 14,
"origin": "default",
"scope": null,
"setBy": null,
"setAt": 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