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

ParameterNotesTypeRequiredPossible Values
advertiserId ID of the advertiserintegerYUnique numeric identifier
Filter[tactic]List of available targets of the specific tacticstringY
  • contextual
  • behavioral
Filter[id]Returns details of specific targets/audiences based on the given ID.arrayNValid audience IDs
Filter[audienceType]
Note: Only applicable for audience targeting
Returns response for specific audience typestringConditional
  • When tactic = CONTEXTUAL
    • audienceType is not required.
  • When tactic = BEHAVIORAL
    • audienceType is optional only if Filter[id] or searchText is provided.
    • Otherwise, audienceType is required.
  • retail
  • brand
  • custom
  • persona
  • demographic
Filter[attribute]
Note: Only applicable for audience targeting
Returns response for a specific audience attributestringConditional
  • When tactic = CONTEXTUAL
    • attribute is not required.
  • When tactic = BEHAVIORAL
    • if audienceType = CUSTOM, attribute is not required.
    • attribute is optional only if Filter[id] or searchText is provided.
    • Otherwise, attribute is required.
Values of attribute, based upon audienceType:
  1. When audienceType = retail: historical, predictive
  2. When audienceType = brand: historical, predictive, lapsed_buyers
  3. When audienceType = persona: lifestyle, lifestage, auto, shopping_habits, food_beverages
  4. When audienceType = demographic: age, gender, household_income
  5. When audienceType = custom: rule_based, propensity, brand_affinity, lookalike, advanced, external
searchTextAppropriate string of text to get details of specific targets/audiencesstringNValid string of text
startIndexYou 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
integerNInteger value
countYou 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
integerNInteger value

Headers

Header NameDescriptionRequiredValues
AuthorizationThe token will provide you the access to the API. It is same for all advertisers you access through the API.YPlease utilize the generated auth_token shared with you at the time of partner onboarding from the Getting Started Guide
WM_CONSUMER.IDWe will provide you the consumer ID to access the API. It is same for all advertisers you access through the API.   YPlease 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_SIGNATUREAuth signature as an API key.YUse the signature generator code from Getting Started Guide to generate this value
WM_SEC.KEY_VERSIONWe will provide you with the KEY VERSION to access the API. It is same for all advertisers you access through the API.Y1
WM_CONSUMER.intimestampTimestamp for which the auth signature is generated. Use Unix epoch format for the timestamp.YUse 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

ElementDescriptionType
totalResultsTotal number of rows returned in the responseinteger
contextualElements of array:
  • id: Unique identifier for the target or audience
    • Data type integer
  • name: Name of the target or audience
    • Data type: string
  • taxonPath: Represents the hierarchical taxonomy path. Categories are separated by the | delimiter, with department appearing first, category appearing second and subcategory appearing last
    • Data type: string
  • reach: Category reach
    • Data type: string
    • Values: "TIER1", "TIER_2", "TIER_3", "TIER_4", "TIER_5", "TIER_6", "TIER_7
      Note: This is how tiers in API call map to the representation on ad center UI:
      Tier mapping: LOW = [TIER_1, TIER_2 ], MID = [TIER_3, TIER_4 ], HIGH = [TIER_5, TIER_6, TIER_7 ]
  • isDisabled: Indicator of whether a targeting node is available for targeting or not. Use only targets with isDisabled = false in your ad groups.

Note: contextual object is applicable when tactic = RETAIL
string
behavioralElements of array:
  • id: Unique identifier for the target or audience
    • Data type integer
  • name: Name of the target or audience
    • Data type: string
  • taxonPath: Represents the hierarchical taxonomy path. Categories are separated by the | delimiter, with department appearing first, category appearing second and subcategory appearing last
    Note: for behavioral targets taxonPath is only applicable to retail audiences (audienceType = retail)
    • Data type string
  • audienceType: Type of audiences for behavioral targeting
    • Data type: string
    • Values: RETAIL, BRAND, CUSTOM, PERSONA, DEMOGRAPHIC
  • attribute:
    • Data type: string
    • Values: HISTORICAL, PREDICTIVE, LAPSEDBUYERS, LIFESTYLE, LIFESTAGE, AUTO, SHOPPING_HABITS, FOOD_BEVERAGES, AGE, GENDER, HOUSEHOLD_INCOME, RULE_BASED, PROPENSITY, BRAND_AFFINITY, LOOKALIKE, ADVANCED, EXTERNAL
  • Note: Values of attribute, based upon audienceType:
    1. When audienceType = RETAIL: HISTORICAL, PREDICTIVE
    2. When audienceType = BRAND: HISTORICAL, PREDICTIVE, LAPSED_BUYERS
    3. When audienceType = persona: LIFESTYLE, LIFESTAGE, AUTO, SHOPPING_HABITS, FOOD_BEVERAGES
    4. When audienceType = DEMOGRAPHIC: AGE, GENDER, HOUSEHOLD_INCOME
    5. When audienceType = CUSTOM: RULE_BASED, PROPENSITY, BRAND_AFFINITY, LOOKALIKE, ADVANCED, EXTERNAL
  • isDisabled: Indicator of whether a targeting node is available for targeting or not. Use only audiences with isDisabled = false in your ad groups

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" ]
}