---
updatedAt: 2026-05-29T12:25:24.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# Trigger a forecast of all available inventory

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.


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Forecast API",
    "description": "The Kevel Forecast API",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.kevel.co/v1"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/forecaster/trigger-inventory-forecast": {
      "post": {
        "tags": [
          "Yield Forecast"
        ],
        "summary": "Trigger a forecast of all available inventory",
        "description": "Triggers a forecast request of all available inventory, using the inventory priorities defined in the forecast settings.\nResults are grouped by three different date aggregation levels: daily, weekly, and monthly.\n",
        "requestBody": {
          "description": "The JSON object with optional parameters for the forecasts.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Parameters to forecast triggers endpoints.",
                "properties": {
                  "sampling": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3,
                    "description": "The level of sampling to set in the forecast request(s) being triggered. Defaults to the default sampling defined for the network.\n"
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date",
                    "description": "The start date of the forecast request(s) being triggered. Defaults to the current date."
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date",
                    "description": "The end date of the forecast request(s) being triggered. Defaults to the date given by default date range defined for the network."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Normal response, containing a JSON object with the result of the forecast trigger.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "Response when a forecast is successfully triggered.",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "success"
                        },
                        "forecastId": {
                          "type": "string",
                          "description": "The ID of the triggered forecast."
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "Response when a forecast wasn't triggered due to lack of data.",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "no-result"
                        },
                        "noResultReason": {
                          "type": "string",
                          "description": "The reason why the forecast wasn't triggered.",
                          "example": "Package does not contain valid targeting sets to derive forecast requests."
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "Response when a forecast trigger resulted in error.",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "error"
                        },
                        "errorMessage": {
                          "type": "string",
                          "description": "The error message detailing the error in the forecast trigger."
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Adzerk-ApiKey"
      }
    }
  }
}
```