TratowAPI
API aberta · Produtos

Alterar fornecedor

patch/api/open/v1/suppliers/{id}

Em resumo

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

  • idstringobrigatório

    Id do registro (UUID).

Corpo

application/json
  • namestring

    Nome.

    1 a 120 caracteres

  • documentstringpode ser nulo

    Documento (CPF ou CNPJ).

  • contactNamestringpode ser nulo

    Nome de contact (só leitura).

    até 120 caracteres

  • phonestringpode ser nulo

    Telefone com DDD (só dígitos; aceita +55).

    até 30 caracteres

  • emailstring<email>pode ser nulo

    E-mail.

  • notesstringpode ser nulo

    Observações livres.

    até 2000 caracteres

  • activeboolean

    Ativo (`true`) ou inativo (`false`). Inativos somem das buscas e da agenda.

Resposta 200

application/json
  • idstring<uuid>obrigatório

    Identificador único (UUID).

  • namestringobrigatório

    Nome.

  • documentstringpode ser nuloobrigatório

    Documento (CPF ou CNPJ).

  • contactNamestringpode ser nuloobrigatório

    Nome de contact (só leitura).

  • phonestringpode ser nuloobrigatório

    Telefone com DDD (só dígitos; aceita +55).

  • emailstringpode ser nuloobrigatório

    E-mail.

  • notesstringpode ser nuloobrigatório

    Observações livres.

  • activebooleanobrigatório

    Ativo (`true`) ou inativo (`false`). Inativos somem das buscas e da agenda.

curl --request PATCH \  --url 'https://qa-tratow.ips.app.br/api/open/v1/suppliers/{id}' \  --header 'Authorization: Bearer <chave>' \  --header 'Content-Type: application/json' \  --data '{    "name": "Maria Lima",    "document": "texto",    "contactName": "texto",    "phone": "11987654321",    "email": "maria@exemplo.com",    "notes": "Prefere atendimento pela manhã.",    "active": true  }'
Resposta
{  "id": "3f6c1b2a-4c7a-4d9e-8b1f-2e5d6a7b4c9d",  "name": "Maria Lima",  "document": "texto",  "contactName": "texto",  "phone": "11987654321",  "email": "texto",  "notes": "Prefere atendimento pela manhã.",  "active": true}

Os valores são ilustrativos.