Overview
This API provides real-time reporting for Marketplace Performance Outcomes (MPO) via an asynchronous export workflow designed for large volumes of data.- Data latency: Approximately 10 minutes.
- Base URL:
- Compatibility: This endpoint supports both multi-seller and single-seller campaign configurations.
The workflow is:
- Create an asynchronous report job with your filters.
- Poll the job status until it is complete.
- Download the generated export file (CSV or JSON).
1. Create a report job
Endpoint:POST /stats/realtime-reports/export
Submit a request with your desired filters. The API creates an export job and returns an identifier (UUID) and a status (typically Pending).
2. Poll for Completion
Endpoint:GET /stats/report-jobs/{reportId}
Poll the job status until it reaches Done. Do not poll more than once every 5–10 seconds to remain within rate limits.
- Status options:
Pending,Done,Failure,Expired. - Note: Identical requests may reuse cached results, returning a previously generated ID.
3. Download the report
Endpoint:GET /stats/realtime-reports/{reportId}
Once the status is Done, this call returns the raw file bytes.
- CSV output:
Content-Type: text/csv. - JSON output:
Content-Type: application/json.
Data models
Request attributes (RealTimeProductReportJob)
(*) - Required
Dimensions
Metrics
Step 1. Create an Async Report Job
This endpoint creates a new asynchronous report job for a real-time product report. The backend triggers production of an export file and may reuse cached results when the same request has already been processed.Sample Request
Sample Response
Successful Response
Error Example: unsupported fileFormat
If fileFormat is not one of csv or json, the API returns a 400 Bad Request validation error.
Step 2. Poll for completion
This endpoint polls the job status until it reachesDone.Do not poll more than once every 5–10 seconds to remain within rate limits.
- Status options:
Pending,Done,Failure,Expired. - Note: Identical requests may reuse cached results, returning a previously generated ID.
Step 3. Download Report Output
This endpoint downloads the file corresponding to a completed export job.Download availability windowExport files generated by the MPO Real-Time Asynchronous API are only guaranteed to be available for download for a short period after the job reaches
status = Done (typically up to 4 hours). If the file has expired, you must create a new export job and download its output within this retention window.- If
fileFormat = csv→Content-Type: text/csv - If
fileFormat = json→Content-Type: application/json
Path Parameters
(*) - RequiredExample Request
Successful response
- 200 OK only if job status is
Done. - Body contains raw file bytes (CSV or JSON).
Output formats
CSV output
The response contains a header row followed by data rows.JSON output
The response contains a columnar JSON payload with adata array and top-level columns and rows fields.
Validation rules
The following validation rules are explicitly described via field notes and domain errors.1) Required fields
advertiserIdsis required.- Missing required fields yields
invalid-query.
2) File format
fileFormatmust be one ofcsvorjson.- Otherwise the API returns
json-serialization-error(as shown in the example).
3) Time interval definition
You must use exactly one of:- Relative interval:
lookbackWindow(minutes from now). - Absolute interval:
startDate(and optionallyendDate).
lookbackWindowmust be within 60–1440.lookbackWindowcannot be combined withstartDateand/orendDate.startDateis mutually exclusive withlookbackWindow.startDatemust be within the last 24 hours relative to “now”. Requests with an olderstartDateare rejected.- If
startDateis provided andendDateis omitted,endDatedefaults to the current time.
4) Time zone
timezonemust exist in the IANA Time Zone database.- Invalid time zones yield
invalid-query(as part of “invalid query definition”).
5) Dimension combination constraints
- Only one of the following dimensions can be used in a single request:
productIdhourminute
invalid-dimensioncombination.
6) Report lifecycle constraints
- Downloading output is only valid when
status == Done. - If the job does not exist (or is not visible), the API returns
export-not-foundand maps it to HTTP403. - If the job exists, but the output has been permanently deleted, the API returns
export-alreadyexpired.
7) Caching behavior (identical requests)
- Identical requests may reuse cached results, meaning a previous export/report ID may be returned instead of generating a new export.