v1

latestOpenAPI 3.0.02026-07-24161168406.5 KB
Operation Unit
Operation Unit

Update an operation unit by external code

Updates an operation unit identified by externalCode in the URL path.

Public contract: parent is nested as parent.externalCode (not a root externalCodeParent). Send parent: null or parent: "" to clear the parent; if parent is an object, externalCode must be a non-empty string (null, empty string, or omitting externalCode is invalid).

Errors: 404 not found for path code; 409 duplicate body externalCode or invalid parent reference (e.g. self-parent); 422 parent external code not found.

put/os/v1/operation-units/external/{externalCode}

Path parameters

externalCodestring required
Example:SP-001

External code of the operation unit to update

Request body

externalCodestring required
namestring required
addressstring nullable required

Use null or empty string to clear

businessRegistrationNumberstring nullable required

CNPJ; use null or empty string to clear

Example request

{
  "externalCode": "SP-001",
  "name": "Matriz São Paulo",
  "parent": {
    "externalCode": "OU-PARENT"
  }
}

Response

Operation unit updated successfully