Skip to main content

Scheduled checklists

Create checklist generation rule#

You can create a rule for generating checklists, set the period for the rule to work, frequency and time of execution.

Request body:

AttributeTypeDescriptionNullable
nameStringName of the rulefalse
activeBooleanWhether the rule is activefalse
needReviewBooleanWhether the generated checklist requires a reviewfalse
generationTypeStringAvailable types:
daily - daily
weekly - on certain days of the week
monthly - on specified days of the month
lastDayOfMonth - on last day of the month
quarterly - quarterly
halfYearly - half-yearly
false
dateFromLocalDateTimeDate and time from which the rule is activefalse
dateToLocalDateTimeDate and time until which the rule is activefalse
scheduledTimeTimeTime of day when the checklist is generatedfalse
shopsList of IntegersIdentifiers of storesfalse
regionsList of IntegersIdentifiers of regionsfalse
divisionsList of IntegersIdentifiers of divisionsfalse
resolverLevelStringOrganizational level of the resolverfalse
businessDirectionIdsList of IntegersIdentifiers of business directionsfalse
catalogValuesList of IntegersIdentifiers of catalog values used as an additional store filterfalse
templatesList of IntegersIdentifiers of checklist templatesfalse
dayOfMonthList of IntegersDays of the month on which to generate the checklist. Used when generationType is not weekly; alternatively use daysfalse
dayOfWeekList of IntegersDays of the week (1 โ€” Monday โ€ฆ 7 โ€” Sunday) on which to generate the checklist. Used when generationType is weekly; alternatively use daysfalse
monthsList of IntegersMonth numbers on which to generate the checklist. Used for quarterly / halfYearly generation typesfalse
daysList of IntegersShorthand for dayOfWeek / dayOfMonth: automatically routed to the right field based on generationTypefalse

Response

Returns a Generation rule object

Examples

curl --request POST https://api.qvalon.com/v1/checklist/rule \
--header 'Authorization: Bearer <your_token>' \
-d '{"name":"rule 2","active":true,"dateTo":null,"dateFrom":"2022-08-05T00:00:00.000Z","needReview":false,"scheduledTime":"13:00","shops":[665],"regions":[],"divisions":[],"businessDirectionIds":[1003],"resolverLevel":"SHOP","templates":[629],"catalogValues":[],"generationType":"weekly","dayOfWeek":[2,4]}'
200 OK
{
"id": 7,
"name": "rule 2",
"active": true,
"needReview": false,
"generationType": "weekly",
"dateFrom": "2022-08-05T00:00:00.000Z",
"dateTo": null,
"scheduledTime": "13:00",
"lastGenerationDate": null,
"shops": [
{
"id": 665,
"locality": "Shoes shop",
"sap": "002 shop",
"active": true
}
],
"regions": [],
"divisions": [],
"catalogValues": [],
"templates": [
{
"id": 629,
"name": "Shoes template",
"active": true
}
],
"businessDirectionIds": [
1003
],
"resolverLevel": "SHOP",
"dayOfMonth": [],
"dayOfWeek": [
2,
4
],
"months": [],
"days": [
2,
4
]
}