# POST /api/v1/bills/suggest-payment-priority

> AI payment priority suggestions

- **Tag:** bills
- **Operation ID:** `suggest_payment_priority_api_v1_bills_suggest_payment_priority_post`

## Description

Get AI-powered bill payment priority recommendations.

## Authentication

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

## Responses

### 201 — Successful Response

Schema: `SuggestPaymentPriorityResponse`

- `recommendations` (array · PaymentPriorityItem) → `PaymentPriorityItem`
  - `bill_id` (string · required) — Bill ID
  - `vendor_name` (string · required) — Vendor name
  - `amount` (integer · required) — Amount in cents
  - `due_date` (string · required) — Due date
  - `priority_score` (number · required) — Priority score 0-1
  - `reason` (string · required) — Reason for priority ranking
- `projected_balance` (integer) — Projected balance in cents

### 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 POST 'https://api.ondayzero.com/api/v1/bills/suggest-payment-priority' \
  -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/bills/suggest-payment-priority', {
  method: 'POST',
  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.post("https://api.ondayzero.com/api/v1/bills/suggest-payment-priority", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/bills/suggest-payment-priority
- OpenAPI slice: https://www.ondayzero.com/docs/reference/bills/suggest-payment-priority/openapi.json
- Other endpoints in **bills**: https://www.ondayzero.com/docs/reference/bills
