API aberta · Produtos
Cadastrar fornecedor
post
/api/open/v1/suppliersEm resumo
POST /api/open/v1/suppliers- Precisa de chave
read_write. - Obrigatórios:
name. - Sucesso:
201.
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.
Corpo
application/jsonnamestringobrigatórioNome.
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
activebooleanpadrão: trueAtivo (`true`) ou inativo (`false`). Inativos somem das buscas e da agenda.
Resposta 201
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 POST \
--url 'https://qa-tratow.ips.app.br/api/open/v1/suppliers' \
--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.
