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/geoLocations/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[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: string
    • Values: 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: STATE, CITY, DMA, COUNTRY
  • countryCode: Country code for geo target
    • Data type: string
string

Error Response

FieldDescriptionOptional field/Nullable?TypePossible values
codeCode=failure
Click here for more information about Status Codes and Errors
Nstringfailure
detailsList of error codes associated with the request. Use these codes for programmatic error handling.NarrayRefer to this link for detailed error messages
messageHigh-level summary of the error, when available. Ystring 
errorsDetailed information about one or more errors, including the affected field (when applicable), error code, and a human-readable description.Y
array<object> 

errors array object details

FieldDescriptionOptional field/Nullable?TypePossible values
fieldJSON field associated with the error. Omitted if the error applies to the request as a whole.Ystring 
errorTypeMachine-readable error code that uniquely identifies the error condition. Applications should use this value for error handling logic.Nstring 
descriptionHuman-readable explanation of the error, including why the request failed and, when possible, how to resolve itNstring 

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

Sample Response Failure

{ "code": "failure", "details": [ "string" ], "message": "string", "errors": [ { "field": "string", "errorType": "string", "description": "string" } ] }

Did this page help you?