Update User Schedule
This request updates the user’s schedule.
Resource
PATCH /me/phone/schedule
Parameters
None
Payload
Fields
Name | Patch Operations |
---|---|
enableDayNightMode |
|
manualNightMode |
|
oneOffOverrideDateTime |
|
oneOffOverrideMode |
|
disableNotReachableWarning |
|
switchTimeTemplate |
|
syncSwitchTimeTemplate |
|
switchTime |
|
mainOverrides |
|
overrides |
|
Response
None
Context
Authorization |
User |
Errors
HTTP code | Xelion code | Description |
---|---|---|
404 |
10054 |
User has no phone line. |
404 |
10056 |
User has no schedule. |
Example
Request
PATCH https://xelion.nl/api/v1/master/me/phone/schedule
Payload
{
"operations": [
{
"op": "replace",
"path": "/enableDayNightMode",
"value": true
},
{
"op": "replace",
"path": "/overrides/2282483/endOverrideDateTime",
"value": "2023-09-14 12:00:00"
}
]
}
add new time to schedule, first add a new time with virtual id 1 and then set the time member(s) by adding replace operations on the virtual id '1'
{
"operations": [
{
"op": "add",
"path": "/switchTime/1",
},
{
"op": "replace",
"path": "/switchTime/1/day",
"value": "tuesday"
}
]
}
remove time from schedule, <OID> is the oid of the time
{
"operations": [
{
"op": "remove",
"path": "/switchTime/1458789"
}
]
}
change time submember
{
"operations": [
{
"op": "replace",
"path": "/switchTime/1458789/day",
"value": "monday"
}
]
}