Appearance
Report API
Overview
This API allows advertisers to retrieve daily report data including impressions, clicks, conversions, and spend metrics.
Endpoint
POST https://ofa.adx.opera.com/oapi/v1/report/campaign_dailyAuthentication
Use Bearer token authentication.
Authorization: Bearer <token>Note: Please contact Opera Ads to obtain your API token.
Request
Headers
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Authorization | Yes | Bearer <token> |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filters | array | Yes | Filter conditions for the query |
| measurements | array | No | Fields to return. If not provided, defaults to all available measurements |
| page | int | No | Page number (starts from 1), default: 1 |
| page_size | int | No | Number of records per page, default: 50, max: 1000 |
Filters
| Name | Type | Required | Description |
|---|---|---|---|
| day | dayRange | Yes | Date range in format ["YYYYMMDD", "YYYYMMDD"]. Max 90 days. |
| order_id | stringArray | No | Filter by order IDs |
| lineitem_id | stringArray | No | Filter by line item IDs |
| creative_id | stringArray | No | Filter by creative IDs |
Filter Example:
json
{
"filters": [
{ "name": "day", "value": ["20260101", "20260107"] },
{ "name": "order_id", "value": ["order123", "order456"] }
]
}Measurements
| Name | Description |
|---|---|
| day | Date (YYYYMMDD format) |
| advertiser_id | Advertiser ID |
| order_id | Order ID |
| lineitem_id | Line item ID |
| creative_id | Creative ID |
| spent | Spend amount in USD |
| impressions | Number of impressions |
| clicks | Number of clicks |
| conversions | Number of conversions |
Default Measurements (when not specified):
json
["day", "advertiser_id", "order_id", "lineitem_id", "creative_id", "spent", "impressions", "clicks", "conversions"]Response
Success Response
json
{
"code": 0,
"message": "ok",
"pagination": {
"page": 1,
"page_size": 50,
"total_count": 100,
"total_pages": 2
},
"data": [
{
"day": "20260107",
"advertiser_id": "adv123456",
"advertiser_name": "Example Advertiser",
"order_id": "order789",
"order_name": "Campaign Q1",
"lineitem_id": "ad456",
"lineitem_name": "Banner Ad 1",
"creative_id": "crid789",
"creative_name": "Creative 300x250",
"spent": "125.500",
"impressions": 50000,
"clicks": 1500,
"conversions": 75
}
]
}Response Fields
| Field | Type | Description |
|---|---|---|
| code | int | Status code. 0 = success |
| message | string | Status message |
| pagination | object | Pagination information |
| data | array | Array of report data records |
Pagination Object
| Field | Type | Description |
|---|---|---|
| page | int | Current page number |
| page_size | int | Number of records per page |
| total_count | int | Total number of records matching the query |
| total_pages | int | Total number of pages |
Error Responses
| HTTP Status | Code | Message | Description |
|---|---|---|---|
| 400 | 1 | invalid request | Invalid request parameters (e.g., invalid date range, missing required filters) |
| 401 | 2 | token not provided or invalid token | Authorization header is missing. Or Token is invalid / disabled. |
| 429 | 3 | too many request | Rate limit exceeded (100 requests per minute) |
| 500 | 4 | internal error | Server error |
Rate Limiting
- Rate Limit: 100 requests per minute.
- Exceeding the rate limit returns HTTP status
429with code3
Examples
Basic Request
Query with only the required date filter, returns all default measurements.
bash
curl --location 'https://ofa.adx.opera.com/oapi/v1/report/campaign_daily' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer your_token_here' \
--data '{
"filters": [
{"name": "day", "value": ["20260101", "20260107"]}
]
}'Advanced Request
Query with multiple filters, custom measurements, and pagination.
bash
curl --location 'https://ofa.adx.opera.com/oapi/v1/report/campaign_daily' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer your_token_here' \
--data '{
"filters": [
{"name": "day", "value": ["20260101", "20260107"]},
{"name": "order_id", "value": ["order123"]},
{"name": "lineitem_id", "value": ["ad456", "ad789"]}
],
"measurements": ["day", "order_id", "lineitem_id", "spent", "impressions", "clicks"],
"page": 1,
"page_size": 50
}'Notes
- Pagination: Use
pageandpage_sizefor pagination. Thepaginationobject in the response containstotal_count(total matching records) andtotal_pages(total number of pages).
