Skip to main content

Getting Ad Campaign Info

Campaign Info contains metadata about the advertising campaigns under a connected advertising account, including wether or not the campaign is connected to the Business Location. In order to access campagin level information or stats, the Business Location must have advanced reporting enabled.

Active Advertising Intelligence account required.

Setup

Create an access token with advertising scopes following the Authorization guide.

Examples

Fetching all Campaign Info for a connected account

In order to fetch campaign info for an account, you will need the ID of a Connected Account.

info

For info on Connected Advertising Accounts see the Connected Accounts guide

The ID will be in the format AG-X5FZQG6T25:google:1324354698

curl -X GET 'https://prod.apigateway.co/products/advertising/campaignInfo?connectedAccount.id=AG-HDV4JKPXFR%3Agoogle%3A6477366166' \
-H 'Authorization: Bearer <Access Token with "advertising" scope>' \
-H 'Content-Type: application/vnd.api+json'

For more details on this endpoint see List Campaign Info

Filtering Campaigns By Date and Connected Status

By default, this endpoint will return all campaigns under the connected account. If you want to get information for campaigns that start and end within a specific date range, you can set startAt and endAt parameters.

Similarly, if you want to get only campaigns that are connected or not connected to the business location, you can set the filter[isConnected] parameter to either true or false.

This example will get connected campaigns that run from 2020-07-01 to 2021-10-08.

curl -X GET 'https://prod.apigateway.co/products/advertising/campaignInfo?connectedAccount.id=AG-HDV4JKPXFR%3Agoogle%3A6477366166&filter%5BisConnected%5D=true&startAt=2020-07-01T00%3A00%3A00Z&endAt=2021-10-08T00%3A00%3A00Z' \
-H 'Authorization: Bearer <Access Token with "advertising" scope>' \
-H 'Content-Type: application/vnd.api+json'

For more details on this endpoint see List Campaign Info