Departments

Add a Department

Adds a new department record to the system.

post/v1/departments

Request

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

Headers

RequestIdstring uuid

Unique request identifier in UUID format used to correlate request data to log entries and events.

Example:63680b86-c7e0-4a36-ae4a-d0d481089aff

Unique request identifier (UUID) used to correlate request data with log entries and events.

FrontOfficeTenantIdinteger

An integer identifier for the tenant that the request is being made for. Required when Tenant header is not provided.

Tenantstring

Tenant company code that determines data access scope during the request. Required when FrontOfficeTenantId header is not provided.

Request body

compIdinteger required

The identifier for company.

departmentNamestring required

The name of the department.

officeIdinteger

The identifier for the office.

statusIdinteger

The identifier for the status.

parentDepartmentIdinteger

The identifier for the parent department.

street1string

Street address line 1 for the department.

street2string

Street address line 2 for the department.

citystring

City for the department.

stateProvincestring required

Province, state, or region for the department.

postalCodestring

ZIP/postal code for the department.

countrystring 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>.

geoCodestring

Numerical coordinate. The value is generated based on the ZIP code, city, and state of the address.

departmentPhonestring

Phone number of the branch.

defaultJobOwnerIDsinteger[]

User IDs of the default job owners of the department.

originstring

The origin of the department.

weekEndDatestring

Week End Date for the department. Allowed values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday.

payPeriodstring

Pay Period for the department. Allowed values: Daily, Weekly, BiWeekly, Monthly, SemiMonthly, Yearly, Hourly.

payCyclestring

Pay Cycle for the department. Allowed values: 1, 2, 3, 4, Last Week.

billingPeriodstring

Billing Period for the department. Allowed values: Daily, Weekly, BiWeekly, Monthly, SemiMonthly, Yearly, Hourly.

billingCyclestring

Billing Cycle for the department. Allowed values: 1, 2, 3, 4, Last Week.

originRecordIdstring

The identifier for the origin of the department from partner database.

Example request

{
  "compId": 123456,
  "departmentName": "Warehouse",
  "officeId": 789012,
  "statusId": 263,
  "parentDepartmentId": 345678,
  "street1": "123 Main Street",
  "street2": "Suite 100",
  "city": "Eagan",
  "stateProvince": "MN",
  "postalCode": "55121",
  "country": "US",
  "geoCode": "241234892",
  "departmentPhone": "651-555-1234",
  "defaultJobOwnerIDs": [
    12345,
    67890
  ],
  "origin": "PartnerXYZ",
  "weekEndDate": "Friday",
  "payPeriod": "Weekly",
  "payCycle": "1",
  "billingPeriod": "BiWeekly",
  "billingCycle": "2",
  "originRecordId": "12345-abcde"
}

Response

The created department.

idinteger

The identifier for the department.

namestring

The name of the department.

companyIdinteger

The identifier for the company.

officeIdinteger

The identifier for the office.

statusIdinteger

The identifier for the status.

statusstring

The status value.

statusTypestring

The status type value.

parentDepartmentIdinteger

The identifier for the parent department.

departmentPhonestring

Phone number of the department.

defaultJobOwnerIDsinteger[]

User IDs of the default job owners of the department.

originstring

The origin of the department.

originIdinteger

The identifier for the origin of the department.

weekendDaystring

The week end day for the department. Allowed values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday.

payPeriodstring

The pay period for the department. Allowed values: Daily, Weekly, BiWeekly, Monthly, SemiMonthly, Yearly, Hourly.

payCyclestring

The pay cycle for the department. Allowed values: 1, 2, 3, 4, Last Week.

billingPeriodstring

The billing period for the department. Allowed values: Daily, Weekly, BiWeekly, Monthly, SemiMonthly, Yearly, Hourly.

billingCyclestring

The billing cycle for the department. Allowed values: 1, 2, 3, 4, Last Week.

originRecordIdstring

The identifier for the origin of the department from partner database.

Example response

{
  "id": 123456,
  "name": "Warehouse",
  "companyId": 12345,
  "officeId": 67890,
  "statusId": 143,
  "status": "Active",
  "statusType": "General",
  "parentDepartmentId": 98765,
  "address": {
    "street1": "123 Main Street",
    "street2": "Suite 100",
    "city": "St. Paul",
    "state_Province": "MN",
    "postalCode": "55121",
    "country": "US",
    "county": "Dakota",
    "geoCode": "241231070",
    "schoolDistrictCode": "00000"
  },
  "addresses": [
    {
      "street1": "123 Main Street",
      "street2": "Suite 100",
      "city": "St. Paul",
      "state_Province": "MN",
      "postalCode": "55121",
      "country": "US",
      "county": "Dakota",
      "geoCode": "241231070",
      "schoolDistrictCode": "00000",
      "addressId": 12345,
      "branchId": 12346,
      "companyId": 12347,
      "phone": "+1-555-123-4567",
      "isDefault": true,
      "origin": "Acme Partner",
      "salesTaxes": [
        {
          "configSalesTaxGUID": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "name": "Minnesota State Tax",
          "description": "MN state sales tax rate",
          "state": "MN"
        }
      ]
    }
  ],
  "departmentPhone": "234-567-8900",
  "defaultJobOwnerIDs": [
    123456,
    789012
  ],
  "origin": "Acme Partner",
  "originId": 54321,
  "weekendDay": "Friday",
  "payPeriod": "Weekly",
  "payCycle": "2",
  "billingPeriod": "BiWeekly",
  "billingCycle": "2",
  "originRecordId": "DEPT-12345"
}

Changes

No recorded changes to this operation across all 1 revision of this API.