Create Order

Create Order

POST /SaveOrder

Creates a new order in Adisyo

Example Request

Creating an order with two products
curl -X POST 'https://ext.adisyo.com/api/External/v2/SaveOrder' \
  --header "x-api-key: ..." \
  --header "x-api-secret: ..." \
  --header "x-api-consumer: ..." \
  --header 'Content-Type: application/json' \
  --data '{
      "CustomerName": "Ahmet",
      "CustomerSurname": "Yılmaz",
      "CustomerId": "MUS-03",
      "CustomerPhone": "5551234567",
      "CustomerPhone2": "5559876543",
      "Address": "Atatürk Mahallesi, Çiçek Sokak No:12 Daire:4",
      "AddressDescription": "Migros'un karşısındaki apartman, kırmızı kapılı bina",
      "Region": "Ataşehir",
      "City": "İstanbul",
      "PaymentMethodId": 3,
      "PaymentNote": "Payment will be made with credit card on delivery",
      "Discount": 0,
      "OrderTotal": 12.00,
      "OrderNote": "Please bring the order hot, also include wet wipes and napkins",
      "WebOrderId": "SIP-07",
      "CustomerLatitude": "40,987654",
      "CustomerLongitude": "29,123456",
      "OrderDetails": [
        {
          "ProductUnitId": 2359421,
          "Quantity": 2,
          "OrderDetailNote": "Large size, I prefer without spices"
        },
        {
          "ProductUnitId": 2359422,
          "Quantity": 1
        }
      ]
  }'

Request Parameters

Let's explain the order saving request above through the following example scenario:

  • Your restaurant has a website.
  • A customer named Ahmet Yılmaz places an order through your website.
  • If this customer is not previously registered in your system, you should first save them to your own database and send the customer ID you created (in the example MUS-03) to the Adisyo API.
  • Suppose the order created is saved as SIP-07 in your own system. If you send this order to Adisyo with this reference number, we can use it for tracking the operation and subsequent steps.
Parameter NameData TypeDescription
CustomerNameStringName of the customer placing the order
CustomerSurnameStringSurname of the customer placing the order
CustomerIdStringID of the customer placing the order in your system (MUS-03)
CustomerPhoneStringPrimary phone number of the customer placing the order
CustomerPhone2StringSecondary phone number of the customer placing the order
AddressStringAddress of the customer placing the order
AddressDescriptionStringDescription for the address of the customer placing the order
RegionStringDistrict name of the customer placing the order
CityStringCity of the customer placing the order
PaymentMethodIdNumberPayment Type
PaymentNoteStringPayment note
DiscountNumberTotal discount amount in the order
OrderNoteStringOrder note
WebOrderIdStringOrder ID in your system (SIP-07)
OrderTotalNumberOrder total amount
DeliveryFeeNumberDelivery Fee (Calculating Order Total)
ServiceChargeNumberService charge or other extra service fees (Calculating Order Total)
CustomerLatitudeStringCustomer latitude information (##,####)
CustomerLongitudeStringCustomer longitude information (##,####)
OrderDetailsArrayList of order details
[].OrderDetails.ProductUnitIdNumberProduct unit ID (Specifying Product in Order)
[].OrderDetails.ProductCodeStringProduct code (Specifying Product in Order)
[].OrderDetails.QuantityNumberProduct quantity
[].OrderDetails.OrderDetailNoteString?Order detail note
(TODO) [].OrderDetails.NameString?Product or menu name
[].OrderDetails.IsMenuBooleanIs it a menu? (Menu Products)
[].OrderDetails.MenuIdNumber?Menu ID (Menu Products)
[].OrderDetails.ParentIdString?ID of the menu or product it belongs to (Menu Products)

Calculating Order Total

You can send extra fees added to the order total amount through 2 separate values. If a separate payment is received for delivery, you can send this through the DeliveryFee field.

For example, for an order where product items are 40 and delivery fee is 15 TL, it should be sent as OrderTotal: 55, DeliveryFee: 15. Also, extra service fees or similar additional fees should be sent through the ServiceCharge field.

For example, for a restaurant that charges 10 for packaging fee and 20 for extra service fee, In an order where product items are also 90 TL, it should be sent as ServiceCharge: 30, OrderTotal: 120 TL.

If there is also a 20 TL delivery fee in this order, OrderTotal: 140 and DeliveryFee: 20 TL should be.

Specifying Product in Order

Based on the product list obtained from the Product List endpoint, you need to choose only one of the ProductUnitId or ProductCode fields in the product details of the orders you will create. When creating the product list in the order, you need to fill only one of these fields and send the other as null or without any value.

Menu Products

If a product in the order is under a different menu, it should have its own ParentId value. Otherwise, ParentId should not be sent or should be specified as null.

Note: A product's MenuId and ParentId values should not be the same.

Example: Products Containing Menu

  • Hamburger is a menu, so it has its own MenuId value.
  • Since Kola is under Hamburger Menu, the ParentId value should be the same as Hamburger's MenuId value.
Products Containing Menu
"OrderDetails": [
  {
    "Quantity": 1,
    "ProductUnitId": 123,
    "IsMenu": true,
    "MenuId": 1,
    "ParentId": null
  },
  {
    "Quantity": 1,
    "ProductUnitId": 234,
    "IsMenu": false,
    "MenuId": null,
    "ParentId": "1"
  }
]

Example: Independent Products

If Kola is not connected to any menu, the ParentId parameter should not be sent.

Independent Products
"OrderDetails": [
  {
    "Quantity": 1,
    "ProductUnitId": 123,
    "IsMenu": false,
    "MenuId": null,
    "ParentId": null
  },
  {
    "Quantity": 1,
    "ProductUnitId": 234,
    "IsMenu": false,
    "MenuId": null,
    "ParentId": null
  }
]

Example Response

Saved order response
{
  "orderId": 643287,
  "orderTotal": 18.0,
  "discount": 0.0,
  "insertedDate": "2025-09-26T20:21:40.05",
  "status": 100,
  "message": null
}

Response Parameters

Parameter NameData TypeDescription
orderIdNumberOrder ID in Adisyo system
orderTotalNumberTotal amount of the order
discountNumberTotal discount amount applied in the order
insertedDateDate ISO 8601Date when the order was saved to the system
statusNumberResponse Codes
messageStringOperation result message