Siparişi oku

API Referansı · Siparişler

Siparişi oku

GEThttps://panel.restofytech.com/api/pos/v1/orders/{orderId}

Bir siparişin güncel hali. Kasada gösterilen sipariş her zaman bu cevaptan okunur: satırlar, seçimler, kuruş cinsinden tutarlar, ödeme, müşteri ve adres. Satırların adı, seçimleri ve fiyatı sipariş anında dondurulur; menü sonradan değişse de bu cevap değişmez.

Başka şubenin siparişi, hiç olmayan siparişle aynı cevabı alır (404 ORDER_NOT_FOUND). Ödeme ve tahsilat kuralları: Ödeme ve tahsilat.

Başlıklar

  • Authorizationstringzorunlu

    Bearer <şube anahtarı>. Anahtar şubeyi belirler; istekte şube kimliği gönderilmez.

Yol parametreleri

  • orderIdstring (uuid)zorunlu

Cevaplar

  • 200Sipariş

    Alanlar

    • orderobjectzorunlu
    • order.orderIdstring (uuid)zorunlu
    • order.orderNumberstringzorunlu

      Müşterinin ve restoranın gördüğü sipariş numarası. Fişe basın.

    • order.versionintegerzorunlu

      Her değişiklikte bir artar. Kasadaki sürümden büyükse fişi güncelleyin.

    • order.statusstringzorunlu
      İzinli:PENDINGCONFIRMEDPREPARINGREADYOUT_FOR_DELIVERYDELIVEREDCANCELLED
    • order.channelstringzorunlu

      DELIVERY adrese teslim, PICKUP gel-al, SELF_SERVICE QR ile tezgâhtan teslim, SHIPPING kargo.

      İzinli:DELIVERYPICKUPSELF_SERVICESHIPPING
    • order.sourcestringzorunlu

      RESTOFY müşterinin sitedeki siparişi, PANEL restoranın panelden elle girdiği sipariş.

      İzinli:RESTOFYPANEL
    • order.isTestbooleanzorunlu

      Deneme siparişi. Fişe "DENEME" yazın, ciroya ve kasa raporuna katmayın.

    • order.currencystringzorunlu
    • order.createdAtstring (date-time)zorunlu
    • order.updatedAtstring (date-time)zorunlu
    • order.alertAtstring (date-time)zorunlu

      Mutfağın siparişi görmesi gereken an. İleri tarihli siparişte gelecektedir; mutfağa o an düşürün.

    • order.scheduledForstring (date-time)null olabilir

      Müşterinin seçtiği teslim saati. Boşsa "en kısa sürede" demektir.

    • order.estimatedAtstring (date-time)null olabilir

      Müşteriye söylenen tahmini teslim ya da hazır olma saati.

    • order.acceptedAtstring (date-time)null olabilir
    • order.pickedUpAtstring (date-time)null olabilir
    • order.deliveredAtstring (date-time)null olabilir
    • order.cancelledAtstring (date-time)null olabilir
    • order.cancellationobjectnull olabilir
    • order.cancellation.bystringnull olabilir

      CUSTOMER müşteri, BRANCH restoran ya da kasa, ADMIN Restofy, SYSTEM süresinde kabul edilmediği için Restofy.

      İzinli:CUSTOMERBRANCHADMINSYSTEM
    • order.cancellation.reasonCodestringnull olabilir
    • order.cancellation.notestringnull olabilir
    • order.actionsobjectzorunlu
    • order.actions.advanceTostringzorunlunull olabilir

      advance çağrısının siparişi götüreceği durum. Kapalı siparişte null.

      İzinli:PENDINGCONFIRMEDPREPARINGREADYOUT_FOR_DELIVERYDELIVEREDCANCELLED
    • order.actions.cancellablebooleanzorunlu

      cancel hâlâ gönderilebilir mi.

    • order.customerobjectzorunlu
    • order.customer.namestringzorunlu
    • order.customer.phonestringzorunlunull olabilir

      E.164 biçiminde. Müşteri hesabını silmişse null olabilir.

    • order.deliveryobjectnull olabilir

      Yalnız adrese teslim ve kargo siparişinde dolu.

    • order.delivery.addressstring
    • order.delivery.districtstringnull olabilir
    • order.delivery.citystringnull olabilir
    • order.delivery.detailstringnull olabilir

      No, kat, daire tek satırda

    • order.delivery.buildingNostringnull olabilir
    • order.delivery.floorstringnull olabilir
    • order.delivery.apartmentstringnull olabilir
    • order.delivery.directionsstringnull olabilir
    • order.delivery.latitudenumbernull olabilir
    • order.delivery.longitudenumbernull olabilir
    • order.notesstringnull olabilir
    • order.itemsobject[]zorunlu
    • order.items[].lineIdstringzorunlu
    • order.items[].productIdstringzorunlunull olabilir

      Ürün sonradan silinmişse null

    • order.items[].namestringzorunlu
    • order.items[].quantityintegerzorunlu
    • order.items[].unitPriceMinorintegerzorunlu

      Seçenekler dahil bir adedin fiyatı

    • order.items[].lineTotalMinorintegerzorunlu

      Satırın tahsil edilen toplamı. Seçenek farkını ikinci kez eklemeyin.

    • order.items[].vatRatePercentnumberzorunlu

      Sipariş anındaki KDV oranı (fiyata dahil)

    • order.items[].barcodestringnull olabilir
    • order.items[].notesstringnull olabilir
    • order.items[].optionsobject[]zorunlu
    • order.items[].options[].groupIdstringzorunlu
    • order.items[].options[].groupNamestringzorunlu
    • order.items[].options[].choiceIdstringzorunlu
    • order.items[].options[].choiceNamestringzorunlu
    • order.items[].options[].priceModifierMinorintegerzorunlu

      Seçeneğin ürüne eklediği tutar; satır fiyatına zaten dahil

    • order.items[].missingQuantityintegernull olabilir

      Bulunamayan adet

    • order.items[].depositMinorintegerzorunlu

      Tam sayı kuruş (19000 = 190,00 TL)

    • order.totalsobjectzorunlu
    • order.totals.subtotalMinorintegerzorunlu

      Satırların toplamı

    • order.totals.deliveryFeeMinorintegerzorunlu

      Teslimat ücreti

    • order.totals.serviceFeeMinorintegerzorunlu

      Hizmet bedeli

    • order.totals.discountMinorintegerzorunlu

      Kampanya indirimi

    • order.totals.taxMinorintegerzorunlu

      Fiyata eklenen vergi; Türkiye'de KDV fiyata dahil olduğu için 0

    • order.totals.tipMinorintegerzorunlu

      Bahşiş; Türkiye'de 0

    • order.totals.depositMinorintegerzorunlu

      Depozito; Türkiye'de 0

    • order.totals.totalMinorintegerzorunlu

      Fişin toplamı. Kasa kendi toplamını değil bunu kullanır.

    • order.totals.returnedMinorintegerzorunlu

      Teslimden sonra iade edilen tutar

    • order.paymentobjectzorunlu
    • order.payment.methodstringzorunlu

      ONLINE sitede kartla ödendi; CASH ve CARD kapıda ya da tezgâhta nakit ve banka kartı; MEAL_CARD kapıda yemek kartı; UNSPECIFIED 17 Kasım 2026 öncesi kapıda ödemeli sipariş, nakit mi kart mı kayıtlı değil (kasiyer sorar).

      İzinli:ONLINECASHCARDMEAL_CARDUNSPECIFIED
    • order.payment.mealCardstringzorunlunull olabilir

      Yemek kartının markası

      İzinli:MULTINETPLUXEEEDENREDSETCARDMETROPOLTOKENFLEXPAYE
    • order.payment.paidOnlinebooleanzorunlu
    • order.payment.amountToCollectMinorintegerzorunlu

      Teslimde tahsil edilecek tutar. Çevrimiçi ödemede ve iptal edilmiş siparişte 0.

    • order.courierobjectnull olabilir

      Restoranın atadığı kurye. Yoksa null.

    • order.courier.namestringnull olabilir
    • order.courier.phonestringnull olabilir
    • order.shipmentobjectnull olabilir
    • order.shipment.carrierstring
    • order.shipment.trackingNumberstring
  • 400VALIDATION_FAILED, INVALID_JSON, INVALID_CURSOR ya da IDEMPOTENCY_KEY_REQUIRED
  • 401Anahtar yanlış, kapatılmış ya da yenilenmiş
  • 404Sipariş bu şubenin değil ya da yok
  • 429Hız sınırı aşıldı

    Retry-After: Tekrar denemeden önce beklenecek saniye

  • 500Beklenmeyen hata. Artan aralıklarla aynı isteği tekrarlayın.

cURL

curl "https://panel.restofytech.com/api/pos/v1/orders/$ORDER_ID" \
  -H "Authorization: Bearer $TOKEN"

Dene

Anahtar yalnız bu sekmede tutulur. Test anahtarı kullanın: canlı anahtarla yapılan kabul ve iptal gerçek siparişi değiştirir.

Örnek cevaplar

{
  "ok": true,
  "order": {
    "orderId": "882649c5-f468-434a-8d9d-e7228f9eaa34",
    "orderNumber": "HZLVHGFK",
    "version": 1,
    "status": "PENDING",
    "channel": "DELIVERY",
    "source": "RESTOFY",
    "isTest": false,
    "currency": "TRY",
    "createdAt": "2026-11-25T09:00:00.309Z",
    "updatedAt": "2026-11-25T09:00:00.309Z",
    "alertAt": "2026-11-25T09:00:00.308Z",
    "scheduledFor": null,
    "estimatedAt": "2026-11-25T09:40:00.308Z",
    "acceptedAt": null,
    "pickedUpAt": null,
    "deliveredAt": null,
    "cancelledAt": null,
    "cancellation": null,
    "actions": {
      "advanceTo": "PREPARING",
      "cancellable": true
    },
    "customer": {
      "name": "Ayşe Yılmaz",
      "phone": "+905321112233"
    },
    "delivery": {
      "address": "Moda Cd. 12",
      "district": "Kadıköy",
      "city": "İstanbul",
      "detail": "No: 12 · Kat: 3 · Daire: 7",
      "buildingNo": "12",
      "floor": "3",
      "apartment": "7",
      "directions": "Eczanenin üstü",
      "latitude": 40.9862,
      "longitude": 29.0253
    },
    "notes": "Zili çalmayın",
    "items": [
      {
        "lineId": "2525e7be-85f3-4d76-a7b6-5abd4892cc7a",
        "productId": "484fceb5-bb32-4e12-8ba1-4005342648e7",
        "name": "Filtre Kahve",
        "quantity": 2,
        "unitPriceMinor": 10000,
        "lineTotalMinor": 20000,
        "vatRatePercent": 10,
        "barcode": null,
        "notes": null,
        "options": [
          {
            "groupId": "142fbf4d-4632-4cf8-be74-160bb0269fdf",
            "groupName": "Boy",
            "choiceId": "f5db8835-8812-4e65-b5d2-9d0620675941",
            "choiceName": "Büyük",
            "priceModifierMinor": 1000
          }
        ],
        "missingQuantity": null,
        "depositMinor": 0
      }
    ],
    "totals": {
      "subtotalMinor": 20000,
      "deliveryFeeMinor": 1500,
      "serviceFeeMinor": 0,
      "discountMinor": 2500,
      "taxMinor": 0,
      "tipMinor": 0,
      "depositMinor": 0,
      "totalMinor": 19000,
      "returnedMinor": 0
    },
    "payment": {
      "method": "ONLINE",
      "mealCard": null,
      "paidOnline": true,
      "amountToCollectMinor": 0
    },
    "courier": null,
    "shipment": null
  }
}