[Campaigns] Get Campaign Categories

Retrieve Categories for a Campaign

The categories associated with a specific campaign can be retrieved via a GET request to the /campaigns endpoint, with the campaign ID as a URL parameter and /categories specified.

https://api.criteo.com/legacy/marketing/v1/campaigns/{campaignId}/categories
curl --request GET \ --url https://api.criteo.com/legacy/marketing/v1/campaigns/1234/categories \ --header 'Accept: application/json'

The same request can be achieved with a GET request to the /categories endpoint and including a campaignIds query parameter :

https://api.criteo.com/legacy/marketing/v1/categories?campaignIds={campaignIds}
curl --request GET \ --url 'https://api.criteo.com/legacy/marketing/v1/categories?campaignIds=1234' \ --header 'Accept: application/json'

The API will return an array of categories associated with the campaign:

[ { categoryHashCode: 9876543, categoryName: 'cat-one', catalogId: 76543, catalogName: 'full-inventory', advertiserId: 1, advertiserName: 'Advertiser US', campaignId: 1234, campaignName: 'Web Conversion - Retargeting', averagePrice: 250.22, numberOfProducts: 151, categoryBid: { bidValue: 1.1, bidCurrency: 'USD', bidType: 'CPC' }, enabled: true } ]

 

Retrieve a Single Category for a Campaign

A single category can be retrieved for a specific campaign by making a GET request to the /campaigns endpoint for a specific campaign ID, and adding the /categories path with a particular category hash ID:

https://api.criteo.com/legacy/marketing/v1/campaigns/{campaignId}/categories/{categoryId}
curl --request GET \ --url https://api.criteo.com/legacy/marketing/v1/campaigns/1234/categories/9876543 \ --header 'Accept: application/json'

As above, an equivalent request can be constructed to the /categories endpoint by specifying campaignIds and categoryHashCodes query parameters:

https://api.criteo.com/legacy/marketing/v1/categories?campaignIds={campaignId}&categoryHashCodes={categoryHashCodes}
curl --request GET \ --url 'https://api.criteo.com/legacy/marketing/v1/categories?campaignIds=1234&categoryHashCodes=9876543' \ --header 'Accept: application/json'

 


What’s Next

Manage categories by enabling, disabling and adjusting bids

Did this page help you?