Skip to main content

Introduction

The Retail Media Real-Time Performance API is a synchronous reporting endpoint that exposes near real-time campaign performance data from the Retail Media reporting platform. This API is designed for:
  • Demand Side users accessing through a Commerce Yield Private Market account,
  • Demand Side users accessing through a Commerce Max Network account.
Typical use-cases for this endpoint include, for example:
  • Real-time monitoring during major retail events (for example, Black Friday, Prime Day, etc.),
  • Live optimization dashboards for trading teams,
  • Alerting systems reacting to sudden performance changes (spend drops/spikes, click anomalies, etc.).
This endpoint provides:
  • about 15 minute latency from impression/click to availability in the API,
  • a maximum 7-day look back window,
  • Onsite campaign coverage only,
  • A focused set of metrics: impressions, clicks, spend.
Metric rename from Preview: billableImpressions and billableClicks have been renamed to impressions and clicks in the stable API. These metrics now count total volume (billable + non-billable). If you were using this endpoint in Preview, update your field mappings before migrating to stable.

Endpoints Overview

Verb

Endpoint

Description

POST

/retail-media/reports/sync/real-time-performance

Retrieves real-time Retail Media performance metrics


Attributes

Attribute

Data Type

Description

startDate*

date

Start date (YYYY-MM-DD) for the reporting window. Must be no more than 7 days in the past in the requested timezone.

endDate

date

End date (YYYY-MM-DD) for the reporting window. Optional

retailerIds

array of strings

Single retailer ID filter. Optional

accountIds

array of strings

Filter by account IDs. Max 5 IDs.

Chooseoneof:accountIds,campaignIds, orlineItemIds

campaignIds

array of strings

Filter by campaign IDs. Max 50 IDs.

Chooseoneof:accountIds,campaignIds, orlineItemIds

lineItemIds

array of strings

Filter by line item IDs. Max 50 IDs.

Chooseoneof:accountIds,campaignIds, orlineItemIds

dimensions*

array of strings

Grouping dimensions. Must contain at leastonevalue.

metrics*

array of strings

Requested metrics. Must contain at leastonevalue.

timezone

string

Time zone identifier. Defaults to UTC if not provided.

(*) - Required
At least one of dimensions and at least one of metrics must be provided.For entity filters: only one of accountIds or campaignIds or lineItemIds must be provided. This prevents unbounded queries on the full dataset.

Supported Dimensions

Values in the dimensions array must be selected from:
  • accountId,
  • campaignId,
  • lineItemId,
  • retailerId,
  • accountName,
  • campaignName,
  • lineItemName,
  • retailerName,
  • date,
  • hour.

Supported Metrics

Values in the metrics array must be selected from:
  • impressions,
  • clicks,
  • spend.
billableImpressions and billableClicks are still accepted for backward compatibility with existing preview integrations, but are redundant with impressions/clicks and should not be used in new integrations.

Behavioral Notes

  • Optional end date parameter: The endpoint accepts an optional endDate parameter. If omitted, it will return data from startDate up to the current hour in the requested timezone.
  • Look back limit: The look back window is limited to 7 days relative to “now” in the requested timezone.
    Requests with startDate older than this limit are rejected with a 400 Bad Request.
  • Time zone handling: All date/hour-based dimensions (date, hour) are computed in the requested timezone.
    If timezone is omitted, UTC is used.

Real-Time Performance Endpoint

This endpoint retrieves real-time Retail Media performance metrics.

Sample Request


Sample Response


Responses

Response

Title

Detail

Troubleshooting

🟢200

Success

Data returned successfully

Call executed with success

🔴400

Validation Error

Invalid request (timezone, filters, dimensions, metrics, look back, etc.)

Review request parameters

🔴400

Missing Entity Filters

NoaccountIds,campaignIds, orlineItemIdsprovided

Provide exactly one entity filter

🔴400

Entity Filter Limit Exceeded

Too many IDs provided

Respect max limits

🔴400

Missing Metrics

metrics is missing or empty

Provide at least one metric

🔴400

Missing Dimensions

dimensions is missing or empty

Provide at least one dimension

🔴400

Look back Window Exceeded

startDatetoo old

Ensure ≤ 7 days

🔴400

Invalid Timezone

Unsupported timezone

Use valid timezone

🔴400

Deserialization Error

Invalid format or type

Fix payload format

🔴403

Forbidden

Unauthorized access to resources

Check permissions


Error Examples

Validation Error (Invalid Timezone)

Missing Entity Filters

Entity Filter Limit Exceeded

Missing Metrics

Missing Dimensions

Look back Window Exceeded

Deserialization Error

Forbidden