# Approve what the till may not do alone

A discount, a return or a void above someone’s limit files an approval request; a manager grants it — lending their authority to that exact act — or denies it.

POS estate · a play in 3 steps.

## The steps

1. Ask for approval of the blocked act. — [requestApproval](/reference/gated-floor-actions/requestApproval/)
2. Grant it — your authority unblocks that exact act; never self-approve. — [approveApprovalRequest](/reference/approval-request/approveApprovalRequest/)
3. Or deny it. — [denyApprovalRequest](/reference/approval-request/denyApprovalRequest/)

## The calls

Every operation this use case runs, in the order it first appears, with the request and the response its reference page shows.

### requestApproval

[requestApproval](/reference/gated-floor-actions/requestApproval/) — mutation · Ask a manager to approve something above your limit — a discount, a return, a void.

**Example request**

```graphql
mutation ExampleRequestApproval($input: RequestApprovalInput!) {
  requestApproval(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    action
    targetType
    targetId
    valueMinor
    requestedBy
    requiredTier
    reason
    expiresAt
    decidedBy
    decidedAt
    decisionReason
  }
}
```

Variables:

```json
{
  "input": {
    "action": "<action>",
    "targetId": "01900000-0000-7000-8000-446adfd50000",
    "valueMinor": 1,
    "reason": "Correcting a miscount."
  }
}
```

Send it with the envelope naming the version: `"extensions": {"at": {"version": {"name":"genesis","number":0}}}`.

**Example response**

```json
{
  "data": {
    "requestApproval": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "AR-EXMP-0000-000F",
      "type": "ApprovalRequest",
      "caption": "Blue jeans",
      "status": "pending",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "action": "<action>",
      "targetType": "<target type>",
      "targetId": "01900000-0000-7000-8000-446adfd50000",
      "valueMinor": 1,
      "requestedBy": "01900000-0000-7000-8000-dae980de0000",
      "requiredTier": "owner",
      "reason": "Correcting a miscount.",
      "expiresAt": "2027-01-31T00:00:00.000Z",
      "decidedBy": "01900000-0000-7000-8000-d4d316ba0000",
      "decidedAt": "2027-01-31T00:00:00.000Z",
      "decisionReason": "<decision reason>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

### approveApprovalRequest

[approveApprovalRequest](/reference/approval-request/approveApprovalRequest/) — mutation · Grant a pending approval request — your authority unblocks the requester’s act.

**Example request**

```graphql
mutation ExampleApproveApprovalRequest($id: ID!, $revision: ID!, $reason: String) {
  approveApprovalRequest(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    action
    targetType
    targetId
    valueMinor
    requestedBy
    requiredTier
    reason
    expiresAt
    decidedBy
    decidedAt
    decisionReason
  }
}
```

Variables:

```json
{
  "id": "01900000-0000-7000-8000-37386ae00000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "reason": "Correcting a miscount."
}
```

Send it with the envelope naming the version: `"extensions": {"at": {"version": {"name":"genesis","number":0}}}`.

**Example response**

```json
{
  "data": {
    "approveApprovalRequest": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "AR-EXMP-0000-000F",
      "type": "ApprovalRequest",
      "caption": "Blue jeans",
      "status": "pending",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "action": "<action>",
      "targetType": "<target type>",
      "targetId": "01900000-0000-7000-8000-446adfd50000",
      "valueMinor": 1,
      "requestedBy": "01900000-0000-7000-8000-dae980de0000",
      "requiredTier": "owner",
      "reason": "Correcting a miscount.",
      "expiresAt": "2027-01-31T00:00:00.000Z",
      "decidedBy": "01900000-0000-7000-8000-d4d316ba0000",
      "decidedAt": "2027-01-31T00:00:00.000Z",
      "decisionReason": "<decision reason>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

### denyApprovalRequest

[denyApprovalRequest](/reference/approval-request/denyApprovalRequest/) — mutation · Deny a pending approval request.

**Example request**

```graphql
mutation ExampleDenyApprovalRequest($id: ID!, $revision: ID!, $reason: String) {
  denyApprovalRequest(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    action
    targetType
    targetId
    valueMinor
    requestedBy
    requiredTier
    reason
    expiresAt
    decidedBy
    decidedAt
    decisionReason
  }
}
```

Variables:

```json
{
  "id": "01900000-0000-7000-8000-37386ae00000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "reason": "Correcting a miscount."
}
```

Send it with the envelope naming the version: `"extensions": {"at": {"version": {"name":"genesis","number":0}}}`.

**Example response**

```json
{
  "data": {
    "denyApprovalRequest": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "AR-EXMP-0000-000F",
      "type": "ApprovalRequest",
      "caption": "Blue jeans",
      "status": "pending",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "action": "<action>",
      "targetType": "<target type>",
      "targetId": "01900000-0000-7000-8000-446adfd50000",
      "valueMinor": 1,
      "requestedBy": "01900000-0000-7000-8000-dae980de0000",
      "requiredTier": "owner",
      "reason": "Correcting a miscount.",
      "expiresAt": "2027-01-31T00:00:00.000Z",
      "decidedBy": "01900000-0000-7000-8000-d4d316ba0000",
      "decidedAt": "2027-01-31T00:00:00.000Z",
      "decisionReason": "<decision reason>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```
