TratowAPI
API aberta · Clientes

Alterar etiqueta de cliente

patch/api/open/v1/client-tags/{tagId}

Em resumo

  • PATCH /api/open/v1/client-tags/{tagId}
  • Precisa de chave read_write.
  • Obrigatórios: tagId.
  • 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_write.

  • tagIdstringobrigatório

    Id de tag (UUID).

Corpo

application/json
  • namestring

    Nome.

    1 a 40 caracteres

  • colorstring

    Cor em hexadecimal (#RRGGBB).

Resposta 200

application/json
  • idstring<uuid>obrigatório

    Identificador único (UUID).

  • namestringobrigatório

    Nome.

  • colorstringobrigatório

    Cor em hexadecimal (#RRGGBB).

  • clientCountintegerobrigatório

    Quantidade de cliente.

    -9007199254740991 a 9007199254740991

curl --request PATCH \  --url 'https://qa-tratow.ips.app.br/api/open/v1/client-tags/{tagId}' \  --header 'Authorization: Bearer <chave>' \  --header 'Content-Type: application/json' \  --data '{    "name": "Maria Lima",    "color": "#6366F1"  }'
Resposta
{  "id": "3f6c1b2a-4c7a-4d9e-8b1f-2e5d6a7b4c9d",  "name": "Maria Lima",  "color": "#6366F1",  "clientCount": 1}

Os valores são ilustrativos.