v1

latestOpenAPI 3.0.02026-07-24161168406.5 KB
Area
Area

Update an existing area

Updates an area identified by externalCode in the URL.

Business Rules:

  • name: Required. Maximum 300 characters.
  • externalCode: Required. Maximum 50 characters. Must be unique within the company (must not match another area's code).
  • similarity: Required. Must be a valid area similarity value.
  • description: Optional. Maximum 900 characters.
  • organizationUnit: Optional. If provided, identify the department by uuid and/or externalCode (at least one). If both are sent, uuid is used for lookup.
  • costCenter: Optional. If provided, identify the cost center by uuid and/or externalCode (at least one). If both are sent, uuid is used for lookup.

Validation:

  • All required fields must be provided and not empty.
  • The area identified by externalCode in the URL must exist for the company.

Errors (HTTP):

  • 404 when no area matches the URL externalCode for the company.
  • 422 when a nested cost center or organization unit reference cannot be resolved.
  • 500 for any other unexpected failure (generic Internal server error response).
put/os/v1/areas/external/{externalCode}

Path parameters

externalCodestring required
Example:A-F99-51

External code of the area to update

Request body

namestring required

area name

similarity'ADMINISTRATIVE' | 'FINANCIAL' | 'AGRONOMY' | 'ARCHITECTURE' | 'AUDITING' | 'QUALITY' | 'CUSTOMER_SERVICE' | 'COMMERCIAL' | 'PURCHASING' | 'COMMUNICATION' | 'DESIGN' | 'MARKETING' | 'ACCOUNTING' | 'CONTROLLING' | 'ENGINEERING' | 'MAINTENANCE' | 'TECHNICAL_SERVICES' | 'LEGAL' | 'INNOVATION' | 'PRODUCT' | 'LOGISTICS' | 'OPERATION' | 'PROJECTS' | 'PROCESSES' | 'HUMAN_RESOURCES' | 'SECURITY' | 'TECHNOLOGY' required

Area Similarity

externalCodestring required

Area external code

descriptionstring

Area description

Example request

{
  "name": "Produto Digital",
  "similarity": "ACCOUNTING",
  "externalCode": "A-F98",
  "description": "Area Description"
}

Response

The area has been successfully updated.