Skip to main content
This endpoint is available in the Experimental version of the Retail Media API only. Experimental endpoints may change without prior notice. See the versioning policy for details.

Overview

The Onsite Display budget forecaster estimates the inventory and associated costs for a retailer-specific campaign setup. Specify the buy type, date range, page types, keywords or categories, creative formats, and bid level. The endpoint returns estimated available impressions, budget, and average CPM for each page type, broken down by day. Use the forecast to estimate the budget supported by available inventory, size a proposal, or compare campaign setups before creating a campaign. Forecast results are not saved. Forecasts use live booking data, so identical requests may return different results over time. Each page type is calculated independently. If a page type fails or isn’t supported by the retailer, the endpoint still returns results for the other page types and includes a warning describing the issue.

Prerequisites

Before calling this endpoint, ensure the following are in place:
  • Authentication: a valid access token. See Authentication.
  • App permissions: the RetailMedia_Forecasting_Read scope must be enabled on your app. See App Scopes.
  • Account consent: your app must have consent on the account in the path, and the retailerId in the body must be associated with that account.
  • Forecasting permission: the caller must also have the forecasting permission on the account. Without it, the call returns 403 with forecast-access-denied.

Road to Stable

This endpoint is expected to be promoted to a stable version in a future release. The contract may change before then. Monitor the changelog for updates.

Endpoints


Compute a Forecast

Path Parameters

Request Attributes

Forecast period. You can forecast from today up to 119 days after today. That is a window of at most 120 calendar days, counting today. The request fails with invalid-forecast-period if endDate is before startDate, or if your period doesn’t overlap this window at all. These checks run first, on the dates exactly as you sent them. If the period passes them but extends outside the window, it is trimmed to fit. A startDate before today moves to today, and an endDate later than today + 119 days moves to that limit. Each trim returns a forecast-period-adjusted warning. Because the period must overlap the window, the trimmed period always contains at least one day. Pricing and pageCpm. buyType defaults to auction. In an auction, pageCpm is your bid and is required. Placements with a floor price above it are left out of the forecast. For preferredDeals and sponsorship, pageCpm is ignored and the retailer’s pricing is used. If you send it anyway, the response includes a page-cpm-ignored warning. All attributes below are nested under data.attributes. The resource type is ComputeOnsiteDisplayForecast. creativeFormats accepts the values below. Available formats depend on the retailer. To see which formats a retailer offers, call GET /retailers/{retailerId}/templates in the stable API. See the Formats Overview for each format’s layout. Sample Request
Sample Response — 200 OK

Response Attributes

data contains one OnsiteDisplayForecast item for each requested page type that was computed. If availableImpressions is 0 and details is empty, the request still succeeded. It means no inventory matched your settings. In responses, pageType and creativeFormats can also return unknown. This means the service returned a value added after this API version. Treat it as an unrecognised value, not as an error.

Definitions

Money

Amounts use a Money object with a value (number) and a currency (ISO 4217 code). This applies to pageCpm in the request, and to budget and averageCpm in the response. All amounts are in the account’s currency, and pageCpm.currency must match it.

PageSetting

One entry of pageSettings. pageType accepts the values below. Available page types depend on the retailer. A page type the retailer does not support is left out of data, and the response includes a page-type-not-supported warning. To see which page types a retailer offers, call POST /accounts/{accountId}/retailers/search and read validCombinations for onsiteDisplay.

FrequencyCapping

InventoryForecastDetail

One row of the details daily breakdown. Each row has a unique key that depends on the page type. No two entries in the array have the same key.

Rate limits

This endpoint has its own rate limit, which depends on the OAuth method your application uses. It is much lower than the default Retail Media limit. These are the default limits. An individual application can be granted a different limit by your Criteo contact. Exceeding the limit returns 429 with a Retry-After header. See Rate Limits for the full policy and how to handle 429 responses.

Warnings

Warnings appear in a warnings array next to data in a 200 OK response. If a warning points to specific request fields, its source lists them. A page type that is left out of data always has a warning that explains why. Warning example

Known Limitations

  • Calls are synchronous and can take up to 150 seconds (usually 2–5), so set your HTTP client timeout accordingly.
  • Each forecast covers at most 120 days, from today to today + 119 days.
  • Each page setting accepts up to 100 keywords and up to 100 taxonomy IDs.
  • Results come from live inventory data, so repeated calls can return different values.
  • The response is not paginated. The full daily breakdown is returned in a single response.

Error Codes

The endpoint returns errors from three layers. The service checks the forecast. The SDK handles JSON and authentication. The Gateway checks routing and scope. Each error has a code, a type, and a source. Include the traceId when you contact support.

Errors from the forecast service

Errors from the SDK

These errors come from the shared Criteo SDK, not from the forecast service.

Errors from the Gateway

The Gateway rejects a request before the forecast service receives it. These errors do not include a traceId from the service.

Error example