Skip to main content

View / Create / Edit / Delete

Get tasks#

Return Task objects

Request parameters:

Request ParameterTypeDescriptionRequired
pageIntegerNumber of pagetrue
sizeIntegerCount of elements in page, recommended 1000 elements per pagetrue
nameStringSearch by task namefalse
taskIdsList of integersSearch by task idsfalse
divisionIdsList of integersSearch by division idsfalse
regionIdsList of integersSearch by region idsfalse
statusStringSearch by status: OPEN, IN_PROGRESS, CLOSED false
createdAfterTimestamp in millisecondsSearch for tasks where the creation date is afterfalse
createdBeforeTimestamp in millisecondsSearch for tasks where the creation date is beforefalse
closedBeforeTimestamp in millisecondsSearch for tasks where the closed date is afterfalse
closedBeforeTimestamp in millisecondsSearch for tasks where the closed date is beforefalse
deadlineAfterTimestamp in millisecondsSearch for tasks where the deadline date is afterfalse
modifiedBeforeTimestamp in millisecondsSearch for tasks where the deadline date is beforefalse
taskTypesStringSearch for tasks by task type:
COMMON, ROUTED, PHOTO_REPORT, SURVEY
false
checklistIdIntegerSearch for tasks by checklistId, only for ROUTED task typefalse
approvalStatusSet of stringSearch for tasks by approval status:
APPROVED, NOT_APPROVED, APPROVABLE, NOT_APPROVABLE
false

Examples

curl https://api.qvalon.com/v1/tasks \
--header 'Authorization: Bearer <your_token>'
200 OK
[
{
"attachmentsRequired": false,
"id": 162,
"version": 2,
"name": "test task",
"description": "test description",
"status": "OPEN",
"grouped": false,
"periodic": false,
"response": false,
"authorId": 1,
"authorName": "John Vu",
"executorName": "Madison",
"executors": [
{
"id": 1609,
"name": "Madison"
}
],
"observerName": "Does John",
"observers": [
{
"id": 1615,
"name": "Does John"
}
],
"createDate": 1623749422616,
"totalCount": 1,
"closedCount": 0,
"taskType": "COMMON",
"userRole": "AUTHOR",
"deadlineDate": 1623877199965,
"responseList": [
{
"id": 449,
"taskId": 162,
"version": 0,
"status": "OPEN",
"executorId": 1609,
"executorName": "Madison",
"region": "Test region",
"regionId": 86,
"division": "Test division",
"divisionId": 28,
"overdue": false,
"attachmentsCount": 0,
"executorsCommentRequired": true,
"minAttachmentsCount": 1,
"executorRole": "SHOP",
"notificationPeriod": "daily",
"shopId": 668,
"shopName": "Store 01",
"labels": {},
"needApproval": true,
"approved": false,
"customObservers": [
{
"observerId": 1615,
"observerName": "Does John"
}
],
"deleted": false
}
],
"isLoadPhotoFromGalleryProhibited": true,
"labels": {},
"notifications": [
{
"type": "UPDATE",
"role": "AUTHOR",
"push": true,
"email": true
},
{
"type": "UPDATE",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "UPDATE",
"role": "EXECUTOR",
"push": true,
"email": true
},
{
"type": "RETURN",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "RETURN",
"role": "EXECUTOR",
"push": true,
"email": true
},
{
"type": "OVERDUE",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "OVERDUE",
"role": "EXECUTOR",
"push": true,
"email": true
},
{
"type": "OVERDUE",
"role": "AUTHOR",
"push": true,
"email": true
},
{
"type": "CLOSE",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "CLOSE",
"role": "AUTHOR",
"push": true,
"email": true
},
{
"type": "CREATE",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "CREATE",
"role": "EXECUTOR",
"push": true,
"email": true
}
],
"claimCount": 0,
"claimDoneCount": 0,
"needApproval": true,
"approvalCount": 0,
"routedToExecutor": false,
"isOnlyOneRequired": true
}
]

Get task by id#

Return Task object

Examples

curl https://api.qvalon.com/v1/tasks/37 \
--header 'Authorization: Bearer <your_token>'
200 OK
{
"attachmentsRequired": false,
"id": 162,
"version": 2,
"name": "test task",
"description": "test description",
"status": "OPEN",
"grouped": false,
"periodic": false,
"response": false,
"authorId": 1,
"authorName": "John Vu",
"executorName": "Madison",
"executors": [
{
"id": 1609,
"name": "Madison"
}
],
"observerName": "Does John",
"observers": [
{
"id": 1615,
"name": "Does John"
}
],
"createDate": 1623749422616,
"totalCount": 1,
"closedCount": 0,
"taskType": "COMMON",
"userRole": "AUTHOR",
"deadlineDate": 1623877199965,
"responseList": [
{
"id": 449,
"taskId": 162,
"version": 0,
"status": "OPEN",
"executorId": 1609,
"executorName": "Madison",
"region": "Test region",
"regionId": 86,
"division": "Test division",
"divisionId": 28,
"overdue": false,
"attachmentsCount": 0,
"executorsCommentRequired": true,
"minAttachmentsCount": 1,
"executorRole": "SHOP",
"notificationPeriod": "daily",
"shopId": 668,
"shopName": "Store 01",
"labels": {},
"needApproval": true,
"approved": false,
"customObservers": [
{
"observerId": 1615,
"observerName": "Does John"
}
],
"deleted": false
}
],
"isLoadPhotoFromGalleryProhibited": true,
"labels": {},
"notifications": [
{
"type": "UPDATE",
"role": "AUTHOR",
"push": true,
"email": true
},
{
"type": "UPDATE",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "UPDATE",
"role": "EXECUTOR",
"push": true,
"email": true
},
{
"type": "RETURN",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "RETURN",
"role": "EXECUTOR",
"push": true,
"email": true
},
{
"type": "OVERDUE",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "OVERDUE",
"role": "EXECUTOR",
"push": true,
"email": true
},
{
"type": "OVERDUE",
"role": "AUTHOR",
"push": true,
"email": true
},
{
"type": "CLOSE",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "CLOSE",
"role": "AUTHOR",
"push": true,
"email": true
},
{
"type": "CREATE",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "CREATE",
"role": "EXECUTOR",
"push": true,
"email": true
}
],
"claimCount": 0,
"claimDoneCount": 0,
"needApproval": true,
"approvalCount": 0,
"routedToExecutor": false,
"isOnlyOneRequired": true
}

Create task#

Creates new task.

Request body:

AttributeTypeDescriptionNullable
nameStringTask namefalse
taskTypeEnum of stringAvailable types:COMMON,SURVEY,PHOTO_REPORTfalse
descriptionStringTask descriptionfalse
deadlineDateTimestamp in millisecondsTask deadline datefalse
executorsObjectExecutor user object with field id and namefalse
executorsCommentRequiredBooleanExecutors is obliged to leave a commentfalse
needApprovalBooleanFlag indicating this task need approvalfalse
isOnlyOneRequiredBooleanThere is only one sub-task to complete in the storefalse
isLoadPhotoFromGalleryProhibitedBooleanBlock uploading photos from the galleryfalse
notificationPeriodEnum of stringFrequency of reminders for executors:
daily, weekly, deadline, dayBeforeDeadline
false
minAttachmentsCountIntegerMin. the number of attachments that the executor must attachfalse
notificationsList objectsSet custom notifications for task.
See Notification object
true
customObserversList objectsSet custom observers for task.
See Observer object
true
observersEnabledBooleanObservers enablefalse
formTemplateIdStringSurvey template id
Required for SURVEY task type
true

Response

Returns Task object

Examples

curl --request POST https://api.qvalon.com/v1/tasks/create \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
-d '{"name":"test task","taskType":"COMMON","description":"test description","deadlineDate":1623790800965,"executors":{"executorRole":"SHOP","objectsToUsers":{"668":[1609]}},"executorsCommentRequired":true,"needApproval":true,"isOnlyOneRequired":true,"isLoadPhotoFromGalleryProhibited":true,"notificationPeriod":"daily","minAttachmentsCount":1,"notifications":[],"customObservers":[{"observerId":1615,"observerName":"Does John"}],"observersEnabled":true,"formTemplateId":""}'
200 OK
{
"attachmentsRequired": false,
"id": 162,
"version": 2,
"name": "test task",
"description": "test description",
"status": "OPEN",
"grouped": false,
"periodic": false,
"response": false,
"authorId": 1,
"authorName": "John Vu",
"executorName": "Madison",
"executors": [
{
"id": 1609,
"name": "Madison"
}
],
"observerName": "Does John",
"observers": [
{
"id": 1,
"name": "John Vu"
},
{
"id": 1615,
"name": "Does John"
}
],
"createDate": 1623749422616,
"totalCount": 1,
"closedCount": 0,
"taskType": "COMMON",
"userRole": "AUTHOR",
"deadlineDate": 1623877199965,
"responseList": [
{
"id": 449,
"taskId": 162,
"version": 0,
"status": "OPEN",
"executorId": 1609,
"executorName": "Madison",
"region": "Test region",
"regionId": 86,
"division": "Test division",
"divisionId": 28,
"overdue": false,
"attachmentsCount": 0,
"executorsCommentRequired": true,
"minAttachmentsCount": 1,
"executorRole": "SHOP",
"notificationPeriod": "daily",
"shopId": 668,
"shopName": "Store 01",
"labels": {},
"needApproval": true,
"approved": false,
"customObservers": [
{
"observerId": 1,
"observerName": "John Vu"
},
{
"observerId": 1615,
"observerName": "Does John"
}
],
"deleted": false
}
],
"isLoadPhotoFromGalleryProhibited": true,
"labels": {},
"notifications": [
{
"type": "CREATE",
"role": "EXECUTOR",
"push": true,
"email": true
},
{
"type": "CREATE",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "CLOSE",
"role": "AUTHOR",
"push": true,
"email": true
},
{
"type": "CLOSE",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "OVERDUE",
"role": "AUTHOR",
"push": true,
"email": true
},
{
"type": "OVERDUE",
"role": "EXECUTOR",
"push": true,
"email": true
},
{
"type": "OVERDUE",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "RETURN",
"role": "EXECUTOR",
"push": true,
"email": true
},
{
"type": "RETURN",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "UPDATE",
"role": "EXECUTOR",
"push": true,
"email": true
},
{
"type": "UPDATE",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "UPDATE",
"role": "AUTHOR",
"push": true,
"email": true
}
],
"claimCount": 0,
"claimDoneCount": 0,
"needApproval": true,
"approvalCount": 0,
"routedToExecutor": false,
"isOnlyOneRequired": true
}

Edit task#

Edit existing task.

Request body:

AttributeTypeDescriptionNullable
idIntTask idfalse
versionIntTask versionfalse
nameStringTask namefalse
descriptionStringTask descriptionfalse
periodicBooleanTask periodicfalse
executorsObject List executors Executors object false
taskTypeEnum of stringAvailable types:COMMON,SURVEY,PHOTO_REPORTfalse
deadlineDateTimestamp in millisecondsTask deadline datefalse
deadlineTimeEnabledBooleanTask deadline enabledfalse
isLoadPhotoFromGalleryProhibitedBooleanBlock uploading photos from the galleryfalse
notificationsList objectsSet custom notifications for task.
See Notification object
true
needApprovalBooleanFlag indicating this task need approvalfalse
isOnlyOneRequiredBooleanThere is only one sub-task to complete in the storefalse
signatureRequiredBooleanSignature requiredfalse
customObserversList objectsSet custom observers for task.
See Observer object
true
executorsCommentRequiredBooleanExecutors comment is requiredfalse
notificationPeriodEnum of stringFrequency of reminders for executors:
daily, weekly, deadline, dayBeforeDeadline
false
minAttachmentsCountIntegerMin. the number of attachments that the executor must attachfalse

Response

Returns Task object

Examples

curl --request PUT https://api.qvalon.com/v1/tasks-manual \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
-d '{"id":162,"version":1,"name":"test task","description":"test description","periodic":false,"executors":{"executorRole":"SHOP","objectsToUsers":{"664":[1600],"665":[1600],"668":[1600],"669":[1600],"670":[1601],"671":[1600]}},"taskType":"COMMON","deadlineDate":1623877199965,"deadlineTimeEnabled":true,"isLoadPhotoFromGalleryProhibited":false,"notifications":[{"type":"UPDATE","role":"AUTHOR","push":true,"email":true},{"type":"UPDATE","role":"OBSERVER","push":true,"email":true},{"type":"UPDATE","role":"EXECUTOR","push":true,"email":true},{"type":"RETURN","role":"OBSERVER","push":true,"email":true},{"type":"RETURN","role":"EXECUTOR","push":true,"email":true},{"type":"OVERDUE","role":"OBSERVER","push":true,"email":true},{"type":"OVERDUE","role":"EXECUTOR","push":true,"email":true},{"type":"OVERDUE","role":"AUTHOR","push":true,"email":true},{"type":"CLOSE","role":"OBSERVER","push":true,"email":true},{"type":"CLOSE","role":"AUTHOR","push":true,"email":true},{"type":"CREATE","role":"OBSERVER","push":true,"email":true},{"type":"CREATE","role":"EXECUTOR","push":true,"email":true}],"needApproval":false,"isOnlyOneRequired":false,"signatureRequired":false,"taskCategories":[],"customObservers":[],"executorsCommentRequired":false,"notificationPeriod":"daily","minAttachmentsCount":0}'
200 OK
{
"attachmentsRequired": false,
"id": 162,
"version": 2,
"name": "test task",
"description": "test description",
"status": "OPEN",
"grouped": false,
"periodic": false,
"response": false,
"authorId": 1,
"authorName": "John Vu",
"executorName": "Madison",
"executors": [
{
"id": 1609,
"name": "Madison"
}
],
"observerName": "Does John",
"observers": [
{
"id": 1,
"name": "John Vu"
},
{
"id": 1615,
"name": "Does John"
}
],
"createDate": 1623749422616,
"totalCount": 1,
"closedCount": 0,
"taskType": "COMMON",
"userRole": "AUTHOR",
"deadlineDate": 1623877199965,
"responseList": [
{
"id": 449,
"taskId": 162,
"version": 0,
"status": "OPEN",
"executorId": 1609,
"executorName": "Madison",
"region": "Test region",
"regionId": 86,
"division": "Test division",
"divisionId": 28,
"overdue": false,
"attachmentsCount": 0,
"executorsCommentRequired": true,
"minAttachmentsCount": 1,
"executorRole": "SHOP",
"notificationPeriod": "daily",
"shopId": 668,
"shopName": "Store 01",
"labels": {},
"needApproval": true,
"approved": false,
"customObservers": [
{
"observerId": 1,
"observerName": "John Vu"
},
{
"observerId": 1615,
"observerName": "Does John"
}
],
"deleted": false
}
],
"isLoadPhotoFromGalleryProhibited": true,
"labels": {},
"notifications": [
{
"type": "CREATE",
"role": "EXECUTOR",
"push": true,
"email": true
},
{
"type": "CREATE",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "CLOSE",
"role": "AUTHOR",
"push": true,
"email": true
},
{
"type": "CLOSE",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "OVERDUE",
"role": "AUTHOR",
"push": true,
"email": true
},
{
"type": "OVERDUE",
"role": "EXECUTOR",
"push": true,
"email": true
},
{
"type": "OVERDUE",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "RETURN",
"role": "EXECUTOR",
"push": true,
"email": true
},
{
"type": "RETURN",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "UPDATE",
"role": "EXECUTOR",
"push": true,
"email": true
},
{
"type": "UPDATE",
"role": "OBSERVER",
"push": true,
"email": true
},
{
"type": "UPDATE",
"role": "AUTHOR",
"push": true,
"email": true
}
],
"claimCount": 0,
"claimDoneCount": 0,
"needApproval": true,
"approvalCount": 0,
"routedToExecutor": false,
"isOnlyOneRequired": true
}

Delete task#

Returns code status

Examples

curl --request DELETE https://api.qvalon.com/v1/tasks-manual/162 \
--header 'Authorization: Bearer <your_token>'
200 OK
{}