Method create.schedules
Description Creating an Activity Chart
Available to Partner, Client

Request parameters

Name Type Required Valid values Description
access_token string yes Authentication session key
user_id number no Unique user identifier of the agent client 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"
name string yes Activity graph name
Working schedules
schedules array yes Working schedules
activity_days object yes Days on which the chart is active
type enum yes
  • 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 yes 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 arrayno Chart active time.
If the parameter is not specified, then the graph works without restrictions
time_from string yes HH:MM Chart activity start time
time_till string yes HH:MM The end time of the chart activity.

Must be more than what is specified in the "time_from" parameter
Chart activity period
activity_date_from string no YYYY-MM-DD Chart activity start date
activity_date_till string no YYYY-MM-DD Chart activity end date

Response parameters

Title Type Required Description
id number yes Unique activity graph identifier

JSON request structure```json

{ "jsonrpc":"2.0", "id":"number", "method":"create.schedules", "params":{ "access_token":"string", "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"
  }
]

} }

### JSON response structure```json
{
  "jsonrpc":"2.0",
  "id":"number",
  "result":{
    "id":"number"
  }
}

List of returned errors

See the section "List of errors for methods with the create verb"