v1
latestOpenAPI 3.0.02026-07-24161168406.5 KBDepartment
Department
Create a new department
Creates a new department in the company.
Business Rules:
- name: Required. Maximum 300 characters.
- type: Required. Must be a valid department type (e.g., DEPARTMENT).
- externalCode: Required. Maximum 50 characters. Must be unique within the company.
- description: Optional. Maximum 900 characters.
- costCenter: Optional. If provided, the cost center must exist in the company.
Validation:
- All required fields must be provided and not empty.
- The externalCode must not already exist for another department in the same company.
- If a costCenter is specified, it must be found by its externalCode.
post/os/v1/departments
Request body
Example request
{
"name": "Produto",
"type": "DEPARTMENT",
"externalCode": "OU-F98",
"description": "OU Description",
"costCenter": {
"externalCode": "OU-F98"
}
}Response
The department has been successfully created.