Business Hours API

Use this API to list the currently defined business hours, define new business hours, and view, edit, and delete the existing business hours.

URL

https://<server>/unifiedconfig/config/businesshour

Operations

  • create: Creates one business hour.

  • get: Returns one business hour using the URL https://<server>/unifiedconfig/config/businesshour/<id>

  • get(template): Returns a sample CSV template for Special Hours and Holidays, which is provided by the API, using the URL https://<server>/unifiedconfig/config/businesshour/specialdayschedule/template. The response contains the CSV template as a file attachment.

  • list: Retrieves a list of business hours.

  • update: Updates one business hour.

  • delete: Permanently deletes one business hour.

Parameters

  • changeStamp: See Shared Parameters.

  • refURL: The refURL of the business hour. See Shared Parameters.

  • name: The name of the business hour. See Shared Parameters.

  • description: See Shared Parameters.

  • type: Required. The type of the business hour.

    • 0: 24x7

    • 1: Custom

  • department: Optional. A reference to the department associated with the business hour, including the refURL. See References.

  • configuredStatus: The configured status of the business hour.

    • status: Required.

      • 0: Calendar Schedule

      • 1: Force Close

      • 2: Force Open

    • statusReason: Required if the status is Force Open or Force Close.

  • runTimeStatus: The run time status of the business hour. Available only in Get. It cannot be set or updated.

  • timezone: Required. The time zone of the business hour.

  • weekDaySchedules: The list of schedules on weekdays of business. Required only when business hour type is Custom.

    • dayOfweek: Required.

      • 0: Sunday

      • 1: Monday

      • 2: Tuesday

      • 3: Wednesday

      • 4: Thursday

      • 5: Friday

      • 6: Saturday

    • startTime: Required. Format HH:MM

    • endTime: Required. Format HH:MM

  • specialDaySchedules: The list of schedules on special days of business.

    • date: Required. Format: DD-MM-YYYY

    • startTime: Required, if the status is Open. Format: HH:MM

    • endTime: Required, if the status is Open. Format: HH:MM

    • description: Optional. Maximum of 255 characters.

    • status: Required.

      • 0: Closed

      • 1: Open

    • statusReason: Required. The refURL to existing status reason.

Search and Sort Values

The following table shows the parameters that are searched and the parameters that are sortable.

Search parameters Sort parameters
  • name

  • description

  • name

  • runTimeStatus

  • runTimeStatusReason

  • type

  • department.name

  • timezone.dispName

See Search and Sort.

Advanced Search Parameter
  • departments: (dept1|dept2|dept3...) returns all the business hours which belong to any of the specified departments. You can specify up to 10 departments. The department name is fully matched (case-insensitive, no partial matches).

Example Get Response

Code Snippet
Code Snippet - 1
Copy<businessHour>
    <refURL>/unifiedconfig/config/businesshour/1000</refURL>
    <changeStamp>0</changeStamp>
    <runTimeStatus>2</runTimeStatus>
    <runTimeStatusReason>closed</runTimeStatusReason>
    <name>credit_card</name>
    <type>1</type>
    <description>Business Line of Credit</description>
    <timezone>
    <refURL>/unifiedconfig/config/timezone/3001</refURL>
    <displayName>(UTC-05:00) Eastern Time (US & Canada)</displayName>
    </timezone>
    <configuredStatus>
        <status>1</status>
        <statusReason>
            <refURL>/unifiedconfig/config/businesshourstatusreason/5000</refURL>
            <reasonText>Emergency</reasonText>
        </statusReason>
    </configuredStatus>
    <specialDaySchedules>
        <specialDaySchedule>
            <refURL>/unifiedconfig/config/businesshour/1000/specialdayschedule/2001</refURL>
            <changeStamp>0</changeStamp>
            <date>04-02-2019</date>
            <startTime>03:26</startTime>
            <endTime>04:16</endTime>
            <description>Thanksgiving Day</description>
            <status>1</status>
            <statusReason>
                <refURL>/unifiedconfig/config/businesshourstatusreason/5000</refURL>
                <reasonText>Emergency</reasonText>
            </statusReason>
        </specialDaySchedule>
    </specialDaySchedules>
    <weekDaySchedules>
        <weekDaySchedule>
            <refURL>/unifiedconfig/config/businesshour/1000/weekdayschedule/1001</refURL>
            <changeStamp>0</changeStamp>
            <dayOfWeek>1</dayOfWeek>
            <startTime>06:20</startTime>
            <endTime>07:22</endTime>
        </weekDaySchedule>
    </weekDaySchedules>
</businessHour>
Copy<businessHour>
    <refURL>/unifiedconfig/config/businesshour/1000</refURL>
    <changeStamp>0</changeStamp>
    <runTimeStatus>2</runTimeStatus>
    <runTimeStatusReason>Week Day open reason</runTimeStatusReason>
    <name>Businesshour</name>
    <type>1</type>
    <description>additional requirement</description>
    <department>
        <refURL>/unifiedconfig/config/department/5022</refURL>
        <name>debit_card</name>
    </department>
    <timezone>
        <refURL>/unifiedconfig/config/timezone/3001</refURL>
        <displayName>(UTC-08:00) Pacific Time (US & Canada)</displayName>
    </timezone>
    <configuredStatus>
        <status>1</status>
        <statusReason>
            <refURL>/unifiedconfig/config/businesshourstatusreason/5000</refURL>
            <reasonText>Emergency</reasonText>
        </statusReason>
    </configuredStatus>
    <specialDaySchedules>
        <specialDaySchedule>
            <refURL>/unifiedconfig/config/businesshour/1000/specialdayschedule/2001</refURL>
            <changeStamp>0</changeStamp>
            <date>04-02-2019</date>
            <startTime>03:26</startTime>
            <endTime>04:16</endTime>
            <description>Thanksgiving Day</description>
            <status>1</status>
            <statusReason>
                <refURL>/unifiedconfig/config/businesshourstatusreason/5000</refURL>
                <reasonText>Week Day open reason</reasonText>
            </statusReason>
        </specialDaySchedule>
    </specialDaySchedules>
    <weekDaySchedules>
        <weekDaySchedule>
            <refURL>/unifiedconfig/config/businesshour/1000/weekdayschedule/1001</refURL>
            <changeStamp>0</changeStamp>
            <dayOfWeek>1</dayOfWeek>
            <startTime>06:20</startTime>
            <endTime>07:22</endTime>
        </weekDaySchedule>
    </weekDaySchedules>
</businessHour>