Creating a segment with the "geo-circle" type
Creates a segment based on location data with the circle type.
Request
POST
https://api-audience.yandex.ru/v1/management/segments/create_geo
Body
application/json
{
"segment": {
"name": "example",
"radius": 0,
"period_length": 0,
"times_quantity": 0,
"points": [
{
"latitude": 0.5,
"longitude": 0.5,
"description": "example"
}
],
"geo_segment_type": "example",
"device_matching_type": "example"
}
}
|
Name |
Description |
|
segment |
Type: SegmentRequestGeoCircle The segment with the specified parameters. Example
|
GeoPoint
The coordinates of the points.
|
Name |
Description |
|
description |
Type: string Any comment up to 200 characters. Min length: Max length: Example: |
|
latitude |
Type: number Latitude. |
|
longitude |
Type: number Longitude. |
Example
{
"latitude": 0.5,
"longitude": 0.5,
"description": "example"
}
SegmentRequestGeoCircle
The segment with the specified parameters.
|
Name |
Description |
|
name |
Type: string Segment name. Example: |
|
geo_segment_type |
Type: string Coordinate type. Acceptable values:
Example: |
|
period_length |
Type: integer The period for visits to the specified places. This parameter is required if you are creating the condition "User visited the specified places N time(s) during the period". Acceptable values for the time period (in days): from 1 to 90 (inclusive). |
|
points |
Type: GeoPoint[] A list of coordinates. Example
|
|
radius |
Type: integer The coverage radius in meters. |
|
times_quantity |
Type: integer Frequency of visits to the specified places. This parameter is required if you are creating the condition "User visited the specified places N time(s) during the period". Note Only one visit per day is counted. |
Example
{
"name": "example",
"radius": 0,
"period_length": 0,
"times_quantity": 0,
"points": [
{
"latitude": 0.5,
"longitude": 0.5,
"description": "example"
}
],
"geo_segment_type": "example"
}
Responses
200 OK
OK
Body
application/json
{
"segment": {
"id": 0,
"name": "example",
"type": "example",
"status": "example",
"create_time": "2025-01-01T00:00:00Z",
"owner": "example",
"has_guests": true,
"guest_quantity": 0,
"can_create_dependent": true,
"has_derivatives": true,
"derivatives": [
0
],
"cookies_matched_quantity": 0,
"geo_segment_type": "example",
"times_quantity": 0,
"period_length": 0,
"form": "example",
"radius": 0,
"points": [
{
"latitude": 0.5,
"longitude": 0.5,
"description": "example"
}
],
"pattern": "example",
"too_much_data": true
}
}
|
Name |
Description |
|
segment |
Type: CircleGeoSegment Segment based on location data for circles. Example
|
CircleGeoSegment
Segment based on location data for circles.
|
Name |
Description |
|
name |
Type: string Segment name. Example: |
|
create_time |
Type: string<date-time> The time of segment creation. Example: |
|
geo_segment_type |
Type: string Coordinate type. Acceptable values:
Example: |
|
id |
Type: integer ID of the segment. Specify this parameter when updating a segment. |
|
owner |
Type: string The username of the segment owner. Example: |
|
period_length |
Type: integer The period for visits to the specified places. This parameter is required if you are creating the condition "User visited the specified places N time(s) during the period". Acceptable values for the time period (in days): from 1 to 90 (inclusive). |
|
points |
Type: GeoPoint[] A list of coordinates. Example
|
|
radius |
Type: integer The coverage radius in meters. |
|
status |
Type: string Status of processing the segment. Acceptable values:
Example: |
|
times_quantity |
Type: integer Frequency of visits to the specified places. This parameter is required if you are creating the condition "User visited the specified places N time(s) during the period". Note Only one visit per day is counted. |
|
type |
Type: string Segment type. Acceptable values:
Example: |
Example
{
"id": 0,
"name": "example",
"type": "example",
"status": "example",
"create_time": "2025-01-01T00:00:00Z",
"owner": "example",
"geo_segment_type": "example",
"times_quantity": 0,
"period_length": 0,
"radius": 0,
"points": [
{
"latitude": 0.5,
"longitude": 0.5,
"description": "example"
}
]
}
No longer supported, please use an alternative and newer version.