Zum Inhalt springen

SaveTemplateForm

PUT
/api/v1/t/{tenant}/workflows/templates/{template}
curl --request PUT \
--url https://example.com/api/v1/t/example/workflows/templates/example \
--header 'Content-Type: application/json' \
--data '{ "version": 1, "form": { "template": "InvoiceApproval", "amountField": "example", "rules": [ { "amountFrom": 1, "amountTo": 1, "field": "example", "fieldValue": "example", "costCenterId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "approver": { "kind": "Member", "userId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "roleId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "table": "example" } } ], "fallbackApprover": { "kind": "Member", "userId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "roleId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "table": "example" }, "fourEyesAmount": 1, "secondApprover": { "kind": "Member", "userId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "roleId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "table": "example" }, "deadlines": { "remindAfterWorkingDays": 1, "escalateAfterWorkingDays": 1, "escalationTarget": { "kind": "Member", "userId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "roleId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "table": "example" } }, "suggestApprover": true, "checkDuplicates": true, "suggestAllocation": true, "collectiveApproval": { "enabled": true, "cap": 1 }, "name": "example", "triggerDocumentTypeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } }'
tenant
required
string

Tenant slug

template
required
string
Media typeapplication/json
object
version
required
null | integer format: uint32
form
required
Any of: discriminator: template
object
template
required
string
Allowed values: InvoiceApproval
amountField
required
string
rules
required
Array<object>
object
amountFrom
required
null | number format: double
amountTo
required
null | number format: double
field
required
null | string
fieldValue
required
null | string
costCenterId
required
null | string format: uuid
approver
required
object
kind
required
Allowed values: Member Role Requester CostCenterResponsible ApprovalLimit DeadlineOwner
userId
null | string format: uuid
roleId
null | string format: uuid
table
null | string
fallbackApprover
required
object
kind
required
Allowed values: Member Role Requester CostCenterResponsible ApprovalLimit DeadlineOwner
userId
null | string format: uuid
roleId
null | string format: uuid
table
null | string
fourEyesAmount
required
null | number format: double
secondApprover
required
One of:
null
deadlines
required
object
remindAfterWorkingDays
required
null | integer format: int32
escalateAfterWorkingDays
required
null | integer format: int32
escalationTarget
required
One of:
null
suggestApprover
required
boolean
checkDuplicates
required
boolean
suggestAllocation
required
boolean
collectiveApproval
required
object
enabled
required
boolean
cap
required
null | number format: double
name
required
string
triggerDocumentTypeId
required
null | string format: uuid

OK

Media typeapplication/json
object
definitionId
required
string format: uuid
versionNumber
required
integer format: int32
Examplegenerated
{
"definitionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"versionNumber": 1
}

Bad Request

Media typeapplication/problem+json
object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
errors
object
key
additional properties
Array<string>
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"errors": {
"additionalProperty": [
"example"
]
}
}

Forbidden

Media typeapplication/problem+json
object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Not Found

Conflict

Media typeapplication/problem+json
object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Payload Too Large

Media typeapplication/problem+json
object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Unsupported Media Type

Media typeapplication/problem+json
object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Too Many Requests

Media typeapplication/problem+json
object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}