Skip to main content
POST
/
empresas
/
data-report
/
multi
curl -X POST https://beta.api-iobot-desarrollo.com/empresas/data-report/multi \
  -H "Content-Type: application/json" \
  -d '{
    "businessId": 1,
    "token": "TU_TOKEN",
    "startDate": "2026-04-01T00:00:00.000Z",
    "endDate": "2026-04-30T23:59:59.999Z",
    "includeBusinesses": [1, 2]
  }'
{
  "data": [
    {
      "data": {
        "id": 1,
        "nombre": "Empresa Principal",
        "img_wa": "https://example.com/logo.png",
        "feature_flags": {
          "currency": "HNL",
          "currency_conversion": "USD",
          "ad_account_for_report": 12
        }
      },
      "conversaciones": 540,
      "salesCount": 38,
      "salesAmount": 95000,
      "salesConversionRate": 7.04,
      "quotationsCount": 112,
      "quotationsAmount": 280000,
      "qoutationConversionRate": 20.74,
      "qoutationToSalesConversionRate": 33.93,
      "averageTemperature": 7.2,
      "averageAgentTemperature": 6.8,
      "salesThatChatHasAnuncioIdCount": 25,
      "salesThatChatHasAnuncioId": 62500,
      "salesThatDoesntHaveAnuncioIdCount": 13,
      "salesThatDoesntHaveAnuncioId": 32500,
      "quotationsThatChatHasAnuncioIdCount": 70,
      "quotationsThatChatHasAnuncioId": 175000,
      "quotationsThatChatHasAnuncioIdAndSourceIsPdfCount": 30,
      "quotationsThatChatHasAnuncioIdAndSourceIsPdf": 75000,
      "quotationsThatChatHasAnuncioIdAndSourceIsMessageCount": 40,
      "quotationsThatChatHasAnuncioIdAndSourceIsMessage": 100000,
      "quotationsThatDoesntHaveAnuncioIdCount": 42,
      "quotationsThatDoesntHaveAnuncioId": 105000,
      "quotationsThatDoesntHaveAnuncioIdAndSourceIsPdfCount": 18,
      "quotationsThatDoesntHaveAnuncioIdAndSourceIsPdf": 45000,
      "quotationsThatDoesntHaveAnuncioIdAndSourceIsMessageCount": 24,
      "quotationsThatDoesntHaveAnuncioIdAndSourceIsMessage": 60000,
      "tags": [
        { "name": "Interesado", "count": 98 },
        { "name": "Seguimiento", "count": 54 }
      ],
      "agentes": [
        {
          "agente": "María García",
          "totalTickets": 120,
          "completados": 95,
          "cancelados": 10,
          "pendientes": 8,
          "proceso": 7,
          "conversaciones": 540,
          "ventas": 15,
          "ventasAmount": 37500,
          "cotizaciones": 40,
          "cotizacionesAmount": 100000,
          "empresa_id": 1
        }
      ],
      "adsBreakdown": [
        {
          "adId": "120201234567890",
          "name": "Campaña Abril 2026",
          "imageUrl": "https://example.com/ad.jpg",
          "spend": 350.00,
          "currency": "USD",
          "sales": 12,
          "salesAmount": 30000,
          "quotations": 28,
          "quotationsAmount": 70000,
          "salesRecords": []
        }
      ]
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://developer.iobot.chat/llms.txt

Use this file to discover all available pages before exploring further.

Retorna el reporte consolidado de métricas para un rango de fechas, agrupado por empresa. Incluye conversaciones, tasas de conversión a cotización y venta, montos totales con desglose por origen (Ads Meta vs. orgánico), rendimiento por agente y desglose por anuncio de Meta (si el negocio tiene feature_flags.ad_account_for_report configurado). El Reporte Compartido debe estar habilitado en el negocio raíz mediante feature_flags.aquatec_shared_report. Si no está configurado, el endpoint retorna 400.

Autenticación

Requiere el campo token en el cuerpo o el encabezado x-api-key / x-iobot-key. Consulta Autenticación.

Cuerpo de la solicitud

businessId
number
required
ID del negocio raíz que tiene habilitado el Reporte Compartido.
token
string
Token de sesión del usuario (requerido si no se usa x-api-key).
startDate
string
required
Fecha de inicio del rango en formato ISO 8601 (ej. "2026-04-01T00:00:00.000Z"). Filtra conversaciones, botones de registro (ventas/cotizaciones) y tickets.
endDate
string
required
Fecha de fin del rango en formato ISO 8601 (ej. "2026-04-30T23:59:59.999Z").
includeBusinesses
number[]
IDs de empresas a incluir. Solo se incluyen IDs que pertenezcan al grupo configurado en aquatec_shared_report. Si se omite, se incluyen todas las empresas del grupo.

Respuesta

data
array
Lista de reportes, uno por empresa del grupo.
curl -X POST https://beta.api-iobot-desarrollo.com/empresas/data-report/multi \
  -H "Content-Type: application/json" \
  -d '{
    "businessId": 1,
    "token": "TU_TOKEN",
    "startDate": "2026-04-01T00:00:00.000Z",
    "endDate": "2026-04-30T23:59:59.999Z",
    "includeBusinesses": [1, 2]
  }'
{
  "data": [
    {
      "data": {
        "id": 1,
        "nombre": "Empresa Principal",
        "img_wa": "https://example.com/logo.png",
        "feature_flags": {
          "currency": "HNL",
          "currency_conversion": "USD",
          "ad_account_for_report": 12
        }
      },
      "conversaciones": 540,
      "salesCount": 38,
      "salesAmount": 95000,
      "salesConversionRate": 7.04,
      "quotationsCount": 112,
      "quotationsAmount": 280000,
      "qoutationConversionRate": 20.74,
      "qoutationToSalesConversionRate": 33.93,
      "averageTemperature": 7.2,
      "averageAgentTemperature": 6.8,
      "salesThatChatHasAnuncioIdCount": 25,
      "salesThatChatHasAnuncioId": 62500,
      "salesThatDoesntHaveAnuncioIdCount": 13,
      "salesThatDoesntHaveAnuncioId": 32500,
      "quotationsThatChatHasAnuncioIdCount": 70,
      "quotationsThatChatHasAnuncioId": 175000,
      "quotationsThatChatHasAnuncioIdAndSourceIsPdfCount": 30,
      "quotationsThatChatHasAnuncioIdAndSourceIsPdf": 75000,
      "quotationsThatChatHasAnuncioIdAndSourceIsMessageCount": 40,
      "quotationsThatChatHasAnuncioIdAndSourceIsMessage": 100000,
      "quotationsThatDoesntHaveAnuncioIdCount": 42,
      "quotationsThatDoesntHaveAnuncioId": 105000,
      "quotationsThatDoesntHaveAnuncioIdAndSourceIsPdfCount": 18,
      "quotationsThatDoesntHaveAnuncioIdAndSourceIsPdf": 45000,
      "quotationsThatDoesntHaveAnuncioIdAndSourceIsMessageCount": 24,
      "quotationsThatDoesntHaveAnuncioIdAndSourceIsMessage": 60000,
      "tags": [
        { "name": "Interesado", "count": 98 },
        { "name": "Seguimiento", "count": 54 }
      ],
      "agentes": [
        {
          "agente": "María García",
          "totalTickets": 120,
          "completados": 95,
          "cancelados": 10,
          "pendientes": 8,
          "proceso": 7,
          "conversaciones": 540,
          "ventas": 15,
          "ventasAmount": 37500,
          "cotizaciones": 40,
          "cotizacionesAmount": 100000,
          "empresa_id": 1
        }
      ],
      "adsBreakdown": [
        {
          "adId": "120201234567890",
          "name": "Campaña Abril 2026",
          "imageUrl": "https://example.com/ad.jpg",
          "spend": 350.00,
          "currency": "USD",
          "sales": 12,
          "salesAmount": 30000,
          "quotations": 28,
          "quotationsAmount": 70000,
          "salesRecords": []
        }
      ]
    }
  ]
}