Get line item reporting metrics
const url = 'https://portal.staging.arago-tech.com/reporting/line-items';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"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"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Returns aggregated line item metrics grouped by line item, creative, and resolution
Returns aggregated line item metrics grouped by line item, creative, and resolution
object
The unique identifiers of the line items to get metrics from
Example
[ "63e2d42a27ad5f2b345ca123", "63e2d42a27ad5f2b345ca124"]Optional key performance indicators that will be returned in the metrics series. When omitted, all key performance indicators are returned.
Example
[ "KEY_PERFORMANCE_INDICATOR_IMPRESSION", "KEY_PERFORMANCE_INDICATOR_CLICK"]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
The field to sort by. This should be a valid field name in the context of the request.
The sort order. If true, the results will be sorted in descending order. If false, the results will be sorted in ascending order.
Example
{ "desc": true, "field": "impression"}Optional date range filter. When omitted, all-time metrics are returned.
object
Filter items with date on or after this timestamp
Example
2024-01-01T00:00:00ZFilter items with date strictly before this timestamp. Must be after ‘from’ when both are provided.
Example
2025-01-01T00:00:00ZExample
{ "from": "2021-01-01T00:00:00Z", "to": "2021-01-31T00:00:00Z"}Responses
Section titled “ Responses ”A successful response.
object
object
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
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
object
Example
{ "error": { "code": "UNAUTHORIZED", "message": "Unauthorized" }}Internal server error
object
Example
{ "error": { "code": "INTERNAL_ERROR", "message": "Internal server error" }}default
Section titled “default”An unexpected error response.
object
object
Examplegenerated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}