Report API
Endpoints
Base URL: https://developers.insticator.com
GET /api/v1/reports/list
Retrieve a list of reports created for an account. For the accountId value, please reach out to the account manager. They should be able to provide it. To generate the authorization header value, visit the developer tools page in the Publisher Portal. Please note that the Authorization
header and accountId
are required for all requests.
Headers:
Key | Type | Required | Description |
---|---|---|---|
authorization | String | Yes | Unique user key |
Request Body:
Key | Type | Required | Description |
---|---|---|---|
accountId | String | Yes | Unique publisher account ID |
Response:
A list of reports, please see sample report response below.
Errors:
Status Code | Message |
---|---|
404 | Not found! |
401 | Authorization header missing! |
401 | Invalid account ID! |
500 | Internal Server Error |
GET /api/v1/report/:reportUUID
Retrieve the status of a specific report. For instance, /api/v1/report/41e1c183-4431-4dec-a090-54e6784ceb84
Headers:
Key | Type | Required | Description |
---|---|---|---|
authorization | String | Yes | Unique user key |
URL Parameters:
Key | Type | Required | Description |
---|---|---|---|
reportUUID | String | Yes | Unique report ID |
Request Body:
Key | Type | Required | Description |
---|---|---|---|
accountId | String | Yes | Unique publisher account ID |
Sample Response:
{
"reportUUID": "41e1c183-4431-4dec-a090-54e6784ceb84",
"accountUUID": "01905b65-fbfc-7792-9664-b37992d12747",
"name": "Report Name",
"dateRange": "CUSTOM",
"from": "2024-02-13",
"to": "2024-02-19",
"dimensions": [
"DATE"
],
"metrics": [
"NET_REVENUE"
],
"filters": {
"DEVICE": [
"DESKTOP"
]
},
"schedule": {
"frequency": "ONCE",
"format": "CSV",
"recipientEmails": ["[email protected]"]
},
"createdAt": 1719511328000,
"reportStatus": "Ready"
}
Errors:
Status Code | Message |
---|---|
500 | Not found! |
401 | Authorization header missing! |
401 | Invalid account ID! |
POST /api/v1/report
Generate a new report.
Headers:
Key | Type | Required | Description |
---|---|---|---|
authorization | String | Yes | Unique user key |
Request Body:
Key | Type | Required | Description |
---|---|---|---|
accountId | String | Yes | Unique publisher account ID |
name | String | Yes | Name of the report(It must always be unique) |
dateRange | String | Yes | Interval for which the report is generatedYESTERDAY ,LAST_SEVEN_DAYS ,LAST_THIRTY_DAYS ,LAST_WEEK ,LAST_MONTH ,CUSTOM |
from | Date | No | Start date of the interval, e.g) 2024-05-05 |
to | Date | No | End date of the interval, e.g) 2024-05-07 |
dimensions | Array | Yes | Array of dimensions, DATE ,YEAR ,WEEK ,MONTH ,QUARTER ,PRODUCT_TYPE ,SITE |
metrics | Array | Yes | Metrics for the report. Possible values are,NET_REVENUE ,TOTAL_IMPRESSIONS ,MONETIZABLE_PAGE_VIEW ,AVG_RPM ,VIEWABILITY ,BID_RATE ,WIN_RATE ,AD_REQUEST |
filters | Object | Yes | Filters based on GEO , and DEVICE Possible values Geo: ANSI country code, e.g. US , CA , UK Device: MOBILE , DESKTOP |
schedule | Object | Yes | Scheduling details (frequency , format , recipientEmails )Possible values Frequency: ONCE ,DAILY ,WEEKLY ,MONTHLY Format: CSV , XLSX Recipient Emails: email address in String |
Errors:
Status Code | Message |
---|---|
500 | Internal Server Error |
401 | Authorization header missing! |
401 | Invalid account ID! |
GET /api/v1/report/:reportUUID/download
Download a generated report.
Headers:
Key | Type | Required | Description |
---|---|---|---|
authorization | String | Yes | Unique user key |
URL Parameters:
Key | Type | Required | Description |
---|---|---|---|
reportUUID | String | Yes | Unique report ID |
Request Body:
Key | Type | Required | Description |
---|---|---|---|
accountId | String | Yes | Unique publisher account ID |
Response:
CSV, XLSX file of the report.
Errors:
Status Code | Message |
---|---|
500 | No report record found! |
500 | No report file found! |
401 | Authorization header missing! |
401 | Invalid account ID! |
500 | Failed to generate report! |
DELETE /api/v1/report/:reportUUID
Delete a specific report.
Headers:
Key | Type | Required | Description |
---|---|---|---|
authorization | String | Yes | Unique user key |
URL Parameters:
Key | Type | Required | Description |
---|---|---|---|
reportUUID | String | Yes | Unique report ID |
Request Body:
Key | Type | Required | Description |
---|---|---|---|
accountId | String | Yes | Unique publisher account ID |
Response:
Status Code | Message |
---|---|
200 | Report has been deleted successfully. |
Errors:
Status Code | Message |
---|---|
500 | Report not found! |
401 | Authorization header missing! |
401 | Invalid account ID! |
500 | Internal Server Error |
Sample Requests
Retrieving a list of reports under an account
curl --location --request GET 'https://developers.insticator.com/api/v1/reports/list' \
--header 'authorization: <api_key>' \
--header 'Content-Type: application/json' \
--data '{
"accountId": "<account_id>"
}'
Retrieving a report
curl --location --request GET 'https://developers.insticator.com/api/v1/report/<reportUUID>' \
--header 'authorization: <api_key>' \
--header 'Content-Type: application/json' \
--data '{
"accountId": "<account_id>"
}'
Generate a new report
curl --location 'https://developers.insticator.com/api/v1/report' \
--header 'authorization: <api_key>' \
--header 'Content-Type: application/json' \
--data '{
"accountId": "<account_id>",
"name": "report_name",
"dateRange": "YESTERDAY",
"dimensions": [
"DATE",
"WEEK",
"MONTH",
"PRODUCT_TYPE"
],
"metrics": [
"NET_REVENUE",
"TOTAL_IMPRESSIONS"
],
"filters": {
"GEO": [
"US"
]
},
"schedule": {
"frequency": "ONCE",
"format": "CSV",
"recipientEmails": [
"[email protected]"
]
}
}'
Downloading a report
curl --location --request GET 'https://developers.insticator.com/api/v1/report/<reportUUID>/download' \
--header 'authorization: <api_key>' \
--header 'Content-Type: application/json' \
--data '{
"accountId": "<account_id>"
}'
Deleting a report
curl --location --request DELETE 'https://developers.insticator.com/api/v1/report/<reportUUID>' \
--header 'authorization: <api_key>' \
--header 'Content-Type: application/json' \
--data '{
"accountId": "<account_id>"
}'
Updated 4 months ago