List rebalance recommendations
curl --request GET \
--url https://api.insightchain.ai/v1/inventory/rebalance_recommendations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.insightchain.ai/v1/inventory/rebalance_recommendations"
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/rebalance_recommendations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "2b57dc9f-d42c-4f71-9224-632c3c0a60d2",
"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,
"recommendation_count": 100,
"total": 2424,
"has_more": true,
"rules": {
"items_with_pack": 0,
"pack_from_parameter": 0,
"pack_from_erp": 0,
"max_stock_set": false,
"lanes_with_transit": 0,
"range_basis": "carried"
},
"recommendations": [
{
"item": "MAT-00000211",
"from_location": "1005",
"to_location": "1018",
"quantity": 14,
"priority": 89.13,
"rationale": {
"receiver_on_hand": 0,
"receiver_reorder_point": 14.16,
"receiver_days_of_cover": 0,
"receiver_deficit": 14.16,
"donor_on_hand": 37,
"donor_days_of_cover": null,
"donor_excess": 37,
"donor_dead_stock": true,
"transfer_value": 6710.2,
"lead_time_days": 58,
"disruption_affected": true,
"lead_time_source": "supplier_master",
"service_level": 0.95,
"parameters": {
"inventory.service_level": {
"value": 0.95,
"origin": "default",
"scope": null,
"setBy": null,
"setAt": null
},
"inventory.lead_time_fallback_days": {
"value": 14,
"origin": "default",
"scope": null,
"setBy": null,
"setAt": null
}
}
},
"expected_impact": {
"receiver_days_of_cover_after": 140,
"donor_days_of_cover_after": null,
"stockout_risk_before": "imminent"
}
}
],
"compliance": {
"mode": "flag",
"excluded": 0,
"excluded_needs": []
},
"planning": {
"source": "on_request",
"reason": "no_stored_result"
},
"duration_ms": 218,
"notes": [
"Recommendations are advisory only; no changes are made to any ERP system."
],
"object": "list",
"data": [
{
"item": "MAT-00000211",
"from_location": "1005",
"to_location": "1018",
"quantity": 14,
"priority": 89.13,
"rationale": {
"receiver_on_hand": 0,
"receiver_reorder_point": 14.16,
"receiver_days_of_cover": 0,
"receiver_deficit": 14.16,
"donor_on_hand": 37,
"donor_days_of_cover": null,
"donor_excess": 37,
"donor_dead_stock": true,
"transfer_value": 6710.2,
"lead_time_days": 58,
"disruption_affected": true,
"lead_time_source": "supplier_master",
"service_level": 0.95,
"parameters": {
"inventory.service_level": {
"value": 0.95,
"origin": "default",
"scope": null,
"setBy": null,
"setAt": null
},
"inventory.lead_time_fallback_days": {
"value": 14,
"origin": "default",
"scope": null,
"setBy": null,
"setAt": null
}
}
},
"expected_impact": {
"receiver_days_of_cover_after": 140,
"donor_days_of_cover_after": null,
"stockout_risk_before": "imminent"
}
}
],
"next_cursor": "example-token"
}{
"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 rebalance recommendations
Ranked transfer proposals. 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 recommendations, deprecated.
GET
/
v1
/
inventory
/
rebalance_recommendations
List rebalance recommendations
curl --request GET \
--url https://api.insightchain.ai/v1/inventory/rebalance_recommendations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.insightchain.ai/v1/inventory/rebalance_recommendations"
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/rebalance_recommendations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "2b57dc9f-d42c-4f71-9224-632c3c0a60d2",
"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,
"recommendation_count": 100,
"total": 2424,
"has_more": true,
"rules": {
"items_with_pack": 0,
"pack_from_parameter": 0,
"pack_from_erp": 0,
"max_stock_set": false,
"lanes_with_transit": 0,
"range_basis": "carried"
},
"recommendations": [
{
"item": "MAT-00000211",
"from_location": "1005",
"to_location": "1018",
"quantity": 14,
"priority": 89.13,
"rationale": {
"receiver_on_hand": 0,
"receiver_reorder_point": 14.16,
"receiver_days_of_cover": 0,
"receiver_deficit": 14.16,
"donor_on_hand": 37,
"donor_days_of_cover": null,
"donor_excess": 37,
"donor_dead_stock": true,
"transfer_value": 6710.2,
"lead_time_days": 58,
"disruption_affected": true,
"lead_time_source": "supplier_master",
"service_level": 0.95,
"parameters": {
"inventory.service_level": {
"value": 0.95,
"origin": "default",
"scope": null,
"setBy": null,
"setAt": null
},
"inventory.lead_time_fallback_days": {
"value": 14,
"origin": "default",
"scope": null,
"setBy": null,
"setAt": null
}
}
},
"expected_impact": {
"receiver_days_of_cover_after": 140,
"donor_days_of_cover_after": null,
"stockout_risk_before": "imminent"
}
}
],
"compliance": {
"mode": "flag",
"excluded": 0,
"excluded_needs": []
},
"planning": {
"source": "on_request",
"reason": "no_stored_result"
},
"duration_ms": 218,
"notes": [
"Recommendations are advisory only; no changes are made to any ERP system."
],
"object": "list",
"data": [
{
"item": "MAT-00000211",
"from_location": "1005",
"to_location": "1018",
"quantity": 14,
"priority": 89.13,
"rationale": {
"receiver_on_hand": 0,
"receiver_reorder_point": 14.16,
"receiver_days_of_cover": 0,
"receiver_deficit": 14.16,
"donor_on_hand": 37,
"donor_days_of_cover": null,
"donor_excess": 37,
"donor_dead_stock": true,
"transfer_value": 6710.2,
"lead_time_days": 58,
"disruption_affected": true,
"lead_time_source": "supplier_master",
"service_level": 0.95,
"parameters": {
"inventory.service_level": {
"value": 0.95,
"origin": "default",
"scope": null,
"setBy": null,
"setAt": null
},
"inventory.lead_time_fallback_days": {
"value": 14,
"origin": "default",
"scope": null,
"setBy": null,
"setAt": null
}
}
},
"expected_impact": {
"receiver_days_of_cover_after": 140,
"donor_days_of_cover_after": null,
"stockout_risk_before": "imminent"
}
}
],
"next_cursor": "example-token"
}{
"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