1. Organizations
  2. Edit organization
PATCH
/enterprise/organizations/{organizationId}
curl --request PATCH \
     --url https://api.treeunfe.com.br/api/v1/enterprise/organizations/{organizationId} \
     --header 'x-api-key: <api-key>' \
     --header 'x-enterprise-key: <x_enterprise_key>' \
     --header 'Content-Type: application/json' \
     --data '{
  "xNome": "<string>",
  "xFant": "<string>",
  "email": "<string>",
  "fone": "<string>",
  "IE": "<string>",
  "address": "<value>",
  "isActive": true
}'

Updates the registration data. The body is strict: any field outside the list returns 400. Sending CNPJCPF returns 400 CNPJ não pode ser alterado (“CNPJ cannot be changed”).

isActive: false deactivates the organization; its API Keys then receive 403 Organization is inactive.

​
Authentication

Send the x-enterprise-key header.

x-enterprise-key
string

The Enterprise account’s key (enterprise:manage scope).

​
Path parameters

organizationId
required
string

The organization’s ID (UUID).

​
Body

application/json

xNome
string
xFant
string
email
string
fone
string
IE
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.
isActive
boolean

false deactivates the organization: its keys then receive 403 on the operational routes.

​
Responses

StatusDescription
200Organization updated.
400Invalid body (missing required field, wrong format, or field not allowed).
401Credential missing, invalid, or expired.
404Resource not found.
curl -X PATCH "https://api.treeunfe.com.br/api/v1/enterprise/organizations/7a6b2d8e-4bc3-4a25-a298-adb3ba63f9de" \
  -H "x-enterprise-key: YOUR_ENTERPRISE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "xNome": "CLIENTE EXEMPLO LTDA - FILIAL"
  }'
{
  "organization": {
    "id": "string",
    "CNPJCPF": "string",
    "xNome": "string",
    "xFant": "string",
    "email": "string",
    "fone": "string",
    "IE": "string",
    "address": {
      "xLgr": "Rua das Palmeiras",
      "nro": "456",
      "xCpl": "string",
      "xBairro": "Centro",
      "cMun": 3550308,
      "xMun": "São Paulo",
      "UF": "SP",
      "CEP": "01002000",
      "fone": "string"
    },
    "isActive": true
  }
}