Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

Essa API tem a função de retornar os registros das ligações realizadas pelas campanhas.

Os resultados são paginados, o que significa que serão mostrados no máximo 50 registros para cada requisição feita.

As regras à respeito dos campos customizados devem ser obedecidas também frente à API, ou seja, para que os valores sejam exibidos, devemos especificar a(s) campanha(s) que contenha(m) àqueles campos associados a ela.

Nos cabeçalhos dos requests, é necessário incluir uma chave "token" cujo valor seja um token de API.

Listar chamadas do discador

Endpoint

/api/v1/dialer/calls_history

Method

GET

Query String

Nome

Valor padrão

Valor máximo

Valores válidos

limit

50

50

-

page

1

-

-

start_date

dia atual

-

-

end_date

dia atual

-

-

external_id

-

-

-

agent_id

-

-

-

number

-

-

-

campaign_id

-

-

-

contact_status

success

success, both, error

Obs: agent_id e campaign_id podem ser múltiplos.

contact_status está disponível a partir da versão 6.77.0

Exemplo de requisição

curl --location --request GET 'https://cliente.evolux.net.br/api/v1/dialer/calls_history?number=84999999999&campaign_id=376' \
--header 'token: [SUPRIMIDO POR SEGURANÇA] \


Exemplo de resposta

{
    "pagination": {
        "max_limit": 50,
        "limit": 50,
        "first_url": "https://cliente.evolux.net.br/api/v1/dialer/calls_history?number=84999999999&campaign_id=376&page=1",
        "next_url": null,
        "items": 2,
        "last_url": "https://cliente.evolux.net.br/api/v1/dialer/calls_history?number=84999999999&campaign_id=376&page=1",
        "total": 2,
        "current_url": "https://cliente.evolux.net.br/api/v1/dialer/calls_history?number=84999999999&campaign_id=376&page=1",
        "prev_url": null
    },
    "meta": {
        "status": 200,
        "message": "OK"
    },
    "data": [
        {
            "answer_time": "2021-10-28T19:42:00+00:00",
            "classification": "-",
            "hangup_cause": "Cancelada pelo originador",
            "uuid": "0e4bccbe-3827-11ec-8190-5f7aar43ds2",
            "campaign": {
                "id": 376,
                "name": "Campanha de Teste Evolux"
            },
            "talking_duration": 30,
            "trunk_name": "Pontal",
            "start_time": "2021-10-28T19:41:33+00:00",
            "end_by": "Subscriber",
            "agent": {
                "id": 149,
                "name": "Atendente Evolux"
            },
            "billable_duration": 41.0,
            "subscriber": {
                "external_id": "19191919",
                "number": "8488888888",
                "name": "Ronaldinho"
            },
            "survey": {
                "csat": null,
                "nps": null
            },
            "end_time": "2021-10-28T19:42:30+00:00",
            "outcome": "-",
            "hangup_cause": "Normal clearing",
            "id": 48582566,
            "custom_fields": {
                "type": "VIP",
                "site": "www.evolux.net.br",
                "obs": "Analista de Professional S"
            }
        },
        {
            "answer_time": "2021-10-28T19:41:33+00:00",
            "classification": "-",
            "hangup_cause": "Desligamento normal",
            "uuid": "01271e80-3827-11ec-bf38-5f7aa276gtr",
            "campaign": {
                "id": 376,
                "name": "Campanha de Teste Evolux"
            },
            "talking_duration": 13,
            "trunk_name": "Provedor de Telefonia",
            "start_time": "2021-10-28T19:41:11+00:00",
            "end_by": "Agent",
            "agent": {
                "id": 149,
                "name": "Atendente Evolux"
            },
            "billable_duration": 24.0,
            "subscriber": {
                "external_id": "20202020",
                "number": "84999999999",
                "name": "Hulk"
            },
            "survey": {
                "csat": null,
                "nps": null
            },
            "end_time": "2021-10-28T19:41:46+00:00",
            "outcome": "-",
            "hangup_cause": "Normal clearing",
            "id": 48582498,
            "custom_fields": {
                "type": "VIP",
                "site": "www.evolux.net.br",
                "obs": "Analista de Suporte"
            }
        }
    ]
}

  • No labels