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órioChave de API no formato Bearer ttw_live_<prefixo>_<segredo>, criada em Integrações → Chaves de API. Este endpoint precisa de chave read_write.
idstringobrigatórioId do registro (UUID).
Corpo
application/jsonnamestringNome.
1 a 120 caracteres
documentstringpode ser nuloDocumento (CPF ou CNPJ).
contactNamestringpode ser nuloNome de contact (só leitura).
até 120 caracteres
phonestringpode ser nuloTelefone com DDD (só dígitos; aceita +55).
até 30 caracteres
emailstring<email>pode ser nuloE-mail.
notesstringpode ser nuloObservações livres.
até 2000 caracteres
activebooleanAtivo (`true`) ou inativo (`false`). Inativos somem das buscas e da agenda.
Resposta 200
application/jsonidstring<uuid>obrigatórioIdentificador único (UUID).
namestringobrigatórioNome.
documentstringpode ser nuloobrigatórioDocumento (CPF ou CNPJ).
contactNamestringpode ser nuloobrigatórioNome de contact (só leitura).
phonestringpode ser nuloobrigatórioTelefone com DDD (só dígitos; aceita +55).
emailstringpode ser nuloobrigatórioE-mail.
notesstringpode ser nuloobrigatórioObservações livres.
activebooleanobrigatórioAtivo (`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
}'{
"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.
