Use this endpoint to run a custom report.
Request
End Point https://business.newsbreak.com/business-api/v1/reports/getReportById
Method GET
Header
| Field | Required | Data Type | Description |
|---|---|---|---|
| Access-Token | Y | string | Authorized access token. |
Request Parameters
| Field | Required | Data Type | Description |
|---|---|---|---|
| reportId | Y | string | ID of this report. |
Example
curl --location --request GET 'https://business.newsbreak.com/business-api/v1/reports/getReportById/123456789' \
-H 'Access-Token:{{Access-Token}}'
Response
Response Parameters
| Field | Data Type | Description |
|---|---|---|
| code | int | Status code, see Return Codes. |
| errMsg | string | Error message when code!=0. |
| data | object | Response object. |
| └── rows | object[] | List of reports returned. |
| └── date | string | Date. |
| └── hour | string | Hour. |
| └── adAccountId | string | Ad account ID. |
| └── adAccount | string | Ad account name. |
| └── orgId | string | Organization ID. |
| └── organization | string | Organization name. |
| └── campaignId | string | Campaign ID. |
| └── campaign | string | Campaign name. |
| └── adSetId | string | Ad set ID. |
| └── adSet | string | Ad set name. |
| └── adId | string | Ad ID. |
| └── ad | string | Ad name. |
| └── placement | string | Placement name. |
| └── country | string | Country name. |
| └── costDecimal | double | Cost in cents. |
| └── cost | int | Cost in cents. |
| └── impression | int | Impression. |
| └── click | int | Click. |
| └── conversion | int | Conversion. |
| └── conversionValueDecimal | double | Total conversion value in cents. |
| └── conversionValue | int | Total conversion value. |
| └── cpmDecimal | double | CPM in cents, -1.0 if N/A. |
| └── cpm | int | CPM in cents, -1 if N/A. |
| └── cpcDecimal | double | CPC in cents, -1.0 if N/A. |
| └── cpc | int | CPC in cents, -1 if N/A. |
| └── cpaDecimal | double | Cost per action in cents, -1.0 if N/A. |
| └── cpa | int | Cost per action in cents, -1 if N/A. |
| └── ctr | int | CTR * 10000 in basis points, -1 if N/A. |
| └── cvr | int | CVR * 10000 in basis points, -1 if N/A. |
| └── vpaDecimal | double | Value per action in cents, -1.0 if N/A. |
| └── vpa | int | Value per action in cents, -1 if N/A. |
| └── eventCount | object | Event type and the total count of each event. |
| └── eventValueDecimal | object | Event type and the total value of each event in double. |
| └── eventValue | object | Event type and the total value of each event. |
| └── eventCpaDecimal | object | Event type and CPA of each event in double. |
| └── eventCpa | object | Event type and CPA of each event. |
| └── eventVpaDecimal | object | Event type and VPA of each event in double. |
| └── eventVpa | object | Event type and VPA of each event. |
| └── eventCvr | object | Event type and CVR of each event. No eventCvr for app campaigns. |
| └── roas | double | ROAS of complete_payment evnet. |
| └── completePaymentRoas | double | Complete payment return on ad spend, -1.0 if N/A. |
| └── saleRoas | double | Sale return on ad spend, -1.0 if N/A. |
| └── appPurchaseRoas | double | App purchase return on ad spend, -1.0 if N/A. |
| └── appInAppAdImprRoas | double | App in app ad impression return on ad spend, -1.0 if N/A. |
| └── aggregateData | object[] | Aggregated summary data calculated from all report rows. Each object contains the total metrics over the queried period. |
Example
{
"code": 0,
"data": {
"rows": [
{
"date": "2023-10-20",
"adId": "123456789",
"ad": "example report",
"adSetId": "123456789",
"adSet": "example ad set",
"campaignId": "123456789",
"campaign": "example campaign",
"adAccountId": "123456789",
"adAccount": "example ad account",
"placement": "NewsBreak",
"country": "US",
"cost": 122715,
"costDecimal": 122715.0,
"impression": 67260,
"click": 1667,
"conversion": 311708,
"conversionValue": 220157,
"conversionValueDecimal": 220157.0,
"eventCount": {
"app_in_app_ad_impr": 312912
},
"eventValue": {
"app_in_app_ad_impr": 220263
},
"eventValueDecimal": {
"app_in_app_ad_impr": 220263.0
},
"eventCpa": {
"app_in_app_ad_impr": 654
},
"eventCpaDecimal": {
"app_in_app_ad_impr": 654.0
},
"eventVpa": {
"app_in_app_ad_impr": 274
},
"eventVpaDecimal": {
"app_in_app_ad_impr": 274.0
},
"eventCvr": {},
"roas": 1.7940512569775495,
"completePaymentRoas": 0.4194997370979588,
"saleRoas": -1.0,
"appPurchaseRoas": 0.0,
"appInAppAdImprRoas": 0.0,
"vpa": 32,
"vpaDecimal": 32.0,
"cpm": 1824,
"cpmDecimal": 1824.0,
"cpc": 73,
"cpcDecimal": 73.0,
"ctr": 248,
"cpa": 60,
"cpaDecimal": 60.0,
"cvr": 1869874
}
],
"aggregateData": [
{
"cost": 122715,
"costDecimal": 122715.0,
"impression": 67260,
"click": 1667,
"conversion": 311708,
"conversionValue": 220157,
"conversionValueDecimal": 220157.0,
"eventCount": {
"app_in_app_ad_impr": 312912
},
"eventValue": {
"app_in_app_ad_impr": 220263
},
"eventValueDecimal": {
"app_in_app_ad_impr": 220263.0
},
"eventCpa": {
"app_in_app_ad_impr": 654
},
"eventCpaDecimal": {
"app_in_app_ad_impr": 654.0
},
"eventVpa": {
"app_in_app_ad_impr": 274
},
"eventVpaDecimal": {
"app_in_app_ad_impr": 274.0
},
"eventCvr": {},
"completePaymentRoas": 0.4194997370979588,
"saleRoas": -1.0,
"appPurchaseRoas": 0.0,
"appInAppAdImprRoas": 0.0,
"vpa": 32,
"vpaDecimal": 32.0,
"cpm": 1824,
"cpmDecimal": 1824.0,
"cpc": 73,
"cpcDecimal": 73.0,
"ctr": 248,
"cpa": 60,
"cpaDecimal": 60.0,
"cvr": 1869874
}
]
}
}