New Location Group
POST {{campaign_url}}/locationGroups?marketId=1
Create a new location group
You can create a new location group by sending this POST
request. To define settings for your location group, open the body tab and edit the JSON object.
For DTO field entries
, see the corresponding DTO table below to customize the data.
Request Body (Definitions)
*Optional element, depending on values for other fields
JSON Object Key | Description | Type |
---|---|---|
name | Name of this location group. | string |
targetGeoType | Geographic identifier/method for user targeting. Allowed values to target users by standard location: zipGlobal (postal code) Allowed values to target mobile users: zipPlus4 (postal code), address, latLong (latitude & longitude coordinates) | string |
country | Country of targeting interest. Can be retrieved from GET List of Countries. | string |
entries | Location(s) included in this group for targeting purposes. | comma-separated array containing one or more entry DTOs |
*radius (Optional, i.e., meaningless, if targetGeoType is zipGlobal) | Radius value of the entire targeted area, centered around location(s) specified in entries . | double |
*radiusType | Distance unit for radius . Allowed units: miles, kilometers | string |
entry
DTO
Only specify a value for the key that matches your targetGeoType
selection. Set values for all other entry
keys as null or omit fields entirely.
Key | Description | Type |
---|---|---|
address | Address of users to target. Can be retrieved from GET List of Addresses. | string |
latLong (DTO) | Latitude & longitude coordinates of targeted user location. | DTO |
zipGlobal | Postal code (standard location) of users to target. | string |
zipPlus4 | Postal code of mobile users to target. | string |
latLong
DTO
Key | Value Type |
---|---|
latitude | double |
longitude | double |
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
marketId | number | Numeric ID associated with a given market. Required only if you have access to multiple markets. |
Request Body
{"name"=>"doc team location group", "targetGeoType"=>"latLong", "country"=>"us", "entries"=>[{"address"=>nil, "latLong"=>{"latitude"=>15.28, "longitude"=>-56.32}, "zipGlobal"=>nil, "zipPlus4"=>nil}], "radius"=>5.5, "radiusType"=>"miles"}
RESPONSES
status: Created
{"data":[{"id":"36344480","marketId":"1","resourceType":"locationGroup","targetGeoType":"zipGlobal","country":"US","name":"doc test location group ver2","entries":[{"zipGlobal":"90210"},{"zipGlobal":"94061"}],"radius":0}],"errors":[]}