List Geo Location Targeting in a Campaign

Use this API to fetch list of all geo locations available for targeting

📘

URL: ​POST/api/v1/geoLocations/list

Request Parameters

ParameterNotesTypeRequiredPossible Values
advertiserId ID of the advertiserintegerYUnique numeric identifier
Filter[id]Returns details of specific targets/audiences based on the given ID.arrayNValid ID of the target or audience
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

Sample geoLocations Targeting Request

curl -X POST \ 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/targeting' \  --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[id]": [ 100, 101 ], "searchText": "Michigan",   "startIndex": 0, "count": 0 }'

Response

ElementDescriptionType
totalResultsTotal number of rows returned in the responseinteger
geoTargetsElements of array:
  • id: Unique identifier for geo targets
    • Data type: integer
  • name: Name of the geo target
    • Data type: string
  • locationType: Location type for the geo target
    • Data type: ENUM
    • Values: ZIP_CODE, STATE, CITY, DMA, COUNTRY
  • parentId: Unique identifier of the parent node
    • Data type: integer
  • parentName: Name of the parent node
    • Data type: string
  • ParentType: Location type of the parent node
    • Data type: string
    • Values: ZIP_CODE, STATE, CITY, DMA, COUNTRY
  • countryCode: Country code for geo target
    • Data type: string
string

Sample geoLocations Targeting Response

{     "totalResults": 2,     "geoTargets": [         {             "id": 100,             "name": "Michigan",             "locationType": "STATE",             "parentId": 10001,             "parentName": "United States",             "parentType": "COUNTRY",             "countryCode": "US"         },         {             "id": 101,             "name": "New York",             "locationType": "STATE",             "parentId": 10001,             "parentName": "United States",             "parentType": "COUNTRY",             "countryCode": "US"         }     ] }