Pesquisas e RespostasListar Respostas

Listar Respostas

Retorna uma lista paginada com as respostas das pesquisas de determinada unidade.

curl -X POST "https://api.amplifique.me/partners/cf/answers?limit=42&page=25&start=01/01/2024&end=31/12/2024&include_survey=true&only_finalized=example_string&survey=example_string" \
  -H "Content-Type: application/json" \
  -H "Authorization: YOUR_API_KEY"
{
  "data": [
    {
      "_id": "645e95240c1647609077969b",
      "_survey": "60afce1ca9680b000eca2459",
      "channel": 4,
      "answered": true,
      "opened": true,
      "opened_at": "2023-05-12T19:36:04.367Z",
      "finalized": true,
      "deleted": false,
      "origin": "preview.amplifique.me/preview/60afce1ca9680b000eca2459?version=2",
      "anonymized": false,
      "resolved": false,
      "attempts": 1,
      "_customer": "645e95240c16476090779698",
      "_business": "5b5765bec9498b0014883c0b",
      "answers": [
        {
          "internal_name": "nps_1",
          "answer": 10,
          "isMainMetric": true,
          "type": "nps",
          "_id": "645e9557fdfa5a0ffd07289e"
        }
      ],
      "created_at": "2023-05-12T19:36:04.368Z",
      "notes": [
        {}
      ],
      "answered_at": "2023-05-12T19:36:55.614Z",
      "originIp": "2a09:bac1:1120:19d8::61:205",
      "time_to_answer": 50.757,
      "finalized_at": "2023-05-12T19:36:55.625Z",
      "score": 100,
      "customer": {
        "name": "João da Silva",
        "email": "joao@example.com",
        "tel": "+5542999999999",
        "custom_fields": {}
      },
      "custom_fields": {},
      "deleted_by": {}
    }
  ],
  "total": 123,
  "pages": 10,
  "page": 0
}
POST
/partners/cf/answers
POST
API Key (header: Authorization)
Authorizationstring
Required

API key (sent in header)

query
limitinteger

Limite de respostas retornadas por página. Mín: 1, Máx: 1000

query
pageinteger

Número da página a retornar. Mín: 0

query
startstring

Data inicial do filtro (formato dd/MM/yyyy). Requer o parâmetro end.

query
endstring

Data final do filtro (formato dd/MM/yyyy). Requer o parâmetro start.

query
include_surveyboolean

Quando true, retorna a estrutura completa da pesquisa junto de cada resposta.

query
only_finalizedstring

Filtra por status de finalização. Valores aceitos: complete, incomplete, all.

query
surveystring

Filtra resultados de uma pesquisa específica. Informar o ID da pesquisa (ex: 67f578cccc4ab22df8543fcc).

Content-Typestring
Required

The media type of the request body

Options:
No request body parameters defined
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

API Key for authentication. Provide your API key in the header.

Query Parameters

limitinteger

Limite de respostas retornadas por página. Mín: 1, Máx: 1000

pageinteger

Número da página a retornar. Mín: 0

startstring

Data inicial do filtro (formato dd/MM/yyyy). Requer o parâmetro end.

endstring

Data final do filtro (formato dd/MM/yyyy). Requer o parâmetro start.

include_surveyboolean

Quando true, retorna a estrutura completa da pesquisa junto de cada resposta.

only_finalizedstring

Filtra por status de finalização. Valores aceitos: complete, incomplete, all.

surveystring

Filtra resultados de uma pesquisa específica. Informar o ID da pesquisa (ex: 67f578cccc4ab22df8543fcc).

Responses

dataarray
totalinteger

Total de registros encontrados

pagesinteger

Total de páginas disponíveis

pageinteger

Página atual retornada