- Customers
- Update customer
Customers
Update customer
Update customer
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>"
}'Authentication
x-api-key
required
string
The organization’s API Key (rawKey).
Path parameters
customerId
required
string
The customer’s ID (UUID).
Body
application/json
xNome
string
indIEDest
string
IE
string
email
string
address
object
Address following the NF-e layout.
xLgr(string) (required): Street.nro(string) (required): Number.xCpl(string): Address line 2.xBairro(string) (required): Neighborhood.cMun(integer) (required): The municipality’s IBGE code (7 digits).xMun(string) (required): Municipality name.UF(string) (required): State abbreviation.CEP(string) (required): Postal code (CEP), digits only (8 digits).fone(string): Phone number, digits only.
Responses
| Status | Description |
|---|---|
200 | Customer updated. |
400 | Invalid body (missing required field, wrong format, or field not allowed). |
404 | Resource not found. |
curl -X PUT "https://api.treeunfe.com.br/api/v1/customers/CUSTOMERID" \
-H "x-api-key: ORGANIZATION_RAW_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: ORGANIZATION_RAW_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>"
}'