Getting a list of activity graphs
| Method | get.schedules |
|---|---|
| Description | Getting a list of activity graphs |
| Available to | Partner, Client |
Request parameters
| Title | Type | Required | Description |
|---|---|---|---|
access_token |
string | yes | Authentication session key |
user_id |
number | no | Unique user identifier of the client agent on behalf of which the request is made Is required for the agentTo obtain a list of client users, you must use the method "get.customer_users" |
limit |
number | no | Number of records returned. See section "Paging" |
offset |
number | no | Shift determines from which record number to return "limit" records. Default is "0". See section "Paging" |
filter |
object | no | See section "Filtering criteria" |
fields |
array | no | See section "View of returned data" |
sort |
array | no | See section "Sorting data" |
Response parameters
| Name | Type | Valid values | Filtering | Sorting | Description |
|---|---|---|---|---|---|
id |
number | yes | Unique identifier of the activity graph | ||
name |
string | yes | yes | Name of activity graph | |
| Working schedules | |||||
schedules |
array | yes | Working schedules | ||
activity_days |
object | Days on which the chart is active | |||
type |
enum |
|
Type.
| ||
days |
array |
If "type" = "days_of_week":
"type" = "days_of_month":
"type" = "cycle":
"type" = "business_calendar":
|
Days of the week or month
Cyclic calendar example:
Example of a production calendar: |
||
| Chart active time | |||||
activity_time |
array |
Chart active time.
If the parameter is not specified, then the graph works without restrictions |
|||
time_from |
string | HH:MM | Chart activity start time | ||
time_till |
string | HH:MM |
The end time of the chart activity.
Must be more than specified in the "time_from" parameter
|
||
| Chart activity period | |||||
activity_date_from |
string | YYYY-MM-DD | Chart activity start date | ||
activity_date_till |
string | YYYY-MM-DD | Chart activity end date | ||
JSON request structure```json
{ "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 response structure```json
{
"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 returned errors
See the section "List of errors for methods with the verb get"