Сегменты аудитории Campaign
/api/v1/developer/campaigns/audience-segmentsВозвращает минимальный каталог сохранённых CRM-сегментов для preview/freeze: идентификатор, имя, версия и время обновления. Definition, matched clients, actor и project facts не раскрываются.
Право доступаcampaigns.read
Authorization: Bearer YOUR_PROJECT_TOKEN
Параметры
limitнеобязательно · queryintegerminimum: 1 · maximum: 100 · default: 50JSON Schema
{ "type": "integer", "minimum": 1, "maximum": 100, "default": 50 }cursorнеобязательно · querystringminLength: 1 · maxLength: 4096JSON Schema
{ "type": "string", "minLength": 1, "maxLength": 4096 }
Примеры запроса
curl --request GET \ 'https://YOUR_NOVA_HOST/api/v1/developer/campaigns/audience-segments?limit=50' \ --header 'Authorization: Bearer YOUR_PROJECT_TOKEN'
Ответы
200 Saved Campaign audience segment selection catalog
application/jsonobject
segmentsобязательно- arraymaxItems: 100
Вложенная схема
arraymaxItems: 100objectsegmentIdобязательно- stringminLength: 1 · maxLength: 160
nameобязательно- stringminLength: 1 · maxLength: 80
versionобязательно- integerexclusiveMinimum: 0
updatedAtобязательно- stringformat: "date-time"
JSON Schema
{ "type": "object", "properties": { "segmentId": { "type": "string", "minLength": 1, "maxLength": 160 }, "name": { "type": "string", "minLength": 1, "maxLength": 80 }, "version": { "type": "integer", "exclusiveMinimum": 0 }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "segmentId", "name", "version", "updatedAt" ], "additionalProperties": false }JSON Schema
{ "type": "array", "items": { "type": "object", "properties": { "segmentId": { "type": "string", "minLength": 1, "maxLength": 160 }, "name": { "type": "string", "minLength": 1, "maxLength": 80 }, "version": { "type": "integer", "exclusiveMinimum": 0 }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "segmentId", "name", "version", "updatedAt" ], "additionalProperties": false }, "maxItems": 100 } nextCursor- string | null
JSON Schema
{
"type": "object",
"properties": {
"segments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"segmentId": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"version": {
"type": "integer",
"exclusiveMinimum": 0
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"segmentId",
"name",
"version",
"updatedAt"
],
"additionalProperties": false
},
"maxItems": 100
},
"nextCursor": {
"type": [
"string",
"null"
]
}
},
"required": [
"segments"
],
"additionalProperties": false,
"$ref": "#/components/schemas/DeveloperCampaignAudienceSegmentsResponse"
}400 Invalid Campaign audience-segment page
application/problem+jsonobject
type- stringformat: "uri" · default: "about:blank"
titleобязательно- string
statusобязательно- integerminimum: 100 · maximum: 599
detail- string
instance- string
errors- object
JSON Schema
{
"type": "object",
"properties": {
"type": {
"type": "string",
"format": "uri",
"default": "about:blank"
},
"title": {
"type": "string"
},
"status": {
"type": "integer",
"minimum": 100,
"maximum": 599
},
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"errors": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"title",
"status"
]
}401 Invalid developer credential
application/problem+jsonobject
type- stringformat: "uri" · default: "about:blank"
titleобязательно- string
statusобязательно- integerminimum: 100 · maximum: 599
detail- string
instance- string
errors- object
JSON Schema
{
"type": "object",
"properties": {
"type": {
"type": "string",
"format": "uri",
"default": "about:blank"
},
"title": {
"type": "string"
},
"status": {
"type": "integer",
"minimum": 100,
"maximum": 599
},
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"errors": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"title",
"status"
]
}403 Campaign directory unavailable
application/problem+jsonobject
type- stringformat: "uri" · default: "about:blank"
titleобязательно- string
statusобязательно- integerminimum: 100 · maximum: 599
detail- string
instance- string
errors- object
JSON Schema
{
"type": "object",
"properties": {
"type": {
"type": "string",
"format": "uri",
"default": "about:blank"
},
"title": {
"type": "string"
},
"status": {
"type": "integer",
"minimum": 100,
"maximum": 599
},
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"errors": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"title",
"status"
]
}429 Developer API rate limit exceeded
application/problem+jsonobject
type- stringformat: "uri" · default: "about:blank"
titleобязательно- string
statusобязательно- integerminimum: 100 · maximum: 599
detail- string
instance- string
errors- object
JSON Schema
{
"type": "object",
"properties": {
"type": {
"type": "string",
"format": "uri",
"default": "about:blank"
},
"title": {
"type": "string"
},
"status": {
"type": "integer",
"minimum": 100,
"maximum": 599
},
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"errors": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"title",
"status"
]
}503 Campaign audience preparation unavailable
application/problem+jsonobject
type- stringformat: "uri" · default: "about:blank"
titleобязательно- string
statusобязательно- integerminimum: 100 · maximum: 599
detail- string
instance- string
errors- object
JSON Schema
{
"type": "object",
"properties": {
"type": {
"type": "string",
"format": "uri",
"default": "about:blank"
},
"title": {
"type": "string"
},
"status": {
"type": "integer",
"minimum": 100,
"maximum": 599
},
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"errors": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"title",
"status"
]
}