TratowAPI
API aberta · Relatórios

Relatório: agenda e ocupação

get/api/open/v1/reports/agenda

Em resumo

  • GET /api/open/v1/reports/agenda
  • Chave read ou read_write.
  • Obrigatórios: from, to.
  • Sucesso: 200.
  • Authorizationstringheaderobrigatório

    Chave de API no formato Bearer ttw_live_<prefixo>_<segredo>, criada em Integrações → Chaves de API. Este endpoint precisa de chave read ou read_write.

  • fromstring<date>obrigatório

    Início do período (AAAA-MM-DD).

  • tostring<date>obrigatório

    Fim do período (AAAA-MM-DD), inclusive.

  • professionalIdstring<uuid>

    Id de profissional (UUID).

Resposta 200

application/json
  • currentobjectobrigatório
    Mostrar 13 atributos
    • totalintegerobrigatório

      Total de itens.

      -9007199254740991 a 9007199254740991

    • completedintegerobrigatório

      -9007199254740991 a 9007199254740991

    • noShowintegerobrigatório

      -9007199254740991 a 9007199254740991

    • canceledintegerobrigatório

      -9007199254740991 a 9007199254740991

    • openintegerobrigatório

      -9007199254740991 a 9007199254740991

    • onlineintegerobrigatório

      -9007199254740991 a 9007199254740991

    • squeezeInintegerobrigatório

      Encaixe: permite marcar sobre outro atendimento do mesmo profissional.

      -9007199254740991 a 9007199254740991

    • scheduledCentsintegerobrigatório

      Scheduled em centavos (100 = R$ 1,00).

      -9007199254740991 a 9007199254740991

    • lostCentsintegerobrigatório

      Lost em centavos (100 = R$ 1,00).

      -9007199254740991 a 9007199254740991

    • occupiedMinutesintegerobrigatório

      -9007199254740991 a 9007199254740991

    • availableMinutesintegerobrigatório

      -9007199254740991 a 9007199254740991

    • occupancyBpintegerpode ser nuloobrigatório

      Occupancy em pontos-base (100 = 1%).

      -9007199254740991 a 9007199254740991

    • averageLeadDaysnumberobrigatório
  • previousobjectobrigatório
    Mostrar 13 atributos
    • totalintegerobrigatório

      Total de itens.

      -9007199254740991 a 9007199254740991

    • completedintegerobrigatório

      -9007199254740991 a 9007199254740991

    • noShowintegerobrigatório

      -9007199254740991 a 9007199254740991

    • canceledintegerobrigatório

      -9007199254740991 a 9007199254740991

    • openintegerobrigatório

      -9007199254740991 a 9007199254740991

    • onlineintegerobrigatório

      -9007199254740991 a 9007199254740991

    • squeezeInintegerobrigatório

      Encaixe: permite marcar sobre outro atendimento do mesmo profissional.

      -9007199254740991 a 9007199254740991

    • scheduledCentsintegerobrigatório

      Scheduled em centavos (100 = R$ 1,00).

      -9007199254740991 a 9007199254740991

    • lostCentsintegerobrigatório

      Lost em centavos (100 = R$ 1,00).

      -9007199254740991 a 9007199254740991

    • occupiedMinutesintegerobrigatório

      -9007199254740991 a 9007199254740991

    • availableMinutesintegerobrigatório

      -9007199254740991 a 9007199254740991

    • occupancyBpintegerpode ser nuloobrigatório

      Occupancy em pontos-base (100 = 1%).

      -9007199254740991 a 9007199254740991

    • averageLeadDaysnumberobrigatório
  • previousFromstring<date>obrigatório
  • previousTostring<date>obrigatório
  • seriesobject[]obrigatório
    Mostrar 5 atributos
    • datestring<date>obrigatório

      Data (AAAA-MM-DD) no fuso do estabelecimento.

    • totalintegerobrigatório

      Total de itens.

      -9007199254740991 a 9007199254740991

    • completedintegerobrigatório

      -9007199254740991 a 9007199254740991

    • noShowintegerobrigatório

      -9007199254740991 a 9007199254740991

    • canceledintegerobrigatório

      -9007199254740991 a 9007199254740991

  • heatmapobject[]obrigatório
    Mostrar 3 atributos
    • weekdayintegerobrigatório

      Dia da semana: 0 = domingo … 6 = sábado.

      -9007199254740991 a 9007199254740991

    • hourintegerobrigatório

      -9007199254740991 a 9007199254740991

    • countintegerobrigatório

      Quantidade de itens.

      -9007199254740991 a 9007199254740991

  • byOriginobject[]obrigatório
    Mostrar 4 atributos
    • idstringobrigatório

      Identificador único (UUID).

    • namestringobrigatório

      Nome.

    • centsintegerobrigatório

      Valor em centavos (100 = R$ 1,00).

      -9007199254740991 a 9007199254740991

    • countintegerobrigatório

      Quantidade de itens.

      -9007199254740991 a 9007199254740991

  • byProfessionalobject[]obrigatório
    Mostrar 7 atributos
    • idstring<uuid>obrigatório

      Identificador único (UUID).

    • namestringobrigatório

      Nome.

    • totalintegerobrigatório

      Total de itens.

      -9007199254740991 a 9007199254740991

    • completedintegerobrigatório

      -9007199254740991 a 9007199254740991

    • noShowintegerobrigatório

      -9007199254740991 a 9007199254740991

    • canceledintegerobrigatório

      -9007199254740991 a 9007199254740991

    • occupancyBpintegerpode ser nuloobrigatório

      Occupancy em pontos-base (100 = 1%).

      -9007199254740991 a 9007199254740991

  • byServiceobject[]obrigatório
    Mostrar 4 atributos
    • idstringobrigatório

      Identificador único (UUID).

    • namestringobrigatório

      Nome.

    • centsintegerobrigatório

      Valor em centavos (100 = R$ 1,00).

      -9007199254740991 a 9007199254740991

    • countintegerobrigatório

      Quantidade de itens.

      -9007199254740991 a 9007199254740991

  • cancelReasonsobject[]obrigatório
    Mostrar 4 atributos
    • idstringobrigatório

      Identificador único (UUID).

    • namestringobrigatório

      Nome.

    • centsintegerobrigatório

      Valor em centavos (100 = R$ 1,00).

      -9007199254740991 a 9007199254740991

    • countintegerobrigatório

      Quantidade de itens.

      -9007199254740991 a 9007199254740991

curl --request GET \  --url 'https://qa-tratow.ips.app.br/api/open/v1/reports/agenda?from=2026-11-03&to=2026-11-03' \  --header 'Authorization: Bearer <chave>'
Resposta
{  "current": {    "total": 1,    "completed": 1,    "noShow": 1,    "canceled": 1,    "open": 1,    "online": 1,    "squeezeIn": 1,    "scheduledCents": 8000,    "lostCents": 8000,    "occupiedMinutes": 1,    "availableMinutes": 1,    "occupancyBp": 1000,    "averageLeadDays": 1.5  },  "previous": {    "total": 1,    "completed": 1,    "noShow": 1,    "canceled": 1,    "open": 1,    "online": 1,    "squeezeIn": 1,    "scheduledCents": 8000,    "lostCents": 8000,    "occupiedMinutes": 1,    "availableMinutes": 1,    "occupancyBp": 1000,    "averageLeadDays": 1.5  },  "previousFrom": "2026-11-03",  "previousTo": "2026-11-03",  "series": [    {      "date": "2026-11-03",      "total": 1,      "completed": 1,      "noShow": 1,      "canceled": 1    }  ],  "heatmap": [    {      "weekday": 1,      "hour": 1,      "count": 1    }  ],  "byOrigin": [    {      "id": "texto",      "name": "Maria Lima",      "cents": 1,      "count": 1    }  ],  "byProfessional": [    {      "id": "3f6c1b2a-4c7a-4d9e-8b1f-2e5d6a7b4c9d",      "name": "Maria Lima",      "total": 1,      "completed": 1,      "noShow": 1,      "canceled": 1,      "occupancyBp": 1000    }  ],  "byService": [    {      "id": "texto",      "name": "Maria Lima",      "cents": 1,      "count": 1    }  ],  "cancelReasons": [    {      "id": "texto",      "name": "Maria Lima",      "cents": 1,      "count": 1    }  ]}

Os valores são ilustrativos.