☰ Menü · Siparişler
API referansı

Siparişler

Misafirlerin masadan QR menü üzerinden gönderdiği sepetler.

Sipariş nesnesi

numberinteger
Sesli söylemek ve mutfak fişine basmak için kısa numara.
statusstring
new, accepted, preparing, ready, served, completed, rejected, cancelled.
tablestring veya null
Masa bağlantısındaki ?table= değerinden gelir veya misafir tarafından yazılır.
notestring veya null
Misafirin notu.
subtotal, currency, item_count
Sipariş anındaki menüye göre bizim hesapladığımız tutarlar.
items[]dizi
item_id, external_id (sizin SKU'nuz), name, quantity, unit_price, total, kendi external_id ve price_delta değerleriyle options[].
external_idstring veya null
Sizin sipariş numaranız, kabul sırasında atanır.
guest_languagestring
Misafirin kullandığı menü dili.
JSON
{
  "object": "order",
  "id": "0c69a81c-0fbc-4333-b26c-789566b9bea4",
  "number": 10,
  "status": "new",
  "table": "7",
  "note": "No onions, please",
  "currency": "MDL",
  "subtotal": 14000,
  "item_count": 2,
  "items": [
    {
      "item_id": "a48343bd-9f6e-424a-b003-fe790617f4d6",
      "external_id": "2040",
      "name": "Zeamă",
      "quantity": 2,
      "unit_price": 7000,
      "total": 14000,
      "options": []
    }
  ],
  "external_id": null,
  "reject_reason": null,
  "guest_language": "en",
  "source": "qr_menu",
  "livemode": true,
  "created_at": "2026-10-06T18:14:48.233+00:00",
  "accepted_at": null,
  "completed_at": null,
  "updated_at": "2026-10-06T18:14:48.233+00:00"
}
GET/v1/orders
İzin: orders:read

En yeniden eskiye. ?status=new ile filtreleyin (parametreyi tekrarlayın veya değerleri virgülle ayırın). Sayfalıdır.

curl
curl "https://loyaltyfy.io/api/v1/orders?status=new" \
  -H "Authorization: Bearer sk_test_..."
GET/v1/orders/{order}
İzin: orders:read

Tek bir sipariş.

POST/v1/orders/{order}/accept
İzin: orders:write

new durumundaki siparişi accepted durumuna geçirir. Kendi sipariş numaranızı external_id olarak gönderin. İşletme bazında benzersiz olmalıdır.

curl
curl -X POST https://loyaltyfy.io/api/v1/orders/0c69a81c-0fbc-4333-b26c-789566b9bea4/accept \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{ "external_id": "POS-ORDER-55821" }'
POST/v1/orders/{order}/reject
İzin: orders:write

new durumundaki siparişi reddeder. reason isteğe bağlıdır ve siparişle birlikte saklanır.

curl
curl -X POST https://loyaltyfy.io/api/v1/orders/0c69a81c-0fbc-4333-b26c-789566b9bea4/reject \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Kitchen closes at 22:00" }'
PATCH/v1/orders/{order}
İzin: orders:write

status değerini ayarlar (yalnızca ileri yönde, adımlar atlanabilir; açık her sipariş bir reason ile cancelled yapılabilir). Mevcut durumu tekrar göndermek hiçbir şey değiştirmez. previous_status ile order.updated gönderir.

curl
curl -X PATCH https://loyaltyfy.io/api/v1/orders/0c69a81c-0fbc-4333-b26c-789566b9bea4 \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{ "status": "ready" }'
Entegrasyonla ilgili sorularınız için: api@loyaltyfy.io. Bir iş günü içinde yanıt veriyoruz.