TratowAPI
API aberta · Profissionais

Expediente do profissional

get/api/open/v1/professionals/{id}/working-hours

Em resumo

  • GET /api/open/v1/professionals/{id}/working-hours
  • Chave read ou read_write.
  • Obrigatórios: id.
  • Sucesso: 200.
  • Erros possíveis: 400, 401, 404, 429.
  • 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.

  • idstringobrigatório

    Id do registro (UUID).

Resposta 200

application/json
  • custombooleanobrigatório
  • daysobject[]obrigatório
    Mostrar 2 atributos
    • weekdayintegerobrigatório

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

      0 a 6

    • rangesobject[]obrigatório

      até 10 itens

      Mostrar 2 atributos
      • startintegerobrigatório

        0 a 1440

      • endintegerobrigatório

        0 a 1440

Erros

  • 400Parâmetros ou corpo inválidos (`errors[]` traz o campo).
  • 401Chave de API ausente, inválida, revogada ou expirada.
  • 404Recurso não encontrado neste estabelecimento.
  • 429Limite de requisições da chave excedido (veja `Retry-After`).

Formato RFC 7807. Veja Erros.

curl --request GET \  --url 'https://qa-tratow.ips.app.br/api/open/v1/professionals/{id}/working-hours' \  --header 'Authorization: Bearer <chave>'
Resposta
{  "custom": true,  "days": [    {      "weekday": 1,      "ranges": [        {          "start": 1,          "end": 1        }      ]    }  ]}

Os valores são ilustrativos.