Segmentation
Ejecutar segmento con paginación
Ejecuta el segmento completo retornando todos los fans que cumplen los criterios.
Paginación:
- page_size: Número de fans por página (default: 100, max: 1000)
- page: Número de página 0-indexed (default: 0)
Response:
- total_fans: Total de fans en el segmento
- fans: Array de fans de la página actual
- current_page: Página actual (0-indexed)
- total_pages: Total de páginas disponibles
- has_more: true si hay más páginas
Performance:
- Primera ejecución hace COUNT para total
- Resultados se obtienen con LIMIT/OFFSET optimizado
- Recomendado usar page_size entre 50-500 según uso
La estructura de definition es idéntica a /segments/preview.
post/segments/execute
Request
- Base URL: http://localhost:8081
- URL: http://localhost:8081/segments/execute
- Auth: HTTP bearer
Request body
Example request
{
"definition": {
"stanzas": [
{
"id": "stanza_001",
"criteria": [
{
"id": "crit_001",
"criterion_id": "user_age",
"modifiers": {
"distance": {
"radius": 50
},
"frequency": {
"count": 3
},
"time_range": {
"value": 30
}
},
"metadata": {
"criteriaName": "Campañas abiertas",
"dataType": "ENTITY",
"category": "Interacción"
}
}
]
}
],
"limit": 50
},
"groups": {
"total_groups": 10,
"group_number": 1
}
}Response
Segmento ejecutado exitosamente
Example response
{
"success": true,
"total_fans": 1247,
"fans": [
{
"fan_id": "usr_001",
"first_name": "Juan",
"last_name": "García",
"email": "juan.garcia@example.com",
"phone": "+34600123456",
"dni": "12345678A",
"email_marketing_status": "ok"
}
],
"total_pages": 13,
"has_more": true,
"group_metadata": {
"total_groups": 10,
"current_group": 1,
"total_fans_all_groups": 52340,
"avg_group_size": 5234,
"assignment_method": "hash"
},
"economic_data_as_of": "2026-09-23T09:58:12.000Z",
"economic_data_built_at": "2026-09-23T10:00:08.000Z",
"economic_data_status": "CURRENT",
"edition_scopes": [
{
"edition_id": "6ab4f2ea8f0f4cd41813aae8",
"revision": 6
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.