Scheduled tasks
Create generation rule#
You can create a rule for generating tasks, set the period for the rule to work, frequency and time of execution.
Request body:
| Attribute | Type | Description | Nullable |
|---|---|---|---|
| name | String | Rule name and task name | false |
| active | Boolean | Flag indicating this rule is active | false |
| activeFrom | ISO DateTime | Date and time from which the rule will be executed Format yyyy-MM-dd'T'HH:mm:ss.SSS'Z' | false |
| activeTo | ISO DateTime | Date and time when the rule will stop executing Format yyyy-MM-dd'T'HH:mm:ss.SSS'Z' | false |
| scheduledTime | Time | Time when rule will be start in HH:mm format | false |
| generationRule | Object | Select period executed See Generation rule object | false |
| taskType | Enum of string | Available types:COMMON,SURVEY,PHOTO_REPORT | false |
| description | String | Task description | false |
| customObservers | List objects | Set custom observers for task. See Observer object | true |
| daysToComplete | Integer | Count of days to complete task | false |
| executors | Object | See Executors object | false |
| executorCommentRequired | Boolean | Executors is obliged to leave a comment | false |
| formTemplateId | String | Survey template id Required for SURVEY task type | true |
| loadFromGalleryProhibited | Boolean | Block uploading photos from the gallery | false |
| minAttachmentsCount | Integer | Min. the number of attachments that the executor must attach | false |
| notificationPeriod | Enum of string | Frequency of reminders for executors: daily, weekly, deadline, dayBeforeDeadline | false |
| notifications | List objects | Set custom notifications for task. See Notification object | true |
| observersEnabled | Boolean | Observers enable | false |
| needApproval | Boolean | Flag indicating this task need approval | false |
| isOnlyOneRequired | Boolean | There is only one sub-task to complete in the store | false |
Response
Returns Task template object
Examples
200 OK
Find generation rules#
Find task generation rule by filters
Request parameters:
| Request Parameter | Type | Description | Required |
|---|---|---|---|
| active | Boolean | Find by active state | false |
| name | String | Find by name | false |
| periodicity | List of strings | Find by periodicity | false |
| days | List of integers | Find by periodicity days, required if periodicity filter set | false |
| months | List of integers | Find by periodicity months, required if periodicity filter set | false |
| authors | List of integers | Find by author ids | false |
| executors | List of integers | Find by executors ids | false |
| divisionIds | List of integers | Find by divisions ids | false |
| regionIds | List of integers | Find by regions ids | false |
| shopIds | List of integers | Find by stores ids | false |
| type | Set of string | Find by tasks types, default all types | false |
Response
Returns a list of Task template objects
Examples
200 OK
Delete task generation rule#
Delete generation rule
Examples
200 OK