Headers
-
API token (can be retrieved from account settings)
-
ID of organization, for which the operation must be performed
POST
/api-v1/workflow/batch
curl \
--request POST 'https://wyzio.app/api-v1/workflow/batch' \
--header "Content-Type: application/json" \
--data '[{"id":12345678,"moduleType":"PURCHASE_INVOICES","name":"Purchase Invoice Approval","description":"Requires manager approval above 1000 CHF","blocks":[{"id":12345678,"position":1,"blockType":"APPROVAL","actionType":"MODIFY","userGroupIds":[12345678],"users":[{"id":12345678}],"users2":[{"id":12345678}],"userGroupIds2":[12345678],"isSystemUserGroup":false,"isSystemUserGroup2":false,"contacts":[{"id":12345678}],"canModify":true,"filters":"string","generateParams":"string"}],"isActive":true}]'
Request examples
# Headers
# Payload
[
{
"id": 12345678,
"moduleType": "PURCHASE_INVOICES",
"name": "Purchase Invoice Approval",
"description": "Requires manager approval above 1000 CHF",
"blocks": [
{
"id": 12345678,
"position": 1,
"blockType": "APPROVAL",
"actionType": "MODIFY",
"userGroupIds": [
12345678
],
"users": [
{
"id": 12345678
}
],
"users2": [
{
"id": 12345678
}
],
"userGroupIds2": [
12345678
],
"isSystemUserGroup": false,
"isSystemUserGroup2": false,
"contacts": [
{
"id": 12345678
}
],
"canModify": true,
"filters": "string",
"generateParams": "string"
}
],
"isActive": true
}
]
Response examples (200)
{
"items": [
{
"errorCode": {
"errorCode": "NO_ERROR",
"errorDetailValues": [
{
"errorCode": "string",
"fieldName": "string",
"data": "string",
"isSevere": true
}
]
},
"possibleWorkflows": [
{
"id": 42,
"name": "string"
}
],
"error": true,
"severeError": true
}
]
}