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 audience IDs |
| Filter[audienceType] Note: Only applicable for audience targeting | Returns response for specific audience type | string | Conditional
|
|
| Filter[attribute] Note: Only applicable for audience targeting | Returns response for a specific audience attribute | string | Conditional
| 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 Request - Fetch list for specific contextual targets using ID and searchText
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 Request - Fetch list for Recent buyers of a category
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]": "BEHAVIORAL", "Filter[audienceType]": "RETAIL", "Filter[attribute]": "HISTORICAL", "startIndex": 0, "count": 100
}' Sample Request - Fetch list for Lapsed buyers of a brand
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]": "BEHAVIORAL", "Filter[audienceType]": "BRAND", "Filter[attribute]": "LAPSED_BUYERS", "startIndex": 0, "count": 100
}' Sample Request - Fetch list for audiences likely to engage based on shopping habits
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]": "BEHAVIORAL", "Filter[audienceType]": "BRAND", "Filter[attribute]": "LAPSED_BUYERS", "startIndex": 0, "count": 100
}' Sample Request - Fetch list of Rule based custom audiences
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]": "BEHAVIORAL", "Filter[audienceType]": "CUSTOM", "Filter[attribute]": "RULE_BASED", "startIndex": 0, "count": 100
}' Sample Request - Fetch list of audiences based on age
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]": "BEHAVIORAL", "Filter[audienceType]": "DEMOGRAPHIC", "Filter[attribute]": "AGE", "startIndex": 0, "count": 5
}' Sample Request - Fetch list of audiences based on gender
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]": "BEHAVIORAL", "Filter[audienceType]": "DEMOGRAPHIC", "Filter[attribute]": "GENDER", "startIndex": 0, "count": 5
}' Sample Request - Fetch specific audience using ID across all available audiences
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]": "BEHAVIORAL", "Filter[id]": [123], "startIndex": 0, "count": 100
}' Fetch list of all audiences matching the searchText across all available audiences
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]": "BEHAVIORAL", "searchText": "test", "startIndex": 0, "count": 100
}' Response
| Element | Description | Type |
|---|---|---|
| totalResults | Total number of rows returned in the response | integer |
| contextual | Elements of array:
Note: contextual object is applicable when tactic = RETAIL | string |
| behavioral | Elements of array:
Note: behavioral object is applicable when tactic = BEHAVIORAL |
Sample Response Success- Fetch list for specific contextual targets using ID and searchText
{ "totalResults": 2, "contextual": [ { "id": 100, "name": "12 and up Test", "taxonPath": "toys & games|12 and up", "reach": [ "TIER_1", "TIER_2", "TIER_3", "TIER_4", "TIER_5", "TIER_6", "TIER_7" ], "isDisabled": false }, { "id": 10, "name": "Test 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 } ]
} Sample Response Failure - Fetch list for specific contextual targets using ID and searchText
{ "code": "failure", "details": ["string"] } Sample Response Success - Fetch list for Recent buyers of a 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" } ]
} Sample Response Failure - Fetch list for Recent buyers of a category
{ "code": "failure", "details": [ "string" ]
} Sample Response Success - Fetch list for Lapsed buyers of a 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" } ]
} Sample Response Failure - Fetch list for Lapsed buyers of a brand
{ "code": "failure", "details": [ "string" ]
} Sample Response Success - Fetch list for audiences likely to engage based on shopping habits
{ "totalResults": 2, "behavioral": [ { "id": 1, "name": "X", "isDisabled": true, "audienceType": "PERSONA", "attribute": "LIFESTYLE" }, { "id": 1, "name": "Y", "isDisabled": true, "audienceType": "PERSONA", "attribute": "LIFESTYLE" } ]
} Sample Response Failure - Fetch list for audiences likely to engage based on shopping habits
{ "code": "failure", "details": [ "string" ]
} Sample Response Success - Fetch list of Rule based custom audiences
{ "totalResults": 2, "behavioral": [ { "id": 1, "name": "czczcz", "isDisabled": true, "audienceType": "CUSTOM", "attribute": "RULE_BASED" }, { "id": 1, "name": "czczczcz", "isDisabled": true, "audienceType": "CUSTOM", "attribute": "RULE_BASED" } ]
}
Sample Response Success - Fetch list of Rule based custom audiences
{ "code": "failure", "details": [ "string" ]
} Sample Response Success - Fetch list of audiences based on age
{ "totalResults": 1, "behavioral": [ { "id": 1, "name": "Ages 18–24 test", "isDisabled": false, "audienceType": "DEMOGRAPHIC", "attribute": "AGE" } ]
}
Sample Response Failure - Fetch list of audiences based on age
{ "code": "failure", "details": [ "string" ]
} Sample Response Success - Fetch list of audiences based on gender
{ "totalResults": 1, "behavioral": [ { "id": 1, "name": "Men test", "isDisabled": false, "audienceType": "DEMOGRAPHIC", "attribute": "GENDER" } ]
}
Sample Response Failure - Fetch list of audiences based on gender
{ "code": "failure", "details": [ "string" ]
} Sample Response Success - Fetch specific audience using ID across all available audiences
{ "totalResults": 1, "behavioral": [ { "id": 123, "name": "Less than $24,999 test", "isDisabled": false, "audienceType": "DEMOGRAPHIC", "attribute": "HOUSEHOLD_INCOME" } ]
}
Sample Response Failure - Fetch specific audience using ID across all available audiences
{ "code": "failure", "details": [ "string" ]
} Sample Response Success - Fetch list of all audiences matching the searchText across all available audiences
{ "totalResults": 1, "behavioral": [ { "id": 123, "name": "Less than $24,999 test", "isDisabled": false, "audienceType": "DEMOGRAPHIC", "attribute": "HOUSEHOLD_INCOME" } ]
}
Sample Response Failure - Fetch list of all audiences matching the searchText across all available audiences
{ "code": "failure", "details": [ "string" ]
} Updated 19 days ago
