List of Contextual and behavioral Targets in a Campaign
Use this API to fetch list of all contextual targets & behavioral audiences available for targeting
URL: POST api/v2/targeting/list
Request Parameters
Parameter | Notes | Type | Required | Possible Values |
---|---|---|---|---|
advertiserId | ID of the advertiser | integer | Y | Unique numeric identifier |
Filter[tactic] | List of available targets of the specific tactic | string | Y |
|
Filter[id] | Returns details of specific targets/audiences based on the given ID. | array | N | Valid ID of the target or audience |
Filter[audienceType] Note: Only applicable for audience targeting | Returns response for specific audience type | string | Y |
|
Filter[attribute] Note: Only applicable for audience targeting | Returns response for a specific audience attribute | string | Y |
Note: Values of attribute, based upon audienceType:
|
searchText | Appropriate string of text to get details of specific targets/audiences | string | N | Valid string of text |
startIndex | You can use this parameter to fetch specific number of targets/audiences from the available list. This indicates the starting position of the list Note: To return the first ten contextual/behavioral targeting entries, set startIndex=0 and count=10 | integer | N | Integer value |
count | You can use this parameter in combination with startIndex to fetch specific number of targets/audiences from the available list. Note: To return the first ten contextual/behavioral targeting entries, set startIndex=0 and count=10 | integer | N | Integer value |
Headers
Header Name | Description | Required | Values |
---|---|---|---|
Authorization | The token will provide you the access to the API. It is same for all advertisers you access through the API. | Y | Please utilize the generated auth_token shared with you at the time of partner onboarding from the Getting Started Guide |
WM_CONSUMER.ID | We will provide you the consumer ID to access the API. It is same for all advertisers you access through the API. | Y | Please use the generated ConsumerId shared with you at the time of partner onboarding. Refer to the Getting Started Guide for more information |
WM_SEC.AUTH_SIGNATURE | Auth signature as an API key. | Y | Use the signature generator code from Getting Started Guide to generate this value |
WM_SEC.KEY_VERSION | We will provide you with the KEY VERSION to access the API. It is same for all advertisers you access through the API. | Y | 1 |
WM_CONSUMER.intimestamp | Timestamp for which the auth signature is generated. Use Unix epoch format for the timestamp. | Y | Use the signature generator code from Getting Started Guide to generate this value |
Sample Contextual Targeting Request
curl -X POST \ 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v2/targeting/list' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <auth_token>' \ --header 'WM_SEC.AUTH_SIGNATURE: **************' \ --header 'WM_SEC.KEY_VERSION: 1' \ --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' --data '{ "advertiserId": 1, "Filter[tactic]": "contextual", "Filter[id]": [100,10], "searchText": "Test", "startIndex": 0, "count": 10 }'
Sample Behavioral Targeting Request
curl -X POST \ 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v2/targeting/list' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <auth_token>' --header 'WM_SEC.AUTH_SIGNATURE: **************' \ --header 'WM_SEC.KEY_VERSION: 1' \ --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' --data '{ "advertiserId": "500003", "Filter[tactic]": " behavioral", "Filter[audienceType]": "retail", "Filter[attribute]": "historical", "Filter[id]": [100,10], "searchText": "Test", "startIndex": 0, "count": 10 }'
Response
Element | Description | Type |
---|---|---|
totalResults | Total number of rows returned in the response | integer |
contextual | Elements of array:
| string |
behavioral | Elements of array:
|
Sample Response - Contextual Targeting
{ "totalResults": 2, "contextual": [ { "id": 1, "name": "12 and up", "taxonPath": "toys & games|12 and up", "reach": [ "TIER_1", "TIER_2", "TIER_3", "TIER_4", "TIER_5", "TIER_6", "TIER_7" ], "isDisabled": false }, { "id": 1, "name": "2 to 4", "taxonPath": "toys & games|2 to 4", "reach": [ "TIER_1", "TIER_2", "TIER_3", "TIER_4", "TIER_5", "TIER_6", "TIER_7" ], "isDisabled": false } ]
}
Response Sample Behavioral Targeting - Category
{ "totalResults": 2, "behavioral": [ { "id": 1, "name": "X", "taxonPath": "Y|Z|X", "isDisabled": true, "audienceType": "RETAIL", "attribute": "HISTORICAL" }, { "id": 1, "name": "Y", "taxonPath": "Y|M|Y", "isDisabled": true, "audienceType": "RETAIL", "attribute": "HISTORICAL" } ]
}
Response Sample Behavioral Targeting - Brand
{ "totalResults": 2, "behavioral": [ { "id": 1, "name": "X", "isDisabled": true, "audienceType": "BRAND", "attribute": "LAPSED_BUYERS" }, { "id": 1, "name": "Y", "isDisabled": true, "audienceType": "BRAND", "attribute": "LAPSED_BUYERS" } ]
}
Response Sample Behavioral Targeting - Persona
{ "totalResults": 2, "behavioral": [ { "id": 1, "name": "X", "isDisabled": true, "audienceType": "PERSONA", "attribute": "LIFESTYLE" }, { "id": 1, "name": "Y", "isDisabled": true, "audienceType": "PERSONA", "attribute": "LIFESTYLE" } ]
}
Updated 12 days ago