Get schedules
Getting a list of activity schedules
Method | get.schedules |
---|---|
Description | Getting a list of activity schedules |
Who has access | Partner, Customer |
Parameter of a request
Title | Type | Required | Description |
---|---|---|---|
access_token |
string | yes | Authentication session key |
user_id |
number | no | Unique ID of an agent's customer user who makes request Is required for agentTo access a list of customer users, use the method "get.customer_users" |
limit |
number | no | Returning entries count. Refer to "Paging" |
offset |
number | no | Offset that defines from which number to return the entries "limit" . Default value is "0". Refer to "Paging" |
filter |
object | no | Refer to "Filters" |
fields |
array | no | Refer to "Viewing returning data" |
sort |
array | no | Refer to "Data sorting" |
Parameters of a reply
Title | Type | Valid values | Filtering | Sorting | Description |
---|---|---|---|---|---|
id |
number | yes | Activity schedule unique ID | ||
name |
string | yes | yes | Activity schedule name | |
Work schedules | |||||
schedules |
array | yes | Work schedules | ||
activity_days |
object | Days when a schedule is active | |||
type |
enum |
|
Type.
| ||
days |
array |
If "type" = "days_of_week" :
"type" = "days_of_month" :
"type" = "cycle" :
"type" = "business_calendar" :
|
Days of week or days of month
Example of a cycle calendar:
Example of a business calendar: |
||
Activity time of a schedule | |||||
activity_time |
array |
Activity time of a schedule
If the parameter is not specified, a schedule works with no limit |
|||
time_from |
string | HH:MM | Time when schedule activity started | ||
time_till |
string | HH:MM |
Time when schedule activity ended
It must be more than mentioned in the parameter "time_from"
|
||
Activity period of a schedule | |||||
activity_date_from |
string | YYYY-MM-DD | Date when schedule activity started | ||
activity_date_till |
string | YYYY-MM-DD | Date when schedule activity ended |
JSON request structure
{
"jsonrpc":"2.0",
"id":"number",
"method":"get.schedules",
"params":{
"access_token":"string",
"user_id":"number",
"offset":"number",
"limit":"number",
"filter":{
},
"sort":[
{
"field":"string",
"order":"string"
}
],
"fields":[
"string"
]
}
}
JSON reply structure
{
"jsonrpc":"2.0",
"id":"number",
"result":{
"metadata":{
},
"data":[
{
"id":"number",
"name":"string",
"schedules":[
{
"activity_days":{
"type":"enum",
"days":[
]
},
"activity_time":[
{
"time_from":"string",
"time_till":"string"
}
],
"activity_date_from":"string",
"activity_date_till":"string"
}
]
}
]
}
}
List of returning errors
Refer to the section "List of errors for the methods with the verb get"