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 ID of the target or audience
Filter[audienceType]
Note: Only applicable for audience targeting
Returns response for specific audience typestringY
  • retail
  • brand
  • custom
  • persona
Filter[attribute]
Note: Only applicable for audience targeting
Returns response for a specific audience attributestringY
  • historical
  • predictive
  • lapsedbuyers
  • lifestyle
  • lifestage
  • 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
  3. When audienceType = persona: lifestyle, lifestage
  4. 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 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

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: "TIER_1", "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.
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
  • attribute:
    • Data type: string
    • Values: HISTORICAL, RULE_BASED, LIFESTYLE, LAPSED_BUYERS, 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
    4. 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

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