# QRMENU API Referansi

Bu dokuman, sistemde kullanilan temel endpointleri method, parametre, cookie, hata ve cevap mantigiyla anlatir.

## 1. Session Open

Dosya: `api/session_open.php`

- Method: `POST`
- Amac: belirli masa baglaminda musteri oturumu acmak
- Beklenen JSON:
  - `zone_id`
  - `layout_id`
  - `seat_id`
  - `guest_name`
  - `phone`

## 2. Session Status

Dosya: `api/session_status.php`

- Method: `GET`
- Amac: mevcut masa oturumunun hala acik olup olmadigini kontrol etmek
- Parametre: opsiyonel `token`
- Cookie fallback: `qr_session_token`

## 3. Session Heartbeat

Dosya: `api/session_heartbeat.php`

- Method: `GET`
- Amac: acik masa oturumunun aktivitesini taze tutmak

## 4. Order Create

Dosya: `api/order_create.php`

- Method: `POST`
- Beklenen JSON:
  - `lang`
  - `items`
- `items` icindeki tipik alanlar:
  - `product_id`
  - `qty`
  - opsiyonel `note`

## 5. Order Poll

Dosya: `api/order_poll.php`

- Method: `GET`
- Parametre: `code`
- Donen tipik alanlar:
  - `order_code`
  - `status`
  - `status_label`
  - `items`
  - `locked`

## 6. Reservation Availability

Dosya: `api/reservation_availability.php`

- Method: `GET`
- Beklenen parametreler:
  - `date`
  - `time`
  - `minutes`
  - `layout_id`

## 7. Reservation Create

Dosya: `api/reservation_create.php`

- Method: `POST`
- Beklenen JSON:
  - `date`
  - `time`
  - `minutes`
  - `guests`
  - `name`
  - `phone`
  - `note`
  - `seat_id`

## 8. Price List Export

Dosya: `api/price_list_export.php`

- Method: `GET`
- Parametreler:
  - `format=json|csv|print|pdf`
  - `lang`

## 9. Health Check

Dosya: `api/health_check.php`

- Method: `GET`
- Amac: temel platform saglik kontrolu

## 10. Platform Scan

Dosya: `api/platform_scan.php`

- Method: `GET`
- Amac: saglik ve kalite tarama raporu almak

## 11. Tipik Akis Baglantisi

Siparis akisi:

1. `session_open`
2. `session_status`
3. `order_create`
4. `order_poll`
5. aralarda `session_heartbeat`
