> ## Documentation Index
> Fetch the complete documentation index at: https://docs.koulis.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Reservations API — List, Create, Confirm, and Assign

> List, create, update status, and assign reservations to tables via /api/v1/restaurant/me/reservations. All endpoints require JWT authentication.

The reservations endpoints give you full operator-side control over your bookings: list and filter reservations, create them directly without the widget flow, confirm or cancel them, and assign them to specific tables. All requests require a valid JWT Bearer token.

***

## List reservations

Returns a paginated list of reservations, with optional filters by date and status.

### Endpoint

```
GET https://api.lakreme.fr/api/v1/restaurant/me/reservations
```

### Query parameters

<ParamField query="date" type="string" placeholder="YYYY-MM-DD">
  Filter reservations by a specific date. For example, `2025-05-15` returns only reservations on that day.
</ParamField>

<ParamField query="status" type="string">
  Filter by reservation status. Accepted values: `pending`, `confirmed`, `cancelled`.
</ParamField>

<ParamField query="page" type="number" default="1">
  Page number for pagination. Results are returned in fixed-size pages.
</ParamField>

### Response fields

<ResponseField name="items" type="object[]" required>
  Array of reservation objects matching the filters.

  <Expandable title="reservation properties">
    <ResponseField name="id" type="string" required>
      Unique identifier for the reservation.
    </ResponseField>

    <ResponseField name="confirmation_code" type="string" required>
      Short alphanumeric code the guest received (for example, `ABC-1234`).
    </ResponseField>

    <ResponseField name="guest_first_name" type="string" required>
      Guest's first name.
    </ResponseField>

    <ResponseField name="guest_last_name" type="string" required>
      Guest's last name.
    </ResponseField>

    <ResponseField name="guest_email" type="string" required>
      Guest's email address.
    </ResponseField>

    <ResponseField name="guest_phone" type="string" required>
      Guest's phone number.
    </ResponseField>

    <ResponseField name="party_size" type="number" required>
      Number of guests in the party.
    </ResponseField>

    <ResponseField name="reservation_date" type="string" required>
      The reservation date in `YYYY-MM-DD` format.
    </ResponseField>

    <ResponseField name="reservation_time" type="string" required>
      The reservation time in `HH:MM:SS` format.
    </ResponseField>

    <ResponseField name="status" type="string" required>
      Current status of the reservation. One of `pending`, `confirmed`, or `cancelled`.
    </ResponseField>

    <ResponseField name="notes" type="string">
      Optional notes added by the guest or operator.
    </ResponseField>

    <ResponseField name="occasion" type="string">
      Optional occasion noted at booking (for example, `"Birthday"`).
    </ResponseField>

    <ResponseField name="created_at" type="string" required>
      ISO 8601 timestamp of when the reservation was created.
    </ResponseField>

    <ResponseField name="table_id" type="string">
      ID of the assigned table, if one has been assigned.
    </ResponseField>

    <ResponseField name="table_merge_id" type="string">
      ID of the assigned merged table group, if applicable.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="total" type="number" required>
  Total number of reservations matching the filters, across all pages.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.lakreme.fr/api/v1/restaurant/me/reservations?date=2025-05-15&status=confirmed&page=1" \
    -H "Authorization: Bearer YOUR_JWT_TOKEN"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "items": [
      {
        "id": "res_a1b2c3d4",
        "confirmation_code": "ABC-1234",
        "guest_first_name": "Marie",
        "guest_last_name": "Dupont",
        "guest_email": "marie.dupont@example.com",
        "guest_phone": "+33 6 98 76 54 32",
        "party_size": 2,
        "reservation_date": "2025-05-15",
        "reservation_time": "12:30:00",
        "status": "confirmed",
        "notes": null,
        "occasion": null,
        "created_at": "2025-05-10T09:14:22Z",
        "table_id": "tbl_001",
        "table_merge_id": null
      }
    ],
    "total": 1
  }
  ```
</ResponseExample>

***

## Create a reservation (operator)

Creates a reservation directly as an operator, bypassing the widget lock-and-confirm flow. Use this to manually enter walk-ins or phone bookings into the system.

### Endpoint

```
POST https://api.lakreme.fr/api/v1/restaurant/me/reservations
```

### Request body

<ParamField body="reservation_date" type="string" required placeholder="YYYY-MM-DD">
  The reservation date in `YYYY-MM-DD` format.
</ParamField>

<ParamField body="reservation_time" type="string" required placeholder="HH:MM">
  The reservation time in `HH:MM` format.
</ParamField>

<ParamField body="guests" type="number" required>
  Number of guests in the party.
</ParamField>

<ParamField body="guest_first_name" type="string" required>
  Guest's first name.
</ParamField>

<ParamField body="guest_last_name" type="string" required>
  Guest's last name.
</ParamField>

<ParamField body="guest_email" type="string">
  Guest's email address. Optional for operator-created reservations.
</ParamField>

<ParamField body="guest_phone" type="string">
  Guest's phone number. Optional for operator-created reservations.
</ParamField>

<ParamField body="notes" type="string">
  Internal notes about the reservation.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.lakreme.fr/api/v1/restaurant/me/reservations \
    -H "Authorization: Bearer YOUR_JWT_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "reservation_date": "2025-05-15",
      "reservation_time": "19:30",
      "guests": 4,
      "guest_first_name": "Jean",
      "guest_last_name": "Martin",
      "guest_phone": "+33 6 11 22 33 44",
      "notes": "Window seat requested"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "id": "res_z9y8x7w6",
    "status": "confirmed",
    "message": "Reservation created successfully."
  }
  ```
</ResponseExample>

***

## Update reservation status

Confirms or cancels a reservation. Use this to approve pending reservations when your restaurant is in manual confirmation mode, or to cancel any existing reservation.

### Endpoint

```
PATCH https://api.lakreme.fr/api/v1/restaurant/me/reservations/{id}
```

<ParamField path="id" type="string" required>
  The ID of the reservation to update.
</ParamField>

### Request body

<ParamField body="status" type="string" required>
  The new status. Accepted values: `"confirmed"` or `"cancelled"`.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH https://api.lakreme.fr/api/v1/restaurant/me/reservations/res_z9y8x7w6 \
    -H "Authorization: Bearer YOUR_JWT_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"status": "confirmed"}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "res_z9y8x7w6",
    "status": "confirmed",
    "message": "Reservation confirmed."
  }
  ```
</ResponseExample>

***

## Assign a reservation to a table

Assigns a reservation to a specific table or merged table group. Set `table_id` and `table_merge_id` to `null` to remove the current assignment.

### Endpoint

```
PATCH https://api.lakreme.fr/api/v1/restaurant/me/reservations/{id}/assign
```

<ParamField path="id" type="string" required>
  The ID of the reservation to assign.
</ParamField>

### Request body

<ParamField body="table_id" type="string">
  The ID of the table to assign. Pass `null` to unassign from a regular table.
</ParamField>

<ParamField body="table_merge_id" type="string">
  The ID of the merged table group to assign. Pass `null` to unassign from a merge. Set both `table_id` and `table_merge_id` to `null` to fully unassign the reservation.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH https://api.lakreme.fr/api/v1/restaurant/me/reservations/res_z9y8x7w6/assign \
    -H "Authorization: Bearer YOUR_JWT_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"table_id": "tbl_002", "table_merge_id": null}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "res_z9y8x7w6",
    "confirmation_code": "XYZ-5678",
    "guest_first_name": "Jean",
    "guest_last_name": "Martin",
    "guest_email": null,
    "guest_phone": "+33 6 11 22 33 44",
    "party_size": 4,
    "reservation_date": "2025-05-15",
    "reservation_time": "19:30:00",
    "status": "confirmed",
    "notes": "Window seat requested",
    "occasion": null,
    "created_at": "2025-05-12T11:00:00Z",
    "table_id": "tbl_002",
    "table_merge_id": null
  }
  ```
</ResponseExample>
