| 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 agentTo 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 |
|
Type.
|
days |
array | yes |
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 | no |
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"