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 agent
To 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
  • days_of_week
  • days_of_month
  • business_calendar
  • cycle
Type.
  • days_of_week - Calendar by days of the week
  • days_of_month - Calendar by days of the month
  • business_calendar - Production calendar
  • cycle - Cyclic calendar
days array If "type" = "days_of_week":
  • 1 - Monday;
  • 2 - Tuesday;
  • 3 - environment;
  • 4 - Thursday;
  • 5 - Friday;
  • 6 - Saturday
  • 0 - Sunday;
  • 8 - day off;
  • 7 - worker;
If "type" = "days_of_month":
  • numbers from 1 to 31
If "type" = "cycle":
  • Number of working days in a cycle;
  • Number of non-working days in a cycle;
If "type" = "business_calendar":
  • 8 - day off;
  • 7 - worker;
Days of the week or month

Cyclic calendar example:
[2,2] - the cycle will have two working days and then two non-working days. As a result, the graph turns out to be two by two.

Example of a production calendar:
[7] - The calendar will be active on weekdays according to the production calendar;
[8] - The calendar will be active on weekends according to the 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"