Wix Answers Help Center
Schedules API
The Schedules API enables you to configure your support team's schedules, which define its business hours, holidays, and planned downtimes. You can configure up to 100 schedules. You can configure multiple scheduled downtimes, which are times that you are closed during otherwise normal business hours. Scheduled downtimes are associated with a specific schedule.
Configure Schedules
Add Schedule
POST https://<tenant_subdomain>.wixanswers.com/api/v1/schedules
Add a schedule. You can configure up to 100 schedules.
Add a schedule. You can configure up to 100 schedules.
- Authorization: Requires agent authorization token and permission MANAGE_ACCOUNT_SETTINGS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: Schedule Object
Payload Params | Description | Type | Required |
---|---|---|---|
name | A name for this schedule (as it appears in the UI) | String, from 1 to 100 characters | ✓ |
description | A description for this schedule (as it appears in the UI) | String, up to 500 characters | |
openingHours | Opening hours, a structure as follows: * openingHours (structure, required): A map of days of the week to opening hours, pairs of values as follows: * string for the day of the week, one of: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, or SUNDAY * A structure of: * dailyActivities (list of structures, required): A list of start and end time pairs, as follows: * start (list of integers): Start time as a list of four integers: HH, mm, ss, ms. For example: [9, 0, 0, 0] * end (list of integers): End time, as above for start time * enabled (Boolean): Whether this daily activity is currently enabled * enabled (Boolean): Whether this list of daily activities is currently enabled * openTwentyFourSeven (Boolean): Whether to ignore the opening hours, because support is available all day and night | Structure | ✓ |
timeZone | Time zone for this schedule | Long time zone name string For example: America/Denver The default is UTC |
Payload Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
POST https://<account_subdomain>.wixanswers.com/api/v1/schedules { "name": "default", "decription": "Default Schedule", "openingHours": { "openingHours": { "FRIDAY": { "dailyActivities": [ { "start": [9,0,0,0], "end": [17,0,0,0], "enabled": true } ], "enabled": true }, "MONDAY": { ... }, "SUNDAY": { ... }, "TUESDAY": { ... }, "SATURDAY": { ... }, "THURSDAY": { ... }, "WEDNESDAY": { ... } }, "openTwentyFourSeven": false }, "timezone": "Asia/Jerusalem" }
Duplicate Schedule
POST https://<tenant_subdomain>.wixanswers.com/api/v1/schedules/{schedule GUID}/duplicate
Duplicate a schedule. The GUID in the endpoint path is the source schedule to be duplicated. The new schedule has the same opening hours and time zone of the source schedule.
Duplicate a schedule. The GUID in the endpoint path is the source schedule to be duplicated. The new schedule has the same opening hours and time zone of the source schedule.
- Authorization: Requires agent authorization token and permission MANAGE_ACCOUNT_SETTINGS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: Schedule Object of the new schedule
Payload Params | Description | Type | Required |
---|---|---|---|
name | A name for the new schedule If not supplied, the name is the same as the source schedule's name, with (copy) appended to it. | String, from 1 to 100 characters | |
description | A description for the new schedule If not supplied, the description is copied from the source schedule. | String, up to 500 characters |
Get All Schedules
GET https://<tenant_subdomain>.wixanswers.com/api/v1/schedules
Get a list of all schedules.
Get a list of all schedules.
- Authorization: Requires agent authorization token and permission FETCH_ACCOUNT_SETTINGS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: List of Schedule Objects
Request Example:
1
GET https://<account_subdomain>.wixanswers.com/api/v1/schedules
Get Schedule
- Authorization: Requires agent authorization token and permission FETCH_ACCOUNT_SETTINGS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: Schedule Object
Request Example:
1
GET https://<account_subdomain>.wixanswers.com/api/v1/schedules/bd948e62-a3fd-4cf0-87f3-ee6a0ae7f3fa
Update Schedule
- Authorization: Requires agent authorization token and permission MANAGE_ACCOUNT_SETTINGS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: Schedule Object
The payload is the same as the one for Add Schedule (using PUT, instead of POST).
Delete Schedule
DELETE https://<tenant_subdomain>.wixanswers.com/api/v1/schedules/{schedule GUID}
Delete a schedule.
Delete a schedule.
- Authorization: Requires agent authorization token and permission MANAGE_ACCOUNT_SETTINGS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: None
Request Example:
1
DELETE https://<account_subdomain>.wixanswers.com/api/v1/schedules/bd948e62-a3fd-4cf0-87f3-ee6a0ae7f3fa
Configure Scheduled Downtimes
Add Scheduled Downtime to a Schedule
POST https://<tenant_subdomain>.wixanswers.com/api/v1/schedules/{schedule GUID}/downtimes
Add a scheduled downtime to a schedule. You can configure up to 100 scheduled downtimes for each schedule.
Add a scheduled downtime to a schedule. You can configure up to 100 scheduled downtimes for each schedule.
- Authorization: Requires agent authorization token and permission MANAGE_ACCOUNT_SETTINGS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: Schedule Downtime Object
Payload Params | Description | Type | Required |
---|---|---|---|
name | A name for this scheduled downtime (as it appears in the UI) | String, from 1 to 100 characters | ✓ |
startDate | The start of the downtime | The time is relative to UTC. | ✓ |
endDate | The end of the downtime | The time is relative to UTC. | ✓ |
Payload Example:
1 2 3 4 5 6
POST https://<account_subdomain>.wixanswers.com/api/v1/schedules/bd948e62-a3fd-4cf0-87f3-ee6a0ae7f3fa { "name": "default", "startDate": "1622559224", "endDate": "1622999224" }
Get All Scheduled Downtimes of a Schedule
GET https://<tenant_subdomain>.wixanswers.com/api/v1/schedules/{schedule GUID}/downtimes
Get a list of all scheduled downtimes of a schedule.
Get a list of all scheduled downtimes of a schedule.
- Authorization: Requires agent authorization token and permission FETCH_ACCOUNT_SETTINGS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: List of Scheduled Downtime Objects
Request Example:
1
GET https://<account_subdomain>.wixanswers.com/api/v1/schedules/downtimes/bd948e62-a3fd-4cf0-87f3-ee6a0ae7f3fa
Get Scheduled Downtime
GET https://<tenant_subdomain>.wixanswers.com/api/v1/schedules/{schedule GUID}/downtimes/{scheduled downtime GUID}
Get a schedule.
Get a schedule.
- Authorization: Requires agent authorization token and permission FETCH_ACCOUNT_SETTINGS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: Scheduled Downtime Object
Request Example:
1
GET https://<account_subdomain>.wixanswers.com/api/v1/schedules/bd948e62-a3fd-4cf0-87f3-ee6a0ae7f3fa/downtimes/e932c0a3-6e9b-43cf-b3a9-0ae790f6ee6a
Update Scheduled Downtime
PUT https://<tenant_subdomain>.wixanswers.com/api/v1/schedules/{schedule GUID}/downtimes/{scheduled downtime GUID}
Update a scheduled downtime.
Update a scheduled downtime.
- Authorization: Requires agent authorization token and permission MANAGE_ACCOUNT_SETTINGS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: Scheduled Downtime Object
The payload is the same as the one for Add Scheduled Downtime (using PUT, instead of POST).
Delete Scheduled Downtime
DELETE https://<tenant_subdomain>.wixanswers.com/api/v1/schedules/{schedule GUID}/downtimes/{scheduled downtime GUID}
Delete a scheduled downtime.
Delete a scheduled downtime.
- Authorization: Requires agent authorization token and permission MANAGE_ACCOUNT_SETTINGS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: None
Request Example:
1
DELETE https://<account_subdomain>.wixanswers.com/api/v1/schedules/bd948e62-a3fd-4cf0-87f3-ee6a0ae7f3fa/downtimes/e932c0a3-6e9b-43cf-b3a9-0ae790f6ee6a
Check Schedule Status
Check Current Status of a List of Schedules
POST https://<tenant_subdomain>.wixanswers.com/api/v1/schedules/openState
Get whether your support team is open for business, according to the specified schedules.
Get whether your support team is open for business, according to the specified schedules.
- Authorization: None
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: A map of schedule GUIDs to a structure containing their status, see below
Payload Params | Description | Type | Required |
---|---|---|---|
ids | The list of schedule ids to check | List of GUIDs Max 100 ids. | ✓ |
Payload Example:
1 2 3 4
POST https://<account_subdomain>.wixanswers.com/api/v1/schedules/openState { "ids": ["bd948e62-a3fd-4cf0-87f3-ee6a0ae7f3fa", "e932c0a3-6e9b-43cf-b3a9-0ae790f6ee6a"] }
Response Example:
Response Params | Description | Type |
---|---|---|
isOpen | Whether the support team is currently available, according to the schedule | Boolean |
nextStatusChangeDateUTC | The next time that the current status of isOpen is scheduled to change Note that the schedule could change after you make this request. Therefore, for accurate information, you should send this request periodically. If the status will not change in the next 7 days, this field is not returned. | The time is relative to UTC. |
isDefaultFallback | When false, the schedule id was found. When true, the schedule id was not found and the above information came from the default schedule (which defaults to open 24/7). | Boolean |
1 2 3 4 5 6 7 8 9 10 11 12
{ "bd948e62-a3fd-4cf0-87f3-ee6a0ae7f3fa": { "isOpen": true, "nextStatusChangeDateUTC": 1568193387000, "isDefaultFallback": false }, "e932c0a3-6e9b-43cf-b3a9-0ae790f6ee6a": { "isOpen": true, "nextStatusChangeDateUTC": 1568180889000, "isDefaultFallback": false } }
Was this article helpful?