Create Order
POST /SaveOrder
Creates a new order in Adisyo
Example Request
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ılmazplaces 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-07in 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 Name | Data Type | Description |
|---|---|---|
CustomerName | String | Name of the customer placing the order |
CustomerSurname | String | Surname of the customer placing the order |
CustomerId | String | ID of the customer placing the order in your system (MUS-03) |
CustomerPhone | String | Primary phone number of the customer placing the order |
CustomerPhone2 | String | Secondary phone number of the customer placing the order |
Address | String | Address of the customer placing the order |
AddressDescription | String | Description for the address of the customer placing the order |
Region | String | District name of the customer placing the order |
City | String | City of the customer placing the order |
PaymentMethodId | Number | Payment Type |
PaymentNote | String | Payment note |
Discount | Number | Total discount amount in the order |
OrderNote | String | Order note |
WebOrderId | String | Order ID in your system (SIP-07) |
OrderTotal | Number | Order total amount |
DeliveryFee | Number | Delivery Fee (Calculating Order Total) |
ServiceCharge | Number | Service charge or other extra service fees (Calculating Order Total) |
CustomerLatitude | String | Customer latitude information (##,####) |
CustomerLongitude | String | Customer longitude information (##,####) |
OrderDetails | Array | List of order details |
[].OrderDetails.ProductUnitId | Number | Product unit ID (Specifying Product in Order) |
[].OrderDetails.ProductCode | String | Product code (Specifying Product in Order) |
[].OrderDetails.Quantity | Number | Product quantity |
[].OrderDetails.OrderDetailNote | String? | Order detail note |
(TODO) [].OrderDetails.Name | String? | Product or menu name |
[].OrderDetails.IsMenu | Boolean | Is it a menu? (Menu Products) |
[].OrderDetails.MenuId | Number? | Menu ID (Menu Products) |
[].OrderDetails.ParentId | String? | 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
MenuIdandParentIdvalues should not be the same.
Example: Products Containing Menu
Hamburgeris a menu, so it has its ownMenuIdvalue.- Since
Kolais underHamburger Menu, theParentIdvalue should be the same asHamburger's MenuIdvalue.
"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.
"OrderDetails": [
{
"Quantity": 1,
"ProductUnitId": 123,
"IsMenu": false,
"MenuId": null,
"ParentId": null
},
{
"Quantity": 1,
"ProductUnitId": 234,
"IsMenu": false,
"MenuId": null,
"ParentId": null
}
]Example Response
{
"orderId": 643287,
"orderTotal": 18.0,
"discount": 0.0,
"insertedDate": "2025-09-26T20:21:40.05",
"status": 100,
"message": null
}Response Parameters
| Parameter Name | Data Type | Description |
|---|---|---|
orderId | Number | Order ID in Adisyo system |
orderTotal | Number | Total amount of the order |
discount | Number | Total discount amount applied in the order |
insertedDate | Date ISO 8601 | Date when the order was saved to the system |
status | Number | Response Codes |
message | String | Operation result message |