# GET /api/v1/ap-approval/pending

> List pending AP approvals

- **Tag:** ap-approval
- **Operation ID:** `list_pending_approvals_api_v1_ap_approval_pending_get`

## Description

List bills currently suspended at an AP approval gate.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `tier` (query, string, optional) — Filter to a specific tier: 'ops', 'advisor', or 'owner'.
- `mine` (query, boolean, optional) — When true, only show approvals whose gate tier the caller is configured as an approver for.

## Responses

### 200 — Successful Response

Schema: `PendingApprovalsResponse`

- `items` (array · PendingApprovalItem) → `PendingApprovalItem` — Suspended approval rows, newest first (max 200).
  - `execution_id` (string · required) — Workflow execution UUID.
  - `workflow_id` (string · required) — AP approval workflow UUID.
  - `node_id` (string) — Approval gate node id the run is waiting on.
  - `tier` (string) — Tier of the suspended gate ('ops', 'advisor', 'owner').
  - `label` (string) — Human-readable label of the suspended gate.
  - `suspended_at` (string) — ISO timestamp when execution was suspended.
  - `bill` (PendingApprovalBill · required) → `PendingApprovalBill` — Bill awaiting approval.

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X GET 'https://api.ondayzero.com/api/v1/ap-approval/pending' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/ap-approval/pending', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
  },
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

response = httpx.get("https://api.ondayzero.com/api/v1/ap-approval/pending", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/ap-approval/list-pending-approvals
- OpenAPI slice: https://www.ondayzero.com/docs/reference/ap-approval/list-pending-approvals/openapi.json
- Other endpoints in **ap-approval**: https://www.ondayzero.com/docs/reference/ap-approval
