# GET /api/v1/vendor-contracts

> List vendor contracts

- **Tag:** vendor-contracts
- **Operation ID:** `list_vendor_contracts_api_v1_vendor_contracts_get`

## Description

List all vendor contracts/MSAs for the business.

## Authentication

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

## Parameters

- `vendor_id` (query, string, optional) — Filter by vendor UUID
- `status` (query, string, optional) — Filter by status: draft, active, expired, terminated
- `cursor` (query, string, optional) — Cursor for pagination
- `limit` (query, integer, optional) — Pagination limit
- `direction` (query, string, optional) — Pagination direction: 'next' or 'prev'
- `include_total_count` (query, boolean, optional) — Whether to include total count (expensive - avoid if possible)
- `sort_by` (query, string, optional) — Column name to sort by (e.g. 'created_at', 'amount', 'name'). When changing sort, reset cursor to None.
- `descending` (query, boolean, optional) — Sort direction: true for descending (newest/largest first), false for ascending

## Responses

### 200 — Successful Response

Schema: `VendorContractListResponse`

- `items` (array · VendorContractResponse · required) → `VendorContractResponse` — List of items
  - `name` (string · required) — Contract/agreement name.
  - `vendor_id` (string · required) — Vendor UUID.
  - `status` (string) — Contract status: draft, active, expired, terminated.
  - `effective_date` (string · date) — Contract start date.
  - `expiration_date` (string · date) — Contract end date.
  - `contracted_amount_cents` (integer) — Agreed amount per billing period in cents.
  - `billing_frequency` (string) — Billing frequency: monthly, quarterly, annually, one_time, weekly, biweekly.
  - `terms_summary` (string) — Summary of key contract terms (AI-extracted or manual).
  - `s3_key` (string) — S3 key for the original MSA/contract PDF.
  - `id` (string · required) — Contract UUID.
  - `business_id` (string · required) — Business UUID.
  - `vendor_name` (string) — Vendor name (resolved).
  - `created_at` (string)
  - `updated_at` (string)
- `total` (integer) — Total number of items (null when not calculated for performance)
- `limit` (integer) — Pagination limit
- `next_cursor` (string) — Cursor for next page
- `prev_cursor` (string) — Cursor for previous page
- `has_next` (boolean · required) — Whether there are more items
- `has_prev` (boolean · required) — Whether there are previous items

### 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/vendor-contracts' \
  -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/vendor-contracts', {
  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/vendor-contracts", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/vendor-contracts/list-vendor-contracts
- OpenAPI slice: https://www.ondayzero.com/docs/reference/vendor-contracts/list-vendor-contracts/openapi.json
- Other endpoints in **vendor-contracts**: https://www.ondayzero.com/docs/reference/vendor-contracts
