1. Clientes
  2. Atualizar cliente
PUT
/customers/{customerId}
curl --request PUT \
     --url https://api.treeunfe.com.br/api/v1/customers/{customerId} \
     --header 'x-api-key: <api-key>' \
     --header 'x-api-key: <x_api_key>' \
     --header 'Content-Type: application/json' \
     --data '{
  "xNome": "<string>",
  "indIEDest": "<string>",
  "IE": "<string>",
  "email": "<string>",
  "address": "<value>"
}'

​
Autenticação

x-api-key
required
string

API Key da organization (rawKey).

​
Parâmetros de rota

customerId
required
string

ID (UUID) do cliente.

​
Body

application/json

xNome
string
indIEDest
string
IE
string
email
string
address
object

Endereço no padrão do leiaute da NF-e.

  • xLgr (string) (obrigatório): Logradouro.
  • nro (string) (obrigatório): Número.
  • xCpl (string): Complemento.
  • xBairro (string) (obrigatório): Bairro.
  • cMun (integer) (obrigatório): Código IBGE do município (7 dígitos).
  • xMun (string) (obrigatório): Nome do município.
  • UF (string) (obrigatório): Sigla da UF.
  • CEP (string) (obrigatório): CEP só com números (8 dígitos).
  • fone (string): Telefone só com números.

​
Respostas

StatusDescrição
200Cliente atualizado.
400Body inválido (campo obrigatório ausente, formato incorreto ou campo não permitido).
404Recurso não encontrado.
curl -X PUT "https://api.treeunfe.com.br/api/v1/customers/CUSTOMERID" \
  -H "x-api-key: RAW_KEY_DA_ORGANIZATION" \
  -H "Content-Type: application/json" \
  -d '{
    "xNome": "Cliente Teste Novo",
    "email": "novo@exemplo.com.br"
  }'