---
title: "Trigger a forecast of all available inventory"
method: POST
path: "/forecaster/trigger-inventory-forecast"
tags: ["Yield Forecast"]
---

# Trigger a forecast of all available inventory

`POST /forecaster/trigger-inventory-forecast`

## Request

- Base URL: `https://api.kevel.co/v1`
- URL: `https://api.kevel.co/v1/forecaster/trigger-inventory-forecast`
- Auth: API key in header `X-Adzerk-ApiKey`

Triggers a forecast request of all available inventory, using the inventory priorities defined in the forecast settings.
Results are grouped by three different date aggregation levels: daily, weekly, and monthly.

## Request body

- object: Parameters to forecast triggers endpoints.
  - `sampling` integer: The level of sampling to set in the forecast request(s) being triggered. Defaults to the default sampling defined for the network.
  - `startDate` string, date: The start date of the forecast request(s) being triggered. Defaults to the current date.
  - `endDate` string, date: The end date of the forecast request(s) being triggered. Defaults to the date given by default date range defined for the network.

## Response `200`

Normal response, containing a JSON object with the result of the forecast trigger.

- union
  - object: Response when a forecast is successfully triggered.
    - `type` 'success'
    - `forecastId` string: The ID of the triggered forecast.
  - object: Response when a forecast wasn't triggered due to lack of data.
    - `type` 'no-result'
    - `noResultReason` string: The reason why the forecast wasn't triggered.
  - object: Response when a forecast trigger resulted in error.
    - `type` 'error'
    - `errorMessage` string: The error message detailing the error in the forecast trigger.

---

[API](https://skmtc.dev/kevel/apis/forecast-api.md) - [All operations](https://skmtc.dev/kevel/apis/forecast-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kevel/apis/forecast-api/revisions/f07c8784a32d?raw)
