# Customer API

Customers browse the public catalog and manage their own reservations, profile, receipts, and notifications.

## Role requirements

- Routes require the `customer` role.
- The customer account must be verified.

## Public catalog (no authentication)

| Method | Path | Description |
|--------|------|-------------|
| GET | `/api/v1/units` | List available units with filters. |
| GET | `/api/v1/units/{unit}` | Show a unit. |
| POST | `/api/v1/promo-codes/preview` | Preview promo-code discount. |
| GET | `/api/v1/countries` | List countries. |
| GET | `/api/v1/countries/{country}` | Show a country. |
| GET | `/api/v1/cities` | List cities. |
| GET | `/api/v1/cities/{city}` | Show a city. |
| GET | `/api/v1/regions` | List regions. |
| GET | `/api/v1/regions/{region}` | Show a region. |
| GET | `/api/v1/currencies` | List currencies. |
| GET | `/api/v1/currencies/{currency}` | Show a currency. |

## Customer profile

| Method | Path | Description |
|--------|------|-------------|
| GET | `/api/v1/customer/profile` | Get own profile. |
| PUT | `/api/v1/customer/profile` | Update own profile. |

## Reservations

| Method | Path | Description |
|--------|------|-------------|
| GET | `/api/v1/customer/reservations` | List customer reservations. |
| POST | `/api/v1/customer/reservations` | Create a reservation. |
| GET | `/api/v1/customer/reservations/{reservation}` | Show a reservation. |
| PUT | `/api/v1/customer/reservations/{reservation}` | Update a reservation. |
| DELETE | `/api/v1/customer/reservations/{reservation}` | Cancel a reservation. |

## Receipts

| Method | Path | Description |
|--------|------|-------------|
| GET | `/api/v1/receipts` | List own receipts. |

> `POST /api/v1/receipts` is used by owners/employees to generate a receipt from an invoice.

## Notifications

| Method | Path | Description |
|--------|------|-------------|
| GET | `/api/v1/notifications` | List own notifications. |
| GET | `/api/v1/notifications/{notification}` | Show a notification. |
| POST | `/api/v1/notifications/{notification}/read` | Mark a notification as read. |
| DELETE | `/api/v1/notifications/{notification}` | Delete a notification. |

For detailed schemas, see [`auto-generated.md`](../auto-generated.md).
