DSP reporting API specification
Architecture
TheViewPoint Reporting API is designed to allow the DSPs to access reporting. The API is implemented as a REST API over the HTTP protocol.
Accessing the API
Your DSP must be integrated and the test period must be completed
Please contact TVP Integration Manager for API access and authorization credentials.
API Caps
By default, you are limited to 500 API requests per 24 hours.
Authorization
REST API
Method: POST URL: https://divan.theviewpoint.com/admin/dsp/report-api/api-key
Headers
ContentType | application/json |
Authorization | Credential {api_key};{dsp_id} |
Where {api_key} and {dsp_id} is your DSP api key and DSP ID that has been received from your TVP integration support manager, looks like ‘f52612cf3af649d0bebbcb0b78114d39’ and ‘D001’
Response
Status code 200
token:
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJBQTAxIiwiYXBpX2F1dGhvcml0aWVzIjpbXSwiZXhwIjoxNjAzOTUzNTAzfQ.tMlpG-zgHaUrWUI68hdYbYOFbEc08aWvFCEvZXhzMwKi94mooTH5JJ1yn-RO67Bbh71MtgRUo_YzJgjP6hY35Q |
cURL Example
curl 'https://divan.theviewpoint.com/admin/dsp/report-api/api-key' -H 'Authorization: Credential ‘f52612cf3af649d0bebbcb0b78114d39;D001' --compressed --insecure |
Notes
A token expires after 24 hours.
Once you receive the token, you need to add it to your header for all further API requests.
Requesting report
REST API - get JSON
Method: POST URL: https://divan.theviewpoint.com/admin/dsp/report-api/get
Headers
ContentType | application/json |
Authorization | Credential {access_token} |
Where {access_token} is access token that you has been received on Authorization step, looks like ‘eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJBQTAxIiwiYXBpX2F1dGhvcml0aWVzIjpbXSwiZXhwIjoxNjAzOTUzNTAzfQ.tMlpG-zgHaUrWUI68hdYbYOFbEc08aWvFCEvZXhzMwKi94mooTH5JJ1yn-RO67Bbh71MtgRUo_YzJgjP6hY35Q’
The Reporting API section in the DSP settings, where the ability to access the report for DSP via API is enabled with a limitation on the number of calls.
The link is formed for the DSP. Parameters such as DSP_ID, API_KEY, Start date, end date, dimentions, metrics
JSON / CSV given by request:
Segments and Filters:
Segments and Filters | Description |
---|---|
Date range | Selected period of dates |
Intervals & timezone | Selected time zone and intervals (for example, day) |
Account id | Account id value |
App store id | App store id value |
Deal id | Deal id value |
Seat id | Seat id value |
Creative / tag | Creative / tag link |
DSP filter by id of this dsp | DSP id |
Metrics | Description |
---|---|
Bid requests | Bid requests quantity |
Bid | Bids quantity |
Wins | Wins quantity |
Impressions | Impressions quantity |
Gross revenue | Gross revenue value |
No-bid | No-bids quantity |
Invalid bid | Invalid bids quantity |
Body
The reporting request (POST) body is in the following JSON format:
{ "startDate": "2021-01-01T00:00:00.000Z", "endDate": "2021-01-01T23:59:59.999Z", "timezone": "UTC-0", "dimensions": [ "ACCOUNT_CUSTOM_ID" ], "metrics": [ "BID_REQUESTS" ], "intervals": [ 'DAY" ], "filters": [{ "dimension": "ACCOUNT_CUSTOM_ID", "values": [ "AA01" ] }] } |
Response - JSON
Status code 200
{ "data": [ { "date": "2021-01-01 00:00:00", "accountCustomId": "AA01", "bidRequests": 1 } ], "totals": { "bidRequests": 1 } } |