Skip to main content

createControlApprovalDelegation

Requires at least one of the permissions approvals:bills:approve, approvals:credit:approve, approvals:credit_notes:approve, approvals:delegation:manage, approvals:discounts:approve, approvals:large_orders:approve, approvals:order_changes:approve, approvals:payments:verify, approvals:stock_adjustments:approve, approvals:supplier_payments:approve or purchase:purchase_order:approve.

Sets a cover: for the window given, the cover may decide approval requests needing the listed permissions on behalf of the person covered, never beyond what that person still holds, and never a request either of them raised. Covering for someone other than yourself needs approvals:delegation:manage.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation CreateControlApprovalDelegation($input: CreateControlApprovalDelegationInput!) {
createControlApprovalDelegation(input: $input) {
id
createdAt
endsAt
enteredBy
fromUserId
isActive
}
}

Variables:

{
"input": {
"endsAt": "2025-01-15T00:00:00Z",
"permissions": [
"string"
],
"startsAt": "2025-01-15T00:00:00Z",
"toUserId": "string"
}
}

Response:

{
"data": {
"createControlApprovalDelegation": {
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"endsAt": "2025-01-15T00:00:00Z",
"enteredBy": "string",
"fromUserId": "string",
"isActive": true
}
}
}
createControlApprovalDelegation(
input: CreateControlApprovalDelegationInput!
): ControlApprovalDelegation!

Arguments​

createControlApprovalDelegation.input ● CreateControlApprovalDelegationInput! non-null input​

The cover to set.

Type​

ControlApprovalDelegation object​

A cover: for a date range, one person may decide approval requests needing the listed permissions on behalf of another, never beyond what that person still holds.