Creating a segment with the “location circle” type
Creates a segment based on location data with the “circle” type.
Request syntax
https://api-audience.yandex.ru/v1/management/segments/create_geo
?
In the request body
{
"segment" : {
"name" : < string > ,
"radius" : < integer > ,
"period_length" : < integer > ,
"times_quantity" : < integer > ,
"points" : [ {
"latitude" : < big_decimal > ,
"longitude" : < big_decimal > ,
"description" : < string >
}, ... ],
"geo_segment_type" : < geo_segment_type >
}
}
Parameters | Description |
---|---|
segment | The segment with the specified parameters. |
segment | |
name | Segment name. |
radius | The coverage radius in meters. |
period_length | The period for visits to the specified places. This parameter is required if you are creating the condition “The user visited the specified places X times during the period”. Acceptable values for the time period (in days): from 1 to 90 (inclusive). |
times_quantity | Frequency of visits to the specified places. This parameter is required if you are creating the condition “The user visited the specified places X times during the period”. Note. Only one visit per day is counted. |
points | List of coordinates. |
geo_segment_type | Type of coordinates for creating the segment. Possible values:
|
points | |
latitude | Latitude. |
longitude | Longitude. |
description | Any comment with the length not exceeding 200. |
Parameters | Description |
---|---|
segment | The segment with the specified parameters. |
segment | |
name | Segment name. |
radius | The coverage radius in meters. |
period_length | The period for visits to the specified places. This parameter is required if you are creating the condition “The user visited the specified places X times during the period”. Acceptable values for the time period (in days): from 1 to 90 (inclusive). |
times_quantity | Frequency of visits to the specified places. This parameter is required if you are creating the condition “The user visited the specified places X times during the period”. Note. Only one visit per day is counted. |
points | List of coordinates. |
geo_segment_type | Type of coordinates for creating the segment. Possible values:
|
points | |
latitude | Latitude. |
longitude | Longitude. |
description | Any comment with the length not exceeding 200. |
Sample request
POST https://api-audience.yandex.ru/v1/management/segments/create_geo?
Response format
{
"segment" : < _circle_geo_segment >
}
Parameters | Description |
---|---|
segment | The segment with the specified parameters. |
Parameters | Description |
---|---|
segment | The segment with the specified parameters. |