Shift
- 16 Jun 2022
- 4 Minutes to read
- Print
- DarkLight
Shift
- Updated on 16 Jun 2022
- 4 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Shift
You need the Manage Settings permission to manage Shifts.
Shifts
- Shifts ManageGET livechat/shifts
- Get the list of ShiftsGET livechat/shifts/{id}
- Get a single ShiftPOST livechat/shifts
- Create a new ShiftPUT livechat/shifts/{id}
- Update the ShiftDELETE livechat/shifts/{id}
- Remove the Shift
Shift JSON Format
Shift is represented as simple flat JSON objects with the following keys:
Name | Type | Description |
---|---|---|
id | guid | Id of the shift. |
timeZone | string | Time zone of the shift.Value includes all Time Zone Option identifiers. |
autoDetectDayLightSavingsTime | bool | Whether auto detect Daylight Saving Time or not. |
name | string | Name of the shift. |
shiftHolidays | shiftHolidays[] | Reference to Shift Holiday. |
shiftWorkingHours | shiftWorkingHours[] | Reference to Shift Working Hours. |
agentIds | array | The list of the shift identifiers, which the agent belongs to. |
departmentIds | array | The list of the shift ids which the department belongs to. |
Shift Holiday JSON Format:
Name | Type | Description |
---|---|---|
id | guid | Id of the shift holiday. |
name | string | Name of the shift holiday. |
holidayDate | datetime | Date of the shift holiday. |
shiftId | guid | Id of the shift. |
Shift Working Hours JSON Format:
Name | Type | Description |
---|---|---|
id | guid | Id of the shift working hours. |
shiftId | guid | Id of the shift. |
dayOfWeek | string | Allowed values are "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday". |
startTime | time | Start time of the shift working hours. |
endTime | time | End time of the shift working hours. |
agentAwayStatusId | guid | Id of the agent away status. |
Get the list of Shifts
GET livechat/shifts
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
include | string | query | no | Allowed values are "agent", "department", "shiftHoliday", "shiftWorkingHours". |
Response:
An array of Shift
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/shifts \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"shifts": [
{
"id": "8CAF5329-7C46-EB11-8100-00155D081D0B",
"timeZone": "China Standard Time",
"autoDetectDayLightSavingsTime": false,
"name": "shift",
"shiftHolidays": [
{
"id": "8FAF5329-7C46-EB11-8100-00155D081D0B",
"name": "shiftHoliday",
"holidayDate": "2021-05-01",
"shiftId": "E0AF5329-7C46-EB11-8100-00155D081D0B"
}
],
"shiftWorkingHours": [
{
"id": "92AF5329-7C46-EB11-8100-00155D081D0B",
"shiftId": "93AF5329-7C46-EB11-8100-00155D081D0B",
"dayOfWeek": "Monday",
"startTime": "09:00:00",
"endTime": "18:00:00",
"agentAwayStatusId": "DFAF5329-7C46-EB11-8100-00155D081D0B"
}
],
"agentIds": [
"40A2EF45-7D46-EB11-8100-00155D081D0B"
],
"departmentIds": [
"6fd98c99-f183-4247-bdda-47491426e577"
]
}
],
"nextPage": null,
"previousPage": null,
"total": 1
}
Get a single Shift
GET livechat/shifts/{id}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
include | string | query | no | Allowed values are "agent", "department", "shiftHoliday", "shiftWorkingHours". |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/shifts/8CAF5329-7C46-EB11-8100-00155D081D0B \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"id": "8CAF5329-7C46-EB11-8100-00155D081D0B",
"timeZone": "China Standard Time",
"autoDetectDayLightSavingsTime": false,
"name": "shift",
"shiftHolidays": [
{
"id": "8FAF5329-7C46-EB11-8100-00155D081D0B",
"name": "shiftHoliday",
"holidayDate": "2021-05-01",
"shiftId": "E0AF5329-7C46-EB11-8100-00155D081D0B"
}
],
"shiftWorkingHours": [
{
"id": "92AF5329-7C46-EB11-8100-00155D081D0B",
"shiftId": "93AF5329-7C46-EB11-8100-00155D081D0B",
"dayOfWeek": "Monday",
"startTime": "09:00:00",
"endTime": "18:00:00",
"agentAwayStatusId": "DFAF5329-7C46-EB11-8100-00155D081D0B"
}
],
"agentIds": [
"40A2EF45-7D46-EB11-8100-00155D081D0B"
],
"departmentIds": [
"6fd98c99-f183-4247-bdda-47491426e577"
]
}
Create a new Shift
POST livechat/shifts
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
timeZone | string | body | yes | Time zone of the shift.Value includes all Time Zone Option identifiers. |
autoDetectDayLightSavingsTime | bool | body | no | Whether auto detect Daylight Saving Time or not. |
name | string | body | yes | Name of the shift. |
shiftHolidays | shiftHolidays[] | body | no | Reference to Shift Holiday. |
shiftWorkingHours | shiftWorkingHours[] | body | no | Reference to Shift Working Hours. |
agentIds | array | body | no | The list of the shift identifiers, which the agent belongs to. |
departmentIds | array | body | no | The list of the shift ids which the department belongs to. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/shifts \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"timeZone":"China Standard Time","autoDetectDayLightSavingsTime":false,"name":"shift","shiftHolidays":[{"name":"shiftHoliday","holidayDate":"2021-05-01"}],"shiftWorkingHours":[{"dayOfWeek":"Monday","startTime":"09:00:00","endTime":"18:00:00","agentAwayStatusId":"DFAF5329-7C46-EB11-8100-00155D081D0B"}]}'
Response:
HTTP/1.1 201 Created
{
"id": "8CAF5329-7C46-EB11-8100-00155D081D0B",
"timeZone": "China Standard Time",
"autoDetectDayLightSavingsTime": false,
"name": "shift",
"shiftHolidays": [
{
"id": "8FAF5329-7C46-EB11-8100-00155D081D0B",
"name": "shiftHoliday",
"holidayDate": "2021-05-01",
"shiftId": "E0AF5329-7C46-EB11-8100-00155D081D0B"
}
],
"shiftWorkingHours": [
{
"id": "92AF5329-7C46-EB11-8100-00155D081D0B",
"shiftId": "93AF5329-7C46-EB11-8100-00155D081D0B",
"dayOfWeek": "Monday",
"startTime": "09:00:00",
"endTime": "18:00:00",
"agentAwayStatusId": "DFAF5329-7C46-EB11-8100-00155D081D0B"
}
],
"agentIds": [
"40A2EF45-7D46-EB11-8100-00155D081D0B"
],
"departmentIds": [
"6fd98c99-f183-4247-bdda-47491426e577"
]
}
Update the Shift
PUT livechat/shifts/{id}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
timeZone | string | body | yes | Time zone of the shift.Value includes all Time Zone Option identifiers. |
autoDetectDayLightSavingsTime | bool | body | no | Whether auto detect Daylight Saving Time or not. |
name | string | body | yes | Name of the shift. |
shiftHolidays | shiftHolidays[] | body | no | Reference to Shift Holiday. |
shiftWorkingHours | shiftWorkingHours[] | body | no | Reference to Shift Working Hours. |
agentIds | array | body | no | The list of the shift identifiers, which the agent belongs to. |
departmentIds | array | body | no | The list of the shift ids which the department belongs to. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/shifts/8CAF5329-7C46-EB11-8100-00155D081D0B \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"timeZone":"China Standard Time","autoDetectDayLightSavingsTime":false,"name":"shift","shiftHolidays":[{"name":"shiftHoliday","holidayDate":"2021-05-01"}],"shiftWorkingHours":[{"dayOfWeek":"Monday","startTime":"09:00:00","endTime":"18:00:00","agentAwayStatusId":"DFAF5329-7C46-EB11-8100-00155D081D0B"}]}'
Response:
HTTP/1.1 200 OK
{
"id": "8CAF5329-7C46-EB11-8100-00155D081D0B",
"timeZone": "China Standard Time",
"autoDetectDayLightSavingsTime": false,
"name": "shift",
"shiftHolidays": [
{
"id": "8FAF5329-7C46-EB11-8100-00155D081D0B",
"name": "shiftHoliday",
"holidayDate": "2021-05-01",
"shiftId": "E0AF5329-7C46-EB11-8100-00155D081D0B"
}
],
"shiftWorkingHours": [
{
"id": "92AF5329-7C46-EB11-8100-00155D081D0B",
"shiftId": "93AF5329-7C46-EB11-8100-00155D081D0B",
"dayOfWeek": "Monday",
"startTime": "09:00:00",
"endTime": "18:00:00",
"agentAwayStatusId": "DFAF5329-7C46-EB11-8100-00155D081D0B"
}
],
"agentIds": [
"40A2EF45-7D46-EB11-8100-00155D081D0B"
],
"departmentIds": [
"6fd98c99-f183-4247-bdda-47491426e577"
]
}
Remove the Shift
DELETE livechat/shifts/{id}
Parameters:
No Parameters
Response:
No Content
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/shifts/8CAF5329-7C46-EB11-8100-00155D081D0B \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 204 No Content
Was this article helpful?