Calculate a new forecast for an inventory opportunity based on marketplace catalog item and supplier item cost.
POST
/2024-09/forecasting/opportunity-forecasts/calculate
curl \
--request POST 'https://app.merchanthq.com/api/2024-09/forecasting/opportunity-forecasts/calculate' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"marketplace_catalog_item_id":"1e7f0a0f-b5a9-4d1a-a2d5-d0e0c2b1c3d4","supplier_item_cost_id":"2e7f0a0f-b5a9-4d1a-a2d5-d0e0c2b1c3d4"}'
Request examples
{
"marketplace_catalog_item_id": "1e7f0a0f-b5a9-4d1a-a2d5-d0e0c2b1c3d4",
"supplier_item_cost_id": "2e7f0a0f-b5a9-4d1a-a2d5-d0e0c2b1c3d4"
}
Response examples (201)
{
"data": {
"id": "1e7f0a0f-b5a9-4d1a-a2d5-d0e0c2b1c3d4",
"marketplace_catalog_item_id": "1e7f0a0f-b5a9-4d1a-a2d5-d0e0c2b1c3d4",
"supplier_item_cost_id": "2e7f0a0f-b5a9-4d1a-a2d5-d0e0c2b1c3d4",
"thirty_day_profit_forecast_high": {
"value": 42.0,
"currency": "string"
},
"thirty_day_profit_forecast_low": {
"value": 42.0,
"currency": "string"
},
"risk_score": 35,
"risk_factors": [
"limited_price_history"
],
"risk_adjusted_thirty_day_profit_forecast_high": {
"value": 42.0,
"currency": "string"
},
"risk_adjusted_thirty_day_profit_forecast_low": {
"value": 42.0,
"currency": "string"
},
"calculated_at": "2025-01-10T10:37:11Z",
"type": "beat_lowest_recent_price",
"forecast_model": "beat_lowest_recent_price_opportunity_forecast_v150725",
"forecast_inputs": {},
"created_at": "2025-01-10T10:37:11Z",
"updated_at": "2025-01-10T10:37:11Z"
}
}
Response examples (401)
{
"message": "Unauthorized"
}
Response examples (404)
{
"message": "Not found"
}
Response examples (422)
{
"message": "The given data was invalid.",
"errors": {
"field_name": [
"The field name field is required."
]
}
}