Skip to content

Read Only REST Endpoints

Kenny Katzgrau edited this page Nov 9, 2020 · 8 revisions

Broadstreet's PHP-based REST Client is used by the Broadstreet Wordpress plugin. The underlying REST API is used by Broadstreet customers for general data access, updates, and reporting.

All API calls take an access token as a parameter. Every network administrator has an access token, available here: http://my.broadstreetads.com/access-token

The API base URL is: https://api.broadstreetads.com

All endpoints return JSON unless otherwise noted to return a CSV

And example of an API call to retrieve a list of accessible networks would be: https://api.broadstreetads.com/api/0/networks?access_token=ACCESS_TOKEN_HERE

Networks

List

GET /api/0/networks

Show

GET /api/0/networks/NETWORKID

Zones

LIST

List

GET /api/0/networks/NETWORKID/zones

Show

GET /api/0/networks/NETWORKID/zones/ZONEID

Advertisers

List

GET /api/0/networks/NETWORKID/advertisers

Show

GET /api/0/networks/NETWORKID/zones/ZONEID

Campaigns

List

GET /api/0/networks/NETWORKID/advertisers/ADVERTISERID/campaigns

Reports

Note the difference in the base URI below

Monthly Campaign Records as CSV

GET /networks/NETWORKID/advertisers/ADVERTISERID/campaigns/CAMPAIGN_ID/campaign_records.csv?month=9&year=2018

This endpoint takes additional query string parameters:

month: A numeric digit representing the month, such as "1" for January

year: Four digits representing the year, like "2020"

Global Advertisement Records as CSV

GET /networks/NETWORKID/performance.csv

This endpoint takes additional query string parameters:

start_date: A date to start reporting on in yyyy-mm-dd format, like "2020-01-01"

end_date: A date to end reporting on, inclusive, in yyyy-mm-dd format, like "2020-01-31"

General Reporting

GET /api/1/records

This endpoint takes additional query string parameters:

type (required): The entity you are reporting on. Options: advertiser, campaign, advertiser

id (required): The ID of the entity you are reporting on, like 12345 (for example, and ID in the results that back back from a LIST or SHOW method. The API user must have access to the entity passed in

start_date: A date to start reporting on in yyyy-mm-dd format, like "2020-01-01"

end_date: A date to end reporting on, inclusive, in yyyy-mm-dd format, like "2020-01-31"