---
updatedAt: 2026-10-23T12:38:12.000Z
agentTools:
  projectIndex: https://piperun-atendimentos.readme.io/llms.txt
---

# Rel. avaliações analítico

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "versão-10",
    "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/rating_survey": {
      "get": {
        "summary": "Rel. avaliações analítico",
        "description": "",
        "operationId": "rel-avaliacoes-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>Valores permitidos:<ul><li><b>1:</b> Início do atendimento</li><li><b>3:</b> Final do atendimento</li></ul>",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "3"
              ]
            }
          },
          {
            "name": "min_score",
            "in": "query",
            "description": "Faixa inicial da avaliação.<br>Valor permitidos de 0 a 100.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "max_score",
            "in": "query",
            "description": "Faixa final da avaliação.<br>Valor permitidos de 0 a 100.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "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": "priority_id[]",
            "in": "query",
            "description": "ID's da prioridade de atendimento",
            "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": "to",
            "in": "query",
            "description": "Telefone ou e-mail do cliente",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tracking_number",
            "in": "query",
            "description": "Número do protocolo",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hashtag_id[]",
            "in": "query",
            "description": "ID's da hashtag",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "was_expired",
            "in": "query",
            "description": "Ativar filtro para retornar apenas atendimentos expirados.<br><ul><li><b>0:</b> Não</li><li><b>1:</b> Sim</li></ul>",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          },
          {
            "name": "is_critical",
            "in": "query",
            "description": "Ativar filtro para retornar apenas atendimentos críticos.<br><ul><li><b>0:</b> Não</li><li><b>1:</b> Sim</li></ul>",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          },
          {
            "name": "has_schedule",
            "in": "query",
            "description": "Ativar filtro para retornar apenas atendimentos agendados.<br><ul><li><b>0:</b> Não</li><li><b>1:</b> Sim</li></ul>",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          },
          {
            "name": "is_finished",
            "in": "query",
            "description": "Ativar filtro para retornar apenas atendimentos encerrados.<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\": 10405,\n    \"created_at\": \"2022-10-03T12:03:06.000000Z\",\n    \"finished_at\": \"2022-10-03 09:32:47\",\n    \"score\": 100,\n    \"channel_id\": 1,\n    \"queue_id\": 2,\n    \"agent_id\": 31,\n    \"customer_id\": 1928,\n    \"channels_description\": \"WhatsApp\",\n    \"channels_icon_class\": \"fab fa-whatsapp\",\n    \"channels_primary_color\": \"#4caf50\",\n    \"agenst_name\": \"Marcio\",\n    \"users_name\": \"Marcio Silva\",\n    \"customers_id\": 1928,\n    \"customers_name\": \"ISA SILVA\",\n    \"queues_full_description\": \"5Hub -> Suporte -> Fila única\",\n    \"tracking_number\": \"2022100310405\",\n    \"url_viewer\": \"https://{environment}.5hub.com.br/viewer/V3pYQldjOdfg5654UtKem1HaUZiaURXUT09\",\n    \"talk_events_latest\": {\n      \"id\": 8620,\n      \"talk_id\": 10405,\n      \"event_id\": 4,\n      \"reaction_type_description\": \"\",\n      \"event\": {\n        \"id\": 4,\n        \"description\": \"Finalizar atendimento\"\n      }\n    }\n  },\n  {\n    \"id\": 10410,\n    \"created_at\": \"2022-10-03T14:58:29.000000Z\",\n    \"finished_at\": \"2022-10-03 12:09:09\",\n    \"score\": 100,\n    \"channel_id\": 1,\n    \"queue_id\": 2,\n    \"agent_id\": 31,\n    \"customer_id\": 2630,\n    \"channels_description\": \"WhatsApp\",\n    \"channels_icon_class\": \"fab fa-whatsapp\",\n    \"channels_primary_color\": \"#4caf50\",\n    \"agenst_name\": \"Marcio\",\n    \"users_name\": \"Marcio Silva\",\n    \"customers_id\": 2630,\n    \"customers_name\": \"IVO MORAIS\",\n    \"queues_full_description\": \"5Hub -> Suporte -> Fila única\",\n    \"tracking_number\": \"2022100310410\",\n    \"url_viewer\": \"https://{environment}.5hub.com.br/viewer/czhURgfgfd5656lqYTQ5YkFZQUd6VkVEdz09\",\n    \"talk_events_latest\": {\n      \"id\": 8622,\n      \"talk_id\": 10410,\n      \"event_id\": 4,\n      \"reaction_type_description\": \"\",\n      \"event\": {\n        \"id\": 4,\n        \"description\": \"Finalizar atendimento\"\n      }\n    }\n  }\n]"
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 10405,
                        "default": 0
                      },
                      "created_at": {
                        "type": "string",
                        "example": "2022-10-03T12:03:06.000000Z"
                      },
                      "finished_at": {
                        "type": "string",
                        "example": "2022-10-03 09:32:47"
                      },
                      "score": {
                        "type": "integer",
                        "example": 100,
                        "default": 0
                      },
                      "channel_id": {
                        "type": "integer",
                        "example": 1,
                        "default": 0
                      },
                      "queue_id": {
                        "type": "integer",
                        "example": 2,
                        "default": 0
                      },
                      "agent_id": {
                        "type": "integer",
                        "example": 31,
                        "default": 0
                      },
                      "customer_id": {
                        "type": "integer",
                        "example": 1928,
                        "default": 0
                      },
                      "channels_description": {
                        "type": "string",
                        "example": "WhatsApp"
                      },
                      "channels_icon_class": {
                        "type": "string",
                        "example": "fab fa-whatsapp"
                      },
                      "channels_primary_color": {
                        "type": "string",
                        "example": "#4caf50"
                      },
                      "agenst_name": {
                        "type": "string",
                        "example": "Marcio"
                      },
                      "users_name": {
                        "type": "string",
                        "example": "Marcio Silva"
                      },
                      "customers_id": {
                        "type": "integer",
                        "example": 1928,
                        "default": 0
                      },
                      "customers_name": {
                        "type": "string",
                        "example": "ISA SILVA"
                      },
                      "queues_full_description": {
                        "type": "string",
                        "example": "5Hub -> Suporte -> Fila única"
                      },
                      "tracking_number": {
                        "type": "string",
                        "example": "2022100310405"
                      },
                      "url_viewer": {
                        "type": "string",
                        "example": "https://{environment}.5hub.com.br/viewer/V3pYQldjOdfg5654UtKem1HaUZiaURXUT09"
                      },
                      "talk_events_latest": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 8620,
                            "default": 0
                          },
                          "talk_id": {
                            "type": "integer",
                            "example": 10405,
                            "default": 0
                          },
                          "event_id": {
                            "type": "integer",
                            "example": 4,
                            "default": 0
                          },
                          "reaction_type_description": {
                            "type": "string",
                            "example": ""
                          },
                          "event": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 4,
                                "default": 0
                              },
                              "description": {
                                "type": "string",
                                "example": "Finalizar atendimento"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "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    \"min_score\": [\n      \"O campo Faixa inicial da nota de avaliação é obrigatório.\"\n    ],\n    \"max_score\": [\n      \"O campo Faixa final da nota de avaliação é obrigatório.\"\n    ]\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "The given data was invalid."
                    },
                    "errors": {
                      "type": "object",
                      "properties": {
                        "min_score": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "O campo Faixa inicial da nota de avaliação é obrigatório."
                          }
                        },
                        "max_score": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "O campo Faixa final da nota de avaliação é obrigatório."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "  curl --request GET \\\n     --url 'https://{subdominio}.cxm.pipe.run/api/reports/rating_survey?start_date=2022-10-01%2000%3A00&end_date=2022-10-10%2000%3A00&date_range_type=3&min_score=0&max_score=100' \\\n     --header 'Accept: application/json' \\\n     --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxNCIsImp0aSI6ImIwMGYyY2E3Y2M2OWZlMWYyM2ZiZWM2ODhlOGU4MjUxZWJmZjNiMzQzMDIwYTNjYjc1OGYyMjBkNDVhNjljYWU1NmRiMGUxNTc2NTQ2YjE4IiwiaWF0IjoxNjczNDc3NjcwLjI1NDIzMSwibmJmIjoxNjczNDc3NjcwLjI1NDIzNCwiZXhwIjoxNjczNTY0MDcwLjIyMTgwNCwic3ViIjoiMjAiLCJzY29wZXMiOltdfQ.1KwEVQUIR92rvszdNXUvzPuPvKFuiCWM4USFCDncrrSWIpVPOU9d8IATPyzYtoqns2lVlb4Kk-hOsIeI0WwUKpQDbrSC9a3BssiqejBdzWnpOGwWtT9tjmch4F0r3tetTvp077Q4Qn2aA_2yiFudmUzydGldu6a_F6IgCevXVBeH1_PC0yBXl3ozZIL8OMYfQKc40d9CxacguA9ph4tqZxmbDGLypkJfR5-Bz887garz8DD9UbO2wSeOGj8svo4WxIBtmUFvY6Nt5YihgoXhvxuk2KINsancqnCQvR7xxWxKqfwkoX76Y0ZAfcJ-khsdxFtpKPO3j4A4rYSVmF0SxRS8wl7FLW1jgzFZV6nluaZ84vaz2rH9LgpPopAtOdcimRTjSq7p1WwgATO8EdhhLv77Vck_C4ULv43D5m0X5D0cBKErla0HxiFaDxqlDzoRGhXDbjm3j-kbVSTuZPOfmp-UlyDh3XjCu55UhKxIhI0lACi1XSnzczXKshglzpKZDOf1eWaGqYDkZ-YWoJ8qyS9JhGDLt6qN-AjPYPHaTQ9SLwVCS4-5qU7bEMJWZwQ0FTIdu0pBNQPCr88DUHNzPmnGmZBlnPD-SSP_SBqUJnwcwqEkQUpH1M42ttijFySN7LzFubPRTuKsxV0T7PvGcQxduiMylyHlb65c0JI7RhU' \\\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
}
```