Create forecast check
curl --request POST \
--url https://api.insightchain.ai/v1/forecast_checks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rows": [
{
"item": "SKU-100",
"location": "STORE-12",
"period_start": "2026-12-07",
"period_days": 7,
"quantity": 140,
"ref": "row-1"
},
{
"item": "SKU-100",
"location": "STORE-14",
"period_start": "2026-12-07",
"period_days": 7,
"quantity": 95,
"ref": "row-2"
}
]
}
'import requests
url = "https://api.insightchain.ai/v1/forecast_checks"
payload = { "rows": [
{
"item": "SKU-100",
"location": "STORE-12",
"period_start": "2026-12-07",
"period_days": 7,
"quantity": 140,
"ref": "row-1"
},
{
"item": "SKU-100",
"location": "STORE-14",
"period_start": "2026-12-07",
"period_days": 7,
"quantity": 95,
"ref": "row-2"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rows: [
{
item: 'SKU-100',
location: 'STORE-12',
period_start: '2026-12-07',
period_days: 7,
quantity: 140,
ref: 'row-1'
},
{
item: 'SKU-100',
location: 'STORE-14',
period_start: '2026-12-07',
period_days: 7,
quantity: 95,
ref: 'row-2'
}
]
})
};
fetch('https://api.insightchain.ai/v1/forecast_checks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "e32a78d5-2b7f-400d-aab0-a5eef299fffe",
"as_of": "2026-11-21",
"options": {
"window_days": 90,
"tolerance_pct": 15,
"horizon_days": 90,
"min_demand_days": 4,
"max_band_pct": 100
},
"history_window": {
"from": "2026-08-23",
"to": "2026-11-20"
},
"signals_adjust_baseline": false,
"counts": {
"agree": 2,
"above": 0,
"below": 0,
"no_baseline": 0,
"error": 1
},
"rows": [
{
"index": 0,
"ref": "row-1",
"item": "MAT-00000028",
"location": "1005",
"period": {
"start": "2026-11-28",
"end": "2026-12-04",
"days": 7
},
"quantity": 40,
"status": "ok",
"history": {
"window_days": 90,
"from": "2026-08-23",
"to": "2026-11-20",
"demand_days": 11,
"total_quantity": 1090,
"mean_daily": 12.1111,
"classification": "lumpy"
},
"baseline": {
"quantity": 67.69,
"daily_rate": 9.67,
"method": "smoothed_weekday",
"classification": "lumpy",
"in_sample_mae": null,
"period_offset_days": 7
},
"baseline_reason": null,
"difference": {
"absolute": -27.69,
"percent": -40.9,
"band": {
"pct": 100,
"tolerance_pct": 15,
"noise_pct": 180.7,
"noise_basis": "daily_std_dev",
"noise_daily": 46.2276,
"capped": true,
"rule": "agree when |percent| <= min(100, max(tolerance_pct, noise_pct)); noise_pct = 100 * noise_daily * sqrt(period_days) / baseline"
},
"verdict": "agree"
},
"signals": {
"trend": {
"rising": true,
"fading": false,
"signals": [
{
"id": "efeb189e-a05a-44a6-8bd3-efbeab4b7f54",
"detector": "event_window",
"direction": "rising",
"headline": "Black Friday / Cyber week is 6 days out: 34 of 90 fitting styles will sell through before it and supplier lead times are already longer t...",
"severity": "medium"
}
],
"source": "trends"
},
"demand_drivers": {
"count": 1,
"events": [
{
"id": "06838e82-72da-4ac5-87d6-c110098dd2bd",
"source": "disruptions",
"title": "Western holiday retail peak 2026",
"event_type": "holiday_peak",
"severity": 3,
"starts_at": "2026-11-27T00:00:00+00:00",
"ends_at": "2026-12-31T23:59:59+00:00",
"match": "country",
"distance_km": null
}
]
},
"calendar": {
"count": 0,
"holidays": [],
"org_events": []
},
"supply": {
"disrupted": false,
"countries": [],
"events": [],
"source": "disruptions"
}
},
"flags": [
"demand_driver_in_period"
]
}
],
"notes": [
"Baseline: a statistical forecast from daily demand over the history window, the same for the same history (smoothed by weekday for steady and variable demand, an intermittent-demand method for sparse demand). demand_source says which demand history was read."
],
"demand_source": {
"source": "order_lines",
"history_complete": false,
"history_as_of": null,
"fallback_reason": "history_not_built"
},
"duration_ms": 13
}{
"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>"
}{
"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>"
}Forecast check
Create forecast check
Check your own forecast rows against our baseline for the same period, with the signals in that window and a verdict per row. One of rows or stored is required, never both: send rows, or stored: one week of a plan version we hold (its id is shown in the app; needs the demand_planning module), paged by after. The body is at most 256 KB (413 above).
Key scope: read (or execute).
POST
/
v1
/
forecast_checks
Create forecast check
curl --request POST \
--url https://api.insightchain.ai/v1/forecast_checks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rows": [
{
"item": "SKU-100",
"location": "STORE-12",
"period_start": "2026-12-07",
"period_days": 7,
"quantity": 140,
"ref": "row-1"
},
{
"item": "SKU-100",
"location": "STORE-14",
"period_start": "2026-12-07",
"period_days": 7,
"quantity": 95,
"ref": "row-2"
}
]
}
'import requests
url = "https://api.insightchain.ai/v1/forecast_checks"
payload = { "rows": [
{
"item": "SKU-100",
"location": "STORE-12",
"period_start": "2026-12-07",
"period_days": 7,
"quantity": 140,
"ref": "row-1"
},
{
"item": "SKU-100",
"location": "STORE-14",
"period_start": "2026-12-07",
"period_days": 7,
"quantity": 95,
"ref": "row-2"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rows: [
{
item: 'SKU-100',
location: 'STORE-12',
period_start: '2026-12-07',
period_days: 7,
quantity: 140,
ref: 'row-1'
},
{
item: 'SKU-100',
location: 'STORE-14',
period_start: '2026-12-07',
period_days: 7,
quantity: 95,
ref: 'row-2'
}
]
})
};
fetch('https://api.insightchain.ai/v1/forecast_checks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "e32a78d5-2b7f-400d-aab0-a5eef299fffe",
"as_of": "2026-11-21",
"options": {
"window_days": 90,
"tolerance_pct": 15,
"horizon_days": 90,
"min_demand_days": 4,
"max_band_pct": 100
},
"history_window": {
"from": "2026-08-23",
"to": "2026-11-20"
},
"signals_adjust_baseline": false,
"counts": {
"agree": 2,
"above": 0,
"below": 0,
"no_baseline": 0,
"error": 1
},
"rows": [
{
"index": 0,
"ref": "row-1",
"item": "MAT-00000028",
"location": "1005",
"period": {
"start": "2026-11-28",
"end": "2026-12-04",
"days": 7
},
"quantity": 40,
"status": "ok",
"history": {
"window_days": 90,
"from": "2026-08-23",
"to": "2026-11-20",
"demand_days": 11,
"total_quantity": 1090,
"mean_daily": 12.1111,
"classification": "lumpy"
},
"baseline": {
"quantity": 67.69,
"daily_rate": 9.67,
"method": "smoothed_weekday",
"classification": "lumpy",
"in_sample_mae": null,
"period_offset_days": 7
},
"baseline_reason": null,
"difference": {
"absolute": -27.69,
"percent": -40.9,
"band": {
"pct": 100,
"tolerance_pct": 15,
"noise_pct": 180.7,
"noise_basis": "daily_std_dev",
"noise_daily": 46.2276,
"capped": true,
"rule": "agree when |percent| <= min(100, max(tolerance_pct, noise_pct)); noise_pct = 100 * noise_daily * sqrt(period_days) / baseline"
},
"verdict": "agree"
},
"signals": {
"trend": {
"rising": true,
"fading": false,
"signals": [
{
"id": "efeb189e-a05a-44a6-8bd3-efbeab4b7f54",
"detector": "event_window",
"direction": "rising",
"headline": "Black Friday / Cyber week is 6 days out: 34 of 90 fitting styles will sell through before it and supplier lead times are already longer t...",
"severity": "medium"
}
],
"source": "trends"
},
"demand_drivers": {
"count": 1,
"events": [
{
"id": "06838e82-72da-4ac5-87d6-c110098dd2bd",
"source": "disruptions",
"title": "Western holiday retail peak 2026",
"event_type": "holiday_peak",
"severity": 3,
"starts_at": "2026-11-27T00:00:00+00:00",
"ends_at": "2026-12-31T23:59:59+00:00",
"match": "country",
"distance_km": null
}
]
},
"calendar": {
"count": 0,
"holidays": [],
"org_events": []
},
"supply": {
"disrupted": false,
"countries": [],
"events": [],
"source": "disruptions"
}
},
"flags": [
"demand_driver_in_period"
]
}
],
"notes": [
"Baseline: a statistical forecast from daily demand over the history window, the same for the same history (smoothed by weekday for steady and variable demand, an intermittent-demand method for sparse demand). demand_source says which demand history was read."
],
"demand_source": {
"source": "order_lines",
"history_complete": false,
"history_as_of": null,
"fallback_reason": "history_not_built"
},
"duration_ms": 13
}{
"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>"
}{
"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
Body
application/json
Response
OK