Order Details

Order Details

GET /api/External/v2/Order/{orderId}

Retrieves order details based on a specific order ID.

Example Request

Get order details
curl -X GET "https://ext.adisyo.com/api/External/v2/Order/643287" \
  --header "x-api-key: ..." \
  --header "x-api-secret: ..." \
  --header "x-api-consumer: ..."

Request Parameters

ParameterData TypeDescription
orderIdLong (Path Parameter)Order ID in Adisyo system

Example Response

Table Order Example
{
    "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": []
}

Response Parameters

Main Order Information

Parameter NameData TypeDescription
idNumberOrder ID in Adisyo system
waiterNameString?Waiter name
deliveryUserNameString?Delivery personnel name
courierIdNumberCourier ID
externalAppNameString?External application name
restaurantNameString?Restaurant name
orderTotalNumberOrder total amount
paymentMethodNameString?Payment method name
paymentMethodIdNumberPayment method ID
deliveryTimeDate? (ISO 8601)Delivery time
discountAmountNumberDiscount amount
currencyStringCurrency
orderNoteString?Order note
externalAppIdString?Order ID in external application
salesChannelIdNumberSales channel ID
salesChannelNameStringSales channel name
orderTypeStringOrder type (Table Order, Takeaway Order, Pickup Order)
orderTypeIdNumberOrder type ID (1: Table, 3: Takeaway, 5: Pickup)
statusIdNumberOrder status ID
statusString?Order status
orderCancelReasonString?Cancellation reason (if any)
tableNameString?Table name (if table order)
orderNumberNumberOrder number
taxAmountNumberTax amount
insertDateDate (ISO 8601)Order creation date
updateDateDate (ISO 8601)Last update date
customerIdNumberCustomer ID (0 if anonymous customer)
customerLatitudeString?Customer latitude information
customerLongitudeString?Customer longitude information
confirmationCodeString?Confirmation code
integrationRestaurantNameString?Integration restaurant name
addressIdNumberAddress ID
isScheduledOrderBooleanIs it a scheduled order?
scheduledTimeString?Scheduled delivery time
deliveryTypeNumberDelivery type
restaurantKeyNumberRestaurant key
externalAppKeyNumberExternal application key
closedDateDate? (ISO 8601)Order closing date
preparedDateDate? (ISO 8601)Order preparation date

Customer Information (customer)

Parameter NameData TypeDescription
customerNameString?Customer name (null if anonymous customer)
customerSurnameString?Customer surname
customerEmailString?Customer email address
customerIdNumberCustomer ID (0 if anonymous customer)
customerPhoneString?Primary phone number
customerPhone2String?Secondary phone number
addressString?Address
addressDescriptionString?Address description
regionString?District/County
addressHeaderString?Address header
cityString?City
companyString?Company name
phoneCodeString?Phone code
addressIdNumberAddress ID
isDefaultBoolean?Is it the default address?

Product Information (products)

Parameter NameData TypeDescription
idNumberProduct row ID
orderIdNumberOrder ID
productUnitIdNumberProduct unit ID
quantityNumberQuantity
unitPriceNumberUnit price
productNameStringProduct name
categoryNameString?Category name
productNoteString?Product note
productCodeString?Product code
isMenuBooleanIs it a menu product?
parentIdString?Parent menu ID
costNumberCost
totalAmountNumberTotal amount
groupNameString?Group name
groupIdNumberGroup ID
discountAmountNumberDiscount amount
insertDateDate (ISO 8601)Insertion date
descriptionString?Product description
cancelReasonString?Cancellation reason
excludedCompositesString?Excluded composites
excludedItemsArrayExcluded items (compositeId, compositeName)
featuresArrayFeatures (featureName, additionalPrice, featureId, orderDetailId)

Payment Information (payments)

Parameter NameData TypeDescription
orderIdNumberOrder ID
paymentTypeIdNumberPayment type ID
paymentNameStringPayment method name
amountNumberPayment amount
customerIdNumber?Customer ID
customerNameString?Customer name
customerSurnameString?Customer surname
isDebitBooleanIs it debit?
currencyIdNumberCurrency ID
currencyStringCurrency
exchangeRateNumberExchange rate
insertDateDate (ISO 8601)Payment date

Usage Examples

JavaScript/Node.js

JavaScript example
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('Order details:', response.data);
    return response.data;
  } catch (error) {
    console.error('Error:', error.response?.data || error.message);
    throw error;
  }
}
 
// Usage
getOrderById(123456789);

Notes

  • Only authorized users can view their own restaurant's orders
  • Order ID must be a valid number
  • Response includes all order details, customer information, product list and payment information