> For the complete documentation index, see [llms.txt](https://help.tahua.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.tahua.io/knowledge-base/integrations-help-guides/api-access/api-reference/contracts.md).

# Contracts

## GET /api/v2/contracts

Returns a list of contracts.

### Query Parameters

| Parameter | Type    | Description                                    |
| --------- | ------- | ---------------------------------------------- |
| `limit`   | integer | Results per page (default: 50, max: 50)        |
| `gt`      | integer | Return records with ID greater than this value |
| `lt`      | integer | Return records with ID less than this value    |

### Response Properties

| Property                   | Type     | Description                      |
| -------------------------- | -------- | -------------------------------- |
| `id`                       | integer  | Unique identifier                |
| `created_at`               | datetime | When the record was created      |
| `updated_at`               | datetime | When the record was last updated |
| `title`                    | string   | Contract title                   |
| `amount`                   | decimal  | Contract amount                  |
| `contract_start_date`      | date     | Contract start date              |
| `contract_end_date`        | date     | Contract end date                |
| `state`                    | string   | Current contract state           |
| `contract_type`            | string   | Type of contract                 |
| `registration_entity.id`   | integer  | Registration entity ID           |
| `registration_entity.name` | string   | Registration entity name         |

### Example Request

```bash
curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://your-org.tahua.io/api/v2/contracts"
```

### Example Response

```json
[
  {
    "id": 8,
    "created_at": "2025-04-01T09:00:00.000Z",
    "updated_at": "2025-04-15T11:30:00.000Z",
    "title": "Community Arts Programme - Contract",
    "amount": "25000.0",
    "contract_start_date": "2025-05-01",
    "contract_end_date": "2026-04-30",
    "state": "signed",
    "contract_type": "standard",
    "registration_entity": {
      "id": 12,
      "name": "Example Community Trust"
    }
  }
]
```

***

## GET /api/v2/contracts/:id

Returns a single contract. Response properties are the same as the list endpoint.

### Example Request

```bash
curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://your-org.tahua.io/api/v2/contracts/8"
```
