Skip to main content

Business direction

Create business direction#

Creates a new Business direction object.

Request body:

AttributeTypeDescriptionNullable
externalIdStringBusiness direction external idtrue
nameStringBusiness direction namefalse
createTaskBooleanWhether users of this business direction can create taskstrue
geoCheckStartStringGeolocation check when starting a task/checklist response: accept, ignoretrue
geoCheckFinishStringGeolocation check when finishing a task/checklist response: accept, ignoretrue
activeBooleanWhether the business direction is active. Default truetrue

Examples

curl --request POST https://api.qvalon.com/v1/orgstruct/business-dirs \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
-d '{"name":"Merchandising","createTask":true,"active":true}'
200 OK
{
"id": 1007,
"name": "Merchandising",
"createTask": true,
"system": false,
"geoCheckStart": "accept",
"geoCheckFinish": "accept",
"observeMyShopTask": false,
"active": true,
"rolesAndLevels": {}
}

Update business direction#

Updates an existing business direction by id. Returns the updated Business direction object.

Request body:

AttributeTypeDescriptionNullable
externalIdStringBusiness direction external idtrue
nameStringBusiness direction namefalse
createTaskBooleanWhether users of this business direction can create taskstrue
geoCheckStartStringGeolocation check when starting a task/checklist response: accept, ignoretrue
geoCheckFinishStringGeolocation check when finishing a task/checklist response: accept, ignoretrue
activeBooleanWhether the business direction is activetrue

Examples

curl --request PUT https://api.qvalon.com/v1/orgstruct/business-dirs/1007 \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
-d '{"name":"Merchandising","createTask":true,"active":true,"geoCheckStart":"ignore","geoCheckFinish":"ignore"}'
200 OK
{
"id": 1007,
"name": "Merchandising",
"createTask": true,
"system": false,
"geoCheckStart": "ignore",
"geoCheckFinish": "ignore",
"observeMyShopTask": false,
"active": true,
"rolesAndLevels": {}
}

List business directions#

Returns a list of Business direction objects.

Request parameters:

Request ParameterTypeDescriptionRequired
idsList of integersFind business directions by idsfalse
nameLikeStringFind business direction by namefalse
onlyActiveBooleanGet only active business directions. Default truefalse

Examples

curl https://api.qvalon.com/v1/orgstruct/business-dirs?ids=1001,1002 \
--header 'Authorization: Bearer <your_token>'
200 OK
[
{
"id": 1001,
"name": "Merchandising",
"createTask": true,
"system": true,
"geoCheckStart": "accept",
"geoCheckFinish": "ignore",
"observeMyShopTask": true,
"active": true,
"rolesAndLevels": {}
},
{
"id": 1002,
"name": "Undefined",
"createTask": true,
"system": true,
"geoCheckStart": "ignore",
"geoCheckFinish": "ignore",
"observeMyShopTask": false,
"active": true,
"rolesAndLevels": {}
}
]

Get business direction dependency#

Returns the Business direction dependency object: which other business directions' tasks/checklists this business direction can see and act on.

Examples

curl https://api.qvalon.com/v1/orgstruct/business-dirs/1007/dependency \
--header 'Authorization: Bearer <your_token>'
200 OK
{
"forTasks": [
1007,
1001
],
"forChecklists": [
1007
]
}

Add business direction dependency#

Adds dependent business directions, in addition to the ones already set.

Request body:

AttributeTypeDescriptionNullable
forTasksList of integersids of the business directions for which tasks can additionally be seen/assignedtrue
forChecklistsList of integersids of business directions for which inspections can additionally be plannedtrue

Examples

curl --request POST https://api.qvalon.com/v1/orgstruct/business-dirs/1007/dependency \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
-d '{"forTasks":[1002],"forChecklists":[]}'
200 OK
{}

Replace business direction dependency#

Replaces the business direction's dependent directions with the given ones โ€” anything not in the list is removed.

Request body:

AttributeTypeDescriptionNullable
forTasksList of integersids of the business directions for which tasks can be seen/assignedfalse
forChecklistsList of integersids of business directions for which inspections can be plannedfalse

Examples

curl --request PUT https://api.qvalon.com/v1/orgstruct/business-dirs/1007/dependency \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
-d '{"forTasks":[1007,1001],"forChecklists":[1007]}'
200 OK
{}

Remove business direction dependency#

Removes the given dependent business directions; anything not listed is left as is.

Request body:

AttributeTypeDescriptionNullable
forTasksList of integersids of the business directions to stop sharing tasks withtrue
forChecklistsList of integersids of business directions to stop sharing checklist planning withtrue

Examples

curl --request DELETE https://api.qvalon.com/v1/orgstruct/business-dirs/1007/dependency \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
-d '{"forTasks":[1002],"forChecklists":[]}'
200 OK
{}

Remove all business direction dependencies#

Removes all dependent business directions (for both tasks and checklists).

Examples

curl --request DELETE https://api.qvalon.com/v1/orgstruct/business-dirs/1007/dependency/clear \
--header 'Authorization: Bearer <your_token>'
200 OK
{}