List Geo Location Targeting in a Campaign
Use this API to fetch list of all geo locations available for targeting
Request Parameters
| Parameter | Notes | Type | Required | Possible Values |
|---|---|---|---|---|
| advertiserId | ID of the advertiser | integer | Y | Unique numeric identifier |
| Filter[id] | Returns details of specific targets/audiences based on the given ID. | array | N | Valid ID of the target or audience |
| 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 |
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
| Element | Description | Type |
|---|---|---|
| totalResults | Total number of rows returned in the response | integer |
| geoTargets | Elements of array:
| string |
Error Response
| Field | Description | Optional field/Nullable? | Type | Possible values |
|---|---|---|---|---|
| code | Code=failure Click here for more information about Status Codes and Errors | N | string | failure |
| details | List of error codes associated with the request. Use these codes for programmatic error handling. | N | array | Refer to this link for detailed error messages |
| message | High-level summary of the error, when available. | Y | string | |
| errors | Detailed 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
| Field | Description | Optional field/Nullable? | Type | Possible values |
|---|---|---|---|---|
| field | JSON field associated with the error. Omitted if the error applies to the request as a whole. | Y | string | |
| errorType | Machine-readable error code that uniquely identifies the error condition. Applications should use this value for error handling logic. | N | string | |
| description | Human-readable explanation of the error, including why the request failed and, when possible, how to resolve it | N | 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" } ] } Sample Response Failure
{ "code": "failure", "details": [ "string" ], "message": "string", "errors": [ { "field": "string", "errorType": "string", "description": "string" } ] }Updated 19 days ago
Did this page help you?
