- Clientes
- Atualizar cliente
Clientes
Atualizar cliente
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>"
}'
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 empresa.
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
| Status | Descrição |
|---|---|
200 | Cliente atualizado. |
400 | Body inválido (campo obrigatório ausente, formato incorreto ou campo não permitido). |
404 | Recurso não encontrado. |
curl -X PUT "https://api.treeunfe.com.br/api/v1/customers/CUSTOMERID" \
-H "x-api-key: SUA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"xNome": "Cliente Teste Novo",
"email": "novo@exemplo.com.br"
}'
curl -X PUT "https://api.treeunfe.com.br/api/v1/customers/CUSTOMERID" \
-H "x-api-key: SUA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"xNome": "Cliente Teste Novo",
"email": "novo@exemplo.com.br"
}'
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>"
}'
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>"
}'