Skip to main content

documentControlStatus

Requires at least one of the permissions approvals:bills:approve, approvals:credit:approve, approvals:credit_notes:approve, approvals:discounts:approve, approvals:large_orders:approve, approvals:order_changes:approve, approvals:payments:verify, approvals:stock_adjustments:approve, approvals:supplier_payments:approve, inventory:stock_adjustment:create, payments:collection:create, payments:collection:update, payments:payment:allocate, payments:payment:create, payments:payment:update, purchase:grn:create, purchase:grn:update, purchase:payment:allocate, purchase:payment:create, purchase:payment:update, purchase:purchase_invoice:create, purchase:purchase_order:approve, sales:credit_note:create, sales:sales_order:confirm, sales:sales_order:deliver, sales:sales_order:ship, sales:sales_order:update, sales:shipment:create or sales:shipment:update.

A document's control status for its banner: its latest five approval requests and the enforced control block that still stands on it, if any.

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:

query DocumentControlStatus($documentId: ID!, $documentType: String!) {
documentControlStatus(documentId: $documentId, documentType: $documentType) {
lastRefusal {
at
checkpoint
controlId
decisionId
message
}
}
}

Variables:

{
"documentId": "id",
"documentType": "string"
}

Response:

{
"data": {
"documentControlStatus": {
"lastRefusal": {
"at": "2025-01-15T00:00:00Z",
"checkpoint": "string",
"controlId": "string",
"decisionId": "string",
"message": "string"
}
}
}
}
documentControlStatus(
documentId: ID!
documentType: String!
): DocumentControlStatus!

Arguments​

documentControlStatus.documentId ● ID! non-null scalar​

The document's ID.

documentControlStatus.documentType ● String! non-null scalar​

The document's type, e.g. SalesOrder or GoodsReceipt.

Type​

DocumentControlStatus object​

A document's approval requests and its standing control refusal.