Sipariş detayları
GET /api/External/v2/Order/{orderId}
Belirli bir sipariş ID'sine göre sipariş detaylarını getirir.
Örnek istek
Sipariş detayı getirme
curl -X GET "https://ext.adisyo.com/api/External/v2/Order/643287" \
--header "x-api-key: ..." \
--header "x-api-secret: ..." \
--header "x-api-consumer: ..." \İstek Parametreleri
| Parametre | Data Tipi | Açıklama |
|---|---|---|
orderId | Long (Path Parameter) | Siparişin Adisyo sistemindeki ID'si |
Örnek cevap
Masa Siparişi Örneği
{
"id": 123456789,
"waiterName": "ÖRNEK RESTORAN",
"deliveryUserName": null,
"courierId": 0,
"externalAppName": null,
"restaurantName": "ÖRNEK ŞUBE",
"orderTotal": 485.00,
"paymentMethodName": null,
"paymentMethodId": 0,
"deliveryTime": null,
"discountAmount": 0.00,
"currency": "TRY",
"orderNote": null,
"externalAppId": null,
"salesChannelId": 12345,
"salesChannelName": "Ana Kanal",
"orderType": "Masa Siparişi",
"orderTypeId": 1,
"statusId": 1,
"status": "Sipariş Alındı",
"orderCancelReason": null,
"tableName": null,
"orderNumber": 101,
"taxAmount": 44.09,
"insertDate": "2025-01-15T16:10:39.973",
"updateDate": "2025-01-15T16:22:23.02",
"customerId": 987654321,
"customerLatitude": null,
"customerLongitude": null,
"confirmationCode": null,
"integrationRestaurantName": null,
"addressId": 123456789,
"isScheduledOrder": false,
"scheduledTime": null,
"deliveryType": 2,
"restaurantKey": 12345,
"externalAppKey": 0,
"closedDate": null,
"preparedDate": null,
"customer": {
"customerName": "Ahmet",
"customerSurname": "Yılmaz",
"customerEmail": "",
"customerId": 987654321,
"customerPhone": "5551234567",
"customerPhone2": "",
"address": "Örnek Mahallesi, Örnek Sokak No:123, 34000 İstanbul",
"addressDescription": "Örnek Bina K:5",
"region": "Kadıköy",
"addressHeader": "Ev",
"city": "İstanbul",
"company": null,
"phoneCode": null,
"addressId": 0,
"isDefault": null
},
"products": [
{
"id": 1111111111,
"orderId": 123456789,
"productUnitId": 2222222,
"quantity": 1.000,
"unitPrice": 270.00,
"productName": "2 Orta Boy Pizza",
"categoryName": "Salon Kampanya",
"productNote": null,
"productCode": "SALON04",
"isMenu": true,
"parentId": null,
"cost": 0.0,
"totalAmount": 325.00,
"groupName": null,
"groupId": 0,
"discountAmount": 0.00,
"insertDate": "2025-01-15T16:10:40.163",
"description": null,
"cancelReason": null,
"excludedComposites": null,
"excludedItems": [],
"features": []
},
{
"id": 1111111112,
"orderId": 123456789,
"productUnitId": 3333333,
"quantity": 1.000,
"unitPrice": 0.00,
"productName": "Salamlı Zeytinli (Orta Boy)",
"categoryName": "Ekonomik Pizzalar",
"productNote": null,
"productCode": "ADP02",
"isMenu": false,
"parentId": 1111111111,
"cost": 0.0,
"totalAmount": 0.00,
"groupName": null,
"groupId": 0,
"discountAmount": 0.00,
"insertDate": "2025-01-15T16:10:40.173",
"description": null,
"cancelReason": null,
"excludedComposites": null,
"excludedItems": [
{
"compositeId": 123456,
"compositeName": "SIYAH ZEYTIN"
}
],
"features": [
{
"featureName": "FUME KABURGA",
"additionalPrice": 40.00,
"featureId": 111111,
"orderDetailId": 1111111112
},
{
"featureName": "TAVUK",
"additionalPrice": 15.00,
"featureId": 222222,
"orderDetailId": 1111111112
},
{
"featureName": "INCE HAMUR",
"additionalPrice": 0.00,
"featureId": 333333,
"orderDetailId": 1111111112
}
]
},
{
"id": 1111111113,
"orderId": 123456789,
"productUnitId": 4444444,
"quantity": 1.000,
"unitPrice": 0.00,
"productName": "Margarita (Orta Boy)",
"categoryName": "Ekonomik Pizzalar",
"productNote": "",
"productCode": "MARG02",
"isMenu": false,
"parentId": 1111111111,
"cost": 0.0,
"totalAmount": 0.00,
"groupName": null,
"groupId": 0,
"discountAmount": 0.00,
"insertDate": "2025-01-15T16:10:40.337",
"description": null,
"cancelReason": null,
"excludedComposites": null,
"excludedItems": [],
"features": [
{
"featureName": "INCE HAMUR",
"additionalPrice": 0.00,
"featureId": 333333,
"orderDetailId": 1111111113
}
]
},
{
"id": 1111111114,
"orderId": 123456789,
"productUnitId": 5555555,
"quantity": 1.000,
"unitPrice": 45.00,
"productName": "Limonata (30 cl.)",
"categoryName": "İçecekler",
"productNote": null,
"productCode": "ICE19",
"isMenu": false,
"parentId": null,
"cost": 7.00,
"totalAmount": 45.00,
"groupName": null,
"groupId": 0,
"discountAmount": 0.00,
"insertDate": "2025-01-15T16:10:40.8",
"description": null,
"cancelReason": null,
"excludedComposites": null,
"excludedItems": [],
"features": []
},
{
"id": 1111111115,
"orderId": 123456789,
"productUnitId": 6666666,
"quantity": 1.000,
"unitPrice": 60.00,
"productName": "Sufle",
"categoryName": "Tatlılar",
"productNote": "",
"productCode": "SUF01",
"isMenu": false,
"parentId": null,
"cost": 0.0,
"totalAmount": 60.00,
"groupName": null,
"groupId": 0,
"discountAmount": 0.00,
"insertDate": "2025-01-15T16:10:40.83",
"description": null,
"cancelReason": null,
"excludedComposites": null,
"excludedItems": [],
"features": []
},
{
"id": 1111111116,
"orderId": 123456789,
"productUnitId": 7777777,
"quantity": 1.000,
"unitPrice": 55.00,
"productName": "Sarımsaklı Ekmek",
"categoryName": "Çıtır Lezzetler",
"productNote": null,
"productCode": "CIT08",
"isMenu": false,
"parentId": null,
"cost": 0.0,
"totalAmount": 55.00,
"groupName": null,
"groupId": 0,
"discountAmount": 0.00,
"insertDate": "2025-01-15T16:10:40.877",
"description": null,
"cancelReason": null,
"excludedComposites": null,
"excludedItems": [],
"features": []
}
],
"payments": []
}Cevap parametreleri
Ana Sipariş Bilgileri
| Parametre Adı | Data Tipi | Açıklama |
|---|---|---|
id | Number | Siparişin Adisyo sistemindeki ID'si |
waiterName | String? | Garson adı |
deliveryUserName | String? | Teslimat personeli adı |
courierId | Number | Kurye ID'si |
externalAppName | String? | Dış uygulama adı |
restaurantName | String? | Restoran adı |
orderTotal | Number | Sipariş toplam tutarı |
paymentMethodName | String? | Ödeme yöntemi adı |
paymentMethodId | Number | Ödeme yöntemi ID'si |
deliveryTime | Date? (ISO 8601) | Teslimat zamanı |
discountAmount | Number | İndirim tutarı |
currency | String | Para birimi |
orderNote | String? | Sipariş notu |
externalAppId | String? | Dış uygulamadaki sipariş ID'si |
salesChannelId | Number | Satış kanalı ID'si |
salesChannelName | String | Satış kanalı adı |
orderType | String | Sipariş tipi (Masa Siparişi, Paket Siparişi, Gel-Al Satış) |
orderTypeId | Number | Sipariş tipi ID'si (1: Masa, 3: Paket, 5: Gel-Al) |
statusId | Number | Sipariş durum ID'si |
status | String? | Sipariş durumu |
orderCancelReason | String? | İptal nedeni (varsa) |
tableName | String? | Masa adı (masa siparişi ise) |
orderNumber | Number | Sipariş numarası |
taxAmount | Number | Vergi tutarı |
insertDate | Date (ISO 8601) | Sipariş oluşturulma tarihi |
updateDate | Date (ISO 8601) | Son güncelleme tarihi |
customerId | Number | Müşteri ID'si (0 ise anonim müşteri) |
customerLatitude | String? | Müşteri enlem bilgisi |
customerLongitude | String? | Müşteri boylam bilgisi |
confirmationCode | String? | Onay kodu |
integrationRestaurantName | String? | Entegrasyon restoran adı |
addressId | Number | Adres ID'si |
isScheduledOrder | Boolean | Zamanlanmış sipariş mi? |
scheduledTime | String? | Zamanlanmış teslimat zamanı |
deliveryType | Number | Teslimat tipi |
restaurantKey | Number | Restoran anahtarı |
externalAppKey | Number | Dış uygulama anahtarı |
closedDate | Date? (ISO 8601) | Sipariş kapatılma tarihi |
preparedDate | Date? (ISO 8601) | Sipariş hazırlanma tarihi |
Müşteri Bilgileri (customer)
| Parametre Adı | Data Tipi | Açıklama |
|---|---|---|
customerName | String? | Müşteri adı (null ise anonim müşteri) |
customerSurname | String? | Müşteri soyadı |
customerEmail | String? | Müşteri e-posta adresi |
customerId | Number | Müşteri ID'si (0 ise anonim müşteri) |
customerPhone | String? | Birincil telefon numarası |
customerPhone2 | String? | İkincil telefon numarası |
address | String? | Adres |
addressDescription | String? | Adres açıklaması |
region | String? | Semt/İlçe |
addressHeader | String? | Adres başlığı |
city | String? | Şehir |
company | String? | Şirket adı |
phoneCode | String? | Telefon kodu |
addressId | Number | Adres ID'si |
isDefault | Boolean? | Varsayılan adres mi? |
Ürün Bilgileri (products)
| Parametre Adı | Data Tipi | Açıklama |
|---|---|---|
id | Number | Ürün satır ID'si |
orderId | Number | Sipariş ID'si |
productUnitId | Number | Ürün birim ID'si |
quantity | Number | Miktar |
unitPrice | Number | Birim fiyat |
productName | String | Ürün adı |
categoryName | String? | Kategori adı |
productNote | String? | Ürün notu |
productCode | String? | Ürün kodu |
isMenu | Boolean | Menü ürünü mü? |
parentId | String? | Ana menü ID'si |
cost | Number | Maliyet |
totalAmount | Number | Toplam tutar |
groupName | String? | Grup adı |
groupId | Number | Grup ID'si |
discountAmount | Number | İndirim tutarı |
insertDate | Date (ISO 8601) | Eklenme tarihi |
description | String? | Ürün açıklaması |
cancelReason | String? | İptal nedeni |
excludedComposites | String? | Hariç tutulan bileşenler |
excludedItems | Array | Hariç tutulan öğeler (compositeId, compositeName) |
features | Array | Özellikler (featureName, additionalPrice, featureId, orderDetailId) |
Ödeme Bilgileri (payments)
| Parametre Adı | Data Tipi | Açıklama |
|---|---|---|
orderId | Number | Sipariş ID'si |
paymentTypeId | Number | Ödeme tipi ID'si |
paymentName | String | Ödeme yöntemi adı |
amount | Number | Ödeme tutarı |
customerId | Number? | Müşteri ID'si |
customerName | String? | Müşteri adı |
customerSurname | String? | Müşteri soyadı |
isDebit | Boolean | Borçlu mu? |
currencyId | Number | Para birimi ID'si |
currency | String | Para birimi |
exchangeRate | Number | Döviz kuru |
insertDate | Date (ISO 8601) | Ödeme tarihi |
Kullanım örnekleri
JavaScript/Node.js
JavaScript örneği
const axios = require('axios');
async function getOrderById(orderId) {
try {
const response = await axios.get(
`https://ext.adisyo.com/api/External/v2/Order/${orderId}`,
{
headers: {
'x-api-key': 'your-api-key',
'x-api-secret': 'your-api-secret',
'x-api-consumer': 'your-consumer'
}
}
);
console.log('Sipariş detayları:', response.data);
return response.data;
} catch (error) {
console.error('Hata:', error.response?.data || error.message);
throw error;
}
}
// Kullanım
getOrderById(123456789);Notlar
- Sadece yetkili kullanıcılar kendi restoranlarının siparişlerini görüntüleyebilir.
- Sipariş ID'si geçerli bir sayı olmalıdır.
- Cevapta siparişin tüm detayları, müşteri bilgileri, ürün listesi ve ödeme bilgileri yer alır.