---
title: "Add a Department"
method: POST
path: "/v1/departments"
tags: ["Departments"]
---

# Add a Department

`POST /v1/departments`

## Request

- Base URL: `https://api.avionte.com/front-office`
- URL: `https://api.avionte.com/front-office/v1/departments`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Adds a new department record to the system.

## Headers

- `RequestId` string, uuid: Unique request identifier in UUID format used to correlate request data to log entries and events.
- `FrontOfficeTenantId` integer
- `Tenant` string

## Request body

- DepartmentDTO
  - `compId` integer, required: The identifier for company.
  - `departmentName` string, required: The name of the department.
  - `officeId` integer: The identifier for the office.
  - `statusId` integer: The identifier for the status.
  - `parentDepartmentId` integer: The identifier for the parent department.
  - `street1` string: Street address line 1 for the department.
  - `street2` string: Street address line 2 for the department.
  - `city` string: City for the department.
  - `stateProvince` string, required: Province, state, or region for the department.
  - `postalCode` string: ZIP/postal code for the department.
  - `country` string, required: A 2-letter ISO 3166-1 alpha-2 code representing the department country (e.g., "US", not "USA"). For details, see the <a href="https://developer.avionte.com/docs/general-guidelines#/data-formatting">General Guidelines</a>.
  - `geoCode` string: Numerical coordinate. The value is generated based on the ZIP code, city, and state of the address.
  - `departmentPhone` string: Phone number of the branch.
  - `defaultJobOwnerIDs` integer[]: User IDs of the default job owners of the department.
  - `origin` string: The origin of the department.
  - `weekEndDate` string: Week End Date for the department. Allowed values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday.
  - `payPeriod` string: Pay Period for the department. Allowed values: Daily, Weekly, BiWeekly, Monthly, SemiMonthly, Yearly, Hourly.
  - `payCycle` string: Pay Cycle for the department. Allowed values: 1, 2, 3, 4, Last Week.
  - `billingPeriod` string: Billing Period for the department. Allowed values: Daily, Weekly, BiWeekly, Monthly, SemiMonthly, Yearly, Hourly.
  - `billingCycle` string: Billing Cycle for the department. Allowed values: 1, 2, 3, 4, Last Week.
  - `originRecordId` string: The identifier for the origin of the department from partner database.

## Response `201`

The created department.

- Department
  - `id` integer: The identifier for the department.
  - `name` string: The name of the department.
  - `companyId` integer: The identifier for the company.
  - `officeId` integer: The identifier for the office.
  - `statusId` integer: The identifier for the status.
  - `status` string: The status value.
  - `statusType` string: The status type value.
  - `parentDepartmentId` integer: The identifier for the parent department.
  - `address` Address
    - `street1` string: Street address, line 1.
    - `street2` string: Street address, line 2.
    - `city` string: City.
    - `state_Province` string: ISO 2-character code for the Province, State, or Region.
    - `postalCode` string: ZIP/postal code.
    - `country` string: A 2-letter ISO 3166-1 alpha-2 code representing the country (e.g., "US", not "USA"). For details, see the <a href="https://developer.avionte.com/docs/general-guidelines#/data-formatting">General Guidelines</a>.
    - `county` string: County.
    - `geoCode` string: Numerical coordinate. The value is generated based on the ZIP code, city, and state of the address.
    - `schoolDistrictCode` string: School district code based on the Geo Code.
  - `addresses` DepartmentAddress[]: List of addresses for the department.
    - `street1` string: Street address, line 1.
    - `street2` string: Street address, line 2.
    - `city` string: City.
    - `state_Province` string: ISO 2-character code for the Province, State, or Region.
    - `postalCode` string: ZIP/postal code.
    - `country` string: A 2-letter ISO 3166-1 alpha-2 code representing the country (e.g., "US", not "USA"). For details, see the <a href="https://developer.avionte.com/docs/general-guidelines#/data-formatting">General Guidelines</a>.
    - `county` string: County.
    - `geoCode` string: Numerical coordinate. The value is generated based on the ZIP code, city, and state of the address.
    - `schoolDistrictCode` string: School district code based on the Geo Code.
    - `addressId` integer: The identifier for the department address.
    - `branchId` integer: The identifier for the company branch or department.
    - `companyId` integer: The identifier for the company.
    - `addressType` 'Main' | 'Worksite' | 'Billing' | 'Unknown': The address types available for selection for a department address.
    - `phone` string: The department's phone number.
    - `archive` boolean: An indication of whether the department address is archived or not.
    - `isDefault` boolean: An indication of whether the department address is the default address for the department.
    - `origin` string: The origin of the address of the department.
    - `salesTaxes` SalesTaxOption[]: Sales tax options associated with this address, populated with full tax details.
      - `configSalesTaxGUID` string, uuid: The unique identifier for the sales tax configuration.
      - `name` string: The name of the sales tax.
      - `description` string: A description of the sales tax.
      - `state` string: The US state code this sales tax applies to.
  - `departmentPhone` string: Phone number of the department.
  - `defaultJobOwnerIDs` integer[]: User IDs of the default job owners of the department.
  - `origin` string: The origin of the department.
  - `originId` integer: The identifier for the origin of the department.
  - `weekendDay` string: The week end day for the department. Allowed values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday.
  - `payPeriod` string: The pay period for the department. Allowed values: Daily, Weekly, BiWeekly, Monthly, SemiMonthly, Yearly, Hourly.
  - `payCycle` string: The pay cycle for the department. Allowed values: 1, 2, 3, 4, Last Week.
  - `billingPeriod` string: The billing period for the department. Allowed values: Daily, Weekly, BiWeekly, Monthly, SemiMonthly, Yearly, Hourly.
  - `billingCycle` string: The billing cycle for the department. Allowed values: 1, 2, 3, 4, Last Week.
  - `originRecordId` string: The identifier for the origin of the department from partner database.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Access Denied
- `404`: Not found
- `405`: Unsupported method
- `406`: Unsupported format(s) indicated by Accept header
- `409`: Operation could not be completed due to conflict.
- `415`: Unsupported format(s) indicated by the Content-Type header
- `429`: Too many requests
- `500`: An unexpected error occurred
- `502`: Service Unavailable
- `504`: Gateway Timeout

---

[API](https://skmtc.dev/avionte/apis/bold-front-office-api.md) - [All operations](https://skmtc.dev/avionte/apis/bold-front-office-api/llms.txt) - [OpenAPI document](https://skmtc.dev/avionte/apis/bold-front-office-api/revisions/bd5996cbaa0f?raw)
