# Bordereaux

> API reference · Wathiqaty Insurer API v1 (draft)

CSV files for reconciliation, or for companies that integrate by file first. UTF-8 with a BOM so Excel keeps Arabic names intact. A nightly SFTP drop of the same files is available on request.

Base URL: `https://sandbox-api.wathiqaty.com/api/v1` (sandbox), `https://api.wathiqaty.com/api/v1` (production).

- Premium bordereau: `GET /partner/bordereaux/premium`
- Claims bordereau: `GET /partner/bordereaux/claims`

## Premium bordereau

`GET /partner/bordereaux/premium`

- Auth: Bearer token, scope `finance:read`

One row per policy issued or cancelled in the range. Columns: `policy_id, policy_number, external_reference, package_external_reference, insurance_type, event, event_at, coverage_starts_at, coverage_ends_at, holder_name, holder_national_id, sum_insured, gross_premium, taxes, net_premium, commission, insurer_net, refund_amount, commission_reversed`. Ranges over 93 days answer `202` with an export id; the file follows in `bordereau.ready`.

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `from` | date | yes | First Cairo date, inclusive. |
| `to` | date | yes | Last Cairo date, inclusive. |

### Request examples

```bash
curl -X GET "https://sandbox-api.wathiqaty.com/api/v1/partner/bordereaux/premium?from=<from>&to=<to>" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

```js
const res = await fetch("https://sandbox-api.wathiqaty.com/api/v1/partner/bordereaux/premium?from=<from>&to=<to>", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${accessToken}`,
  },
})
const { data, error } = await res.json()
if (!res.ok) throw new Error(`${res.status} ${error.code}`)
```

```python
import requests

res = requests.get(
    "https://sandbox-api.wathiqaty.com/api/v1/partner/bordereaux/premium?from=<from>&to=<to>",
    headers={
        "Authorization": f"Bearer {access_token}",
    },
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(f"{res.status_code} {payload['error']['code']}")
data = payload["data"]
```

```csharp
using var req = new HttpRequestMessage(HttpMethod.Get,
    "https://sandbox-api.wathiqaty.com/api/v1/partner/bordereaux/premium?from=<from>&to=<to>");
req.Headers.TryAddWithoutValidation("Authorization", $"Bearer {accessToken}");
using var res = await http.SendAsync(req);
var json = await res.Content.ReadAsStringAsync();
res.EnsureSuccessStatusCode();
```

### Response 200

The CSV file.

```csv
policy_id,policy_number,external_reference,event,event_at,gross_premium,net_premium,commission,insurer_net
6f1c2d3e-…,POL-00000042,MI/2026/MED/004213,issued,2026-11-05T09:15:00Z,9500.00,8333.33,833.33,7500.00
```

### Errors

| Status | Code | When |
| --- | --- | --- |
| 422 | `validation_error` | `to` before `from`, or a bad date. |

Plus the generic errors any route can return: [Errors](/guides/errors.md).

## Claims bordereau

`GET /partner/bordereaux/claims`

- Auth: Bearer token, scope `finance:read`

One row per claim that changed status in the range: `claim_id, claim_number, external_reference, policy_number, status, status_at, claimed_amount, approved_amount, payable_amount, settlement_reference`.

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `from` | date | yes | First Cairo date, inclusive. |
| `to` | date | yes | Last Cairo date, inclusive. |

### Request examples

```bash
curl -X GET "https://sandbox-api.wathiqaty.com/api/v1/partner/bordereaux/claims?from=<from>&to=<to>" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

```js
const res = await fetch("https://sandbox-api.wathiqaty.com/api/v1/partner/bordereaux/claims?from=<from>&to=<to>", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${accessToken}`,
  },
})
const { data, error } = await res.json()
if (!res.ok) throw new Error(`${res.status} ${error.code}`)
```

```python
import requests

res = requests.get(
    "https://sandbox-api.wathiqaty.com/api/v1/partner/bordereaux/claims?from=<from>&to=<to>",
    headers={
        "Authorization": f"Bearer {access_token}",
    },
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(f"{res.status_code} {payload['error']['code']}")
data = payload["data"]
```

```csharp
using var req = new HttpRequestMessage(HttpMethod.Get,
    "https://sandbox-api.wathiqaty.com/api/v1/partner/bordereaux/claims?from=<from>&to=<to>");
req.Headers.TryAddWithoutValidation("Authorization", $"Bearer {accessToken}");
using var res = await http.SendAsync(req);
var json = await res.Content.ReadAsStringAsync();
res.EnsureSuccessStatusCode();
```

### Response 200

The CSV file.

```csv
claim_id,claim_number,policy_number,status,status_at,claimed_amount,approved_amount
c9e8d7f6-…,CLM-00000107,POL-00000042,approved,2026-12-04T13:00:00Z,4200.00,3700.00
```

### Errors

| Status | Code | When |
| --- | --- | --- |
| 422 | `validation_error` | `to` before `from`, or a bad date. |

Plus the generic errors any route can return: [Errors](/guides/errors.md).
