Developers API
getDoNotDisturbPeriods
Fetches a list of all Do Not Disturb periods scheduled for the specified contact/channel.
Tip: Find your contactChannelId with the getContactList API command.
Request Parameters
| Parameter | Data Type | Description | Required | Default |
|---|---|---|---|---|
| contactchannelid | integer | The ID of the contact/channel whose Do Not Disturb periods you wish to query | Required | - |
Response Data
| Response Variable | Data Type | Description |
|---|---|---|
| errorcode | integer | Returns an errorcode of 0 if call is successful. |
| periods | This is an array - its' contents follow: | |
| periodid | integer | The unique ID of the period |
| start | string | The starting time of the period (HH:mm, 24-hour clock, e.g. '15:30') |
| end | string | The ending time of the period (HH:mm, 24-hour clock) |
| timezone | string | The POSIX standard timezone of the starting and finishing times; e.g. 'GMT' or 'Europe/London' |
| recurrence | string | ONCEONLY, DAILY, WEEKLY, MONTHLY depending on the desired recurrence of the period |
| on | string | A date in YYYY-MM-DD format for ONCEONLY periods. The day of the week (e.g. 'Sunday') for WEEKLY periods. The day of the month (1-31 or 'LASTDAY') for MONTHLY periods. NULL for DAILY periods. |