post
https://api.gupy.io/os/v1/departments
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
externalCodemust not already exist for another department in the same company. - If a
costCenteris specified, it must be found by itsexternalCode.
