Skip to content

Get line item reporting metrics

POST
/reporting/line-items
curl --request POST \
--url https://portal.staging.arago-tech.com/reporting/line-items \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "line_item_ids": [ "63e2d42a27ad5f2b345ca123", "63e2d42a27ad5f2b345ca124" ], "key_performance_indicators": [ "KEY_PERFORMANCE_INDICATOR_IMPRESSION", "KEY_PERFORMANCE_INDICATOR_CLICK" ], "sort": { "desc": true, "field": "impression" }, "date_range": { "from": "2021-01-01T00:00:00Z", "to": "2021-01-31T00:00:00Z" } }'

Returns aggregated performance metrics for specific line items

Returns aggregated line item metrics grouped by line item, creative, and resolution

Media typeapplication/json
Get report at line item level

Returns aggregated line item metrics grouped by line item, creative, and resolution

object
line_item_ids
required
Line Item IDs

The unique identifiers of the line items to get metrics from

Array<string>
>= 1 items <= 50 items
Example
[
"63e2d42a27ad5f2b345ca123",
"63e2d42a27ad5f2b345ca124"
]
key_performance_indicators
Key Performance Indicators

Optional key performance indicators that will be returned in the metrics series. When omitted, all key performance indicators are returned.

Array<string>
Allowed values: KEY_PERFORMANCE_INDICATOR_UNSPECIFIED KEY_PERFORMANCE_INDICATOR_IMPRESSION KEY_PERFORMANCE_INDICATOR_CLICK KEY_PERFORMANCE_INDICATOR_VIEWABILITY_MEASURABLE KEY_PERFORMANCE_INDICATOR_VIEWABLE_MRC_50 KEY_PERFORMANCE_INDICATOR_SPEND KEY_PERFORMANCE_INDICATOR_COST_PER_MILLE KEY_PERFORMANCE_INDICATOR_VIEWABLE_COST_PER_MILLE KEY_PERFORMANCE_INDICATOR_MEASUREMENT_RATE KEY_PERFORMANCE_INDICATOR_VIEW_THROUGH_RATE KEY_PERFORMANCE_INDICATOR_CLICK_THROUGH_RATE
Example
[
"KEY_PERFORMANCE_INDICATOR_IMPRESSION",
"KEY_PERFORMANCE_INDICATOR_CLICK"
]
sort
Sort

Optional sort parameters for ordering the results. Can be “line_item_id”, “creative_id”, “resolution”, “impression”, “click”, “viewability_measurable”, “viewable_mrc_50”, “spend”, “cost_per_mille”, “viewable_cost_per_mille”, “measurement_rate”, “view_through_rate”, “click_through_rate”.

object
field
Field

The field to sort by. This should be a valid field name in the context of the request.

string
desc
Desc

The sort order. If true, the results will be sorted in descending order. If false, the results will be sorted in ascending order.

boolean
Example
{
"desc": true,
"field": "impression"
}
date_range
Date Range

Optional date range filter. When omitted, all-time metrics are returned.

object
from
From Date

Filter items with date on or after this timestamp

string format: date-time
Example
2024-01-01T00:00:00Z
to
To Date

Filter items with date strictly before this timestamp. Must be after ‘from’ when both are provided.

string format: date-time
Example
2025-01-01T00:00:00Z
Example
{
"from": "2021-01-01T00:00:00Z",
"to": "2021-01-31T00:00:00Z"
}

A successful response.

Media typeapplication/json
object
aggregated_metrics
Array<object>
object
line_item_id
string
creative_id
string
resolution
string
impression
string format: uint64
click
string format: uint64
viewability_measurable
string format: uint64
viewable_mrc_50
string format: uint64
spend
number format: double
cost_per_mille
number format: double
viewable_cost_per_mille
number format: double
measurement_rate
number format: double
view_through_rate
number format: double
click_through_rate
number format: double
Examplegenerated
{
"aggregated_metrics": [
{
"line_item_id": "example",
"creative_id": "example",
"resolution": "example",
"impression": "example",
"click": "example",
"viewability_measurable": "example",
"viewable_mrc_50": "example",
"spend": 1,
"cost_per_mille": 1,
"viewable_cost_per_mille": 1,
"measurement_rate": 1,
"view_through_rate": 1,
"click_through_rate": 1
}
]
}

Bad request

Media typeapplication/json
object
Example
{
"error": {
"code": "BAD_REQUEST",
"details": [
{
"code": "MAX_ITEMS",
"field": "line_items",
"message": "value must contain no more than 3000 item(s)",
"params": {
"max": "3000"
}
}
],
"message": "Bad request"
}
}

Unauthorized

Media typeapplication/json
object
Example
{
"error": {
"code": "UNAUTHORIZED",
"message": "Unauthorized"
}
}

Internal server error

Media typeapplication/json
object
Example
{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
}
}

An unexpected error response.

Media typeapplication/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
any
Examplegenerated
{
"code": 1,
"message": "example",
"details": [
{
"@type": "example"
}
]
}