---
agentTools:
  projectIndex: https://piperun-atendimentos.readme.io/llms.txt
---

# [DEPRECATED] Rel. tabulações analítico

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Versão 1.0",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{subdominio}.cxm.pipe.run",
      "variables": {
        "subdominio": {
          "default": "subdominio"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/api/reports/events/analytical": {
      "get": {
        "summary": "[DEPRECATED] Rel. tabulações analítico",
        "description": "",
        "operationId": "rel-tabulacoes-analitico",
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "description": "Data e hora inicial do período.<br>Formato: AAAA-MM-DD HH:MM",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "Data e hora final do período.<br>Formato: AAAA-MM-DD HH:MM",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "date_range_type",
            "in": "query",
            "description": "Tipo de período.<br><ul><li><b>1:</b> Atribuição da tabulação</li><li><b>2:</b> Início do atendimento</li><li><b>3:</b> Final do atendimento</li></ul>",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3"
              ]
            }
          },
          {
            "name": "channel_id[]",
            "in": "query",
            "description": "ID's do canal de atendimento",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "description": "ID do cliente",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "event_id[]",
            "in": "query",
            "description": "ID's da tabulação",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "branch_id",
            "in": "query",
            "description": "ID da filial",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "agent_id[]",
            "in": "query",
            "description": "ID's do agente",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "product_id",
            "in": "query",
            "description": "ID do produto",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "card_id",
            "in": "query",
            "description": "ID da carteira",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "queue_id[]",
            "in": "query",
            "description": "ID's da fila de atendimento",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "priority_id[]",
            "in": "query",
            "description": "ID's da prioridade de atendimento",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "tracking_number",
            "in": "query",
            "description": "Número do protocolo",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "event_reaction_type",
            "in": "query",
            "description": "Tipos de reação das tabulação.<br>Valores permitidos:<ul><li><b>f:</b> Finalizar</li><li><b>w:</b> Colocar em espera</li><li><b>n:</b> Nenhuma</li></ul>",
            "schema": {
              "type": "string",
              "enum": [
                "f",
                "w",
                "n"
              ]
            }
          },
          {
            "name": "is_success",
            "in": "query",
            "description": "Ativar filtro para retornar apenas tabulações positivas.<br><ul><li><b>0:</b> Não</li><li><b>1:</b> Sim</li></ul>",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "[\n  {\n    \"id\": 8642,\n    \"talk_id\": 10435,\n    \"created_at\": \"2022-10-05T11:12:12.000000Z\",\n    \"event_id\": 4,\n    \"queue_id\": 9,\n    \"is_success\": true,\n    \"agent_id\": 24,\n    \"reaction_type\": \"f\",\n    \"events_description\": \"Finalizar atendimento\",\n    \"talks_created_at\": \"2022-10-04 22:47:39\",\n    \"channels_description\": \"Chat\",\n    \"channels_icon_class\": \"far fa-comments\",\n    \"channels_primary_color\": \"#ff5722\",\n    \"users_name\": \"Maria Silva\",\n    \"customers_id\": 2651,\n    \"customers_name\": \"\",\n    \"queues_full_description\": \"5Hub -> Comercial -> Fila única\",\n    \"reaction_type_description\": \"Finalizar\"\n  },\n  {\n    \"id\": 8643,\n    \"talk_id\": 10424,\n    \"created_at\": \"2022-10-05T11:15:28.000000Z\",\n    \"event_id\": 4,\n    \"queue_id\": 2,\n    \"is_success\": true,\n    \"agent_id\": 31,\n    \"reaction_type\": \"f\",\n    \"events_description\": \"Finalizar atendimento\",\n    \"talks_created_at\": \"2022-10-04 11:20:53\",\n    \"channels_description\": \"WhatsApp\",\n    \"channels_icon_class\": \"fab fa-whatsapp\",\n    \"channels_primary_color\": \"#4caf50\",\n    \"users_name\": \"Marcelo Vargas\",\n    \"customers_id\": 2648,\n    \"customers_name\": \"João Santos\",\n    \"queues_full_description\": \"5Hub -> Suporte -> Fila única\",\n    \"reaction_type_description\": \"Finalizar\"\n  }\n]"
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 8642,
                        "default": 0
                      },
                      "talk_id": {
                        "type": "integer",
                        "example": 10435,
                        "default": 0
                      },
                      "created_at": {
                        "type": "string",
                        "example": "2022-10-05T11:12:12.000000Z"
                      },
                      "event_id": {
                        "type": "integer",
                        "example": 4,
                        "default": 0
                      },
                      "queue_id": {
                        "type": "integer",
                        "example": 9,
                        "default": 0
                      },
                      "is_success": {
                        "type": "boolean",
                        "example": true,
                        "default": true
                      },
                      "agent_id": {
                        "type": "integer",
                        "example": 24,
                        "default": 0
                      },
                      "reaction_type": {
                        "type": "string",
                        "example": "f"
                      },
                      "events_description": {
                        "type": "string",
                        "example": "Finalizar atendimento"
                      },
                      "talks_created_at": {
                        "type": "string",
                        "example": "2022-10-04 22:47:39"
                      },
                      "channels_description": {
                        "type": "string",
                        "example": "Chat"
                      },
                      "channels_icon_class": {
                        "type": "string",
                        "example": "far fa-comments"
                      },
                      "channels_primary_color": {
                        "type": "string",
                        "example": "#ff5722"
                      },
                      "users_name": {
                        "type": "string",
                        "example": "Maria Silva"
                      },
                      "customers_id": {
                        "type": "integer",
                        "example": 2651,
                        "default": 0
                      },
                      "customers_name": {
                        "type": "string",
                        "example": ""
                      },
                      "queues_full_description": {
                        "type": "string",
                        "example": "5Hub -> Comercial -> Fila única"
                      },
                      "reaction_type_description": {
                        "type": "string",
                        "example": "Finalizar"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": \"Invalid token.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "examples": {
                  "Inconsistência nos dados enviados": {
                    "value": "{\n  \"message\": \"The given data was invalid.\",\n  \"errors\": {\n    \"start_date\": [\n      \"O campo Data inicial é obrigatório.\"\n    ],\n    \"end_date\": [\n      \"O campo Data final é obrigatório.\"\n    ]\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "The given data was invalid."
                    },
                    "errors": {
                      "type": "object",
                      "properties": {
                        "start_date": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "O campo Data inicial é obrigatório."
                          }
                        },
                        "end_date": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "O campo Data final é obrigatório."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl --request GET \\\n     --url 'https://{subdominio}.cxm.pipe.run/api/reports/events/analytical?start_date=2022-10-01%2000%3A00&end_date=2022-10-02%2000%3A00&date_range_type=1' \\\n     --header 'Accept: application/json' \\\n     --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxNCIsImp0aSI6IjY4YWIwMWQxMTE4ZTMwODA5YjgwNDU1MzUzZjFkYjIyNmY5N2RlZmU4MzVmYTQxODNiNGZiMDQzMDMwNGEzNmE5OTBjNWMyODQyMDQ0OGEzIiwiaWF0IjoxNjczMzg3NDg4LjIxMTYyOCwibmJmIjoxNjczMzg3NDg4LjIxMTYzMiwiZXhwIjoxNjczNDczODg4LjE0OTYyNywic3ViIjoiMjAiLCJzY29wZXMiOltdfQ.FR2OGN5eaBcj5tth4Zoz5EVj3efC_m1qGcP_IESumvzrLmq4globvDSbREFN8o2DkMZddrb_BoyfG1DV_cl6mA9Awnjw6CGGO5HTGKbGWm_XFZDwLUN2rGGPftL8BObmV6Hr2d-P7QZ3fWpG58k4xUip2rvuhBI2laW5VN9_S_v_8NhdkCpPHwXvzU_TghcxXxWAECksvZIBDBkkIsqyKID0CDQp5m9CQlQ3y9UfurT3zDNDCvGxYPj3V_keanNO8l9m_f0Q5C9I3HsWIxHyC2qbYwx8o9uDbNZakNoZXO_BqCUsCQFzmaXwNTahsUjr5xCgoSa7j25-MxwinGDF34OKqPLA6NoLXcshN0lOIO8cPyZZ3Kl3r7KNpHdeMSg8Dz1ZeSWkE6PUZmBa0A482I3FlxQOBd90AfDEuS_EFwGp25lkFYxNx9jvd_WNfprzwMUFeliefMlhb08x8YSeN1jfk25rO8wHgO_rhqhN9dAASSz7YFHTg_SNfiEvYI4wrxovhz_OzpdigI7EiCn423QIa9naqx4oX-8xVJL9p309U_iQrxJMBLclosABILPs8lHpLAN0_TpSV8FOHwtlwG39Xp1WohAiKZN744e7i1DUFMGO9OW6RYnPDAIxkI6x5OUR6eCi4xnbbl0Bm62hKm1fN1nUFu02RQAVeUYW0fc' \\\n     --header 'Content-Type: application/json'",
              "name": "200 - OK"
            }
          ],
          "samples-languages": [
            "curl"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "Accept",
        "value": "application/json"
      },
      {
        "key": "Content-Type",
        "value": "application/json"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "639b9eee56a9f8002b83200b:63bf515d4369b90025edb365"
}
```