Creating the Order Object
- Order object must be in
JSON
format. The order contains basic information, the products included in the order and some information about these products. Each parameter is explained separately below.
Parameters
Order Parameters
Parameter | Description | Type |
---|---|---|
CustomerName | Name of the user who placed the order | string |
CustomerSurname | Last name of the user who placed the order | string |
CustomerId | ID of the user registered to your system, otherwise leave blank | string |
CustomerPhone | Phone number of the user who placed the order | string |
CustomerPhone2 | 2nd phone number of the user who placed the order | string |
Address | The address of the user who placed the order | string |
AddressDescription | Address description of the user who placed the order | string |
Region | District-district information of the user who placed the order | string |
city | City information of the user who placed the order | string |
PaymentMethodId | Payment type information | int |
PaymentNote | Payment note | string |
Discount | Total discount amount in the order | int |
OrderNote | Order note | string |
WebOrderId | Order ID in your own system | string |
OrderTotal | Order Total Amount | int |
ParentId | ID of the main product | int |
Parameter | Description | Type | Required? |
---|---|---|---|
Quantity | Quantity of the product in the order | int | Yes |
Name | Name of the product in the order | string | Yes |
ProductUnitId | ID of the unit in the order | int | Yes |
ProductCode | Product code in the order | string | No |
OrderDetailNote | Product note | string | No |
Features | Feature list of the product in the order | List<Object> | No |
IsMenu | Indicates if the product in the order is a menu | boolean | No |
MenuId | Menu ID of the product in the order | int | No |
ParentId | ID of the main product in the order | string | No |
Usage of MenuId and ParentId
A product's MenuId
and ParentId
values should not be the same.
If a product in the order is included under a different menu, it should have its own ParentId
value.
Otherwise, ParentId
should not be sent or should be specified as null.
Example Usage
-
Products with Menu
Hamburger
is a menu, so it has its ownMenuId
value.Cola
is included under theHamburger Menu
, so itsParentId
value should be the same as theHamburger
'sMenuId
.
Products with Menu
[
{
"Quantity": 1,
"ProductUnitId": 123,
"IsMenu": true,
"MenuId": 1,
"ParentId": null
},
{
"Quantity": 1,
"ProductUnitId": 234,
"IsMenu": false,
"MenuId": null,
"ParentId": 1
}
]
Independent Products
[
{
"Quantity": 1,
"ProductUnitId": 123,
"IsMenu": false,
"MenuId": null,
"ParentId": null
},
{
"Quantity": 1,
"ProductUnitId": 234,
"IsMenu": false,
"MenuId": null,
"ParentId": null
}
]
Example Order Object
Example Order Object
{
"CustomerName": "Christian",
"CustomerSurname": "Luyindama",
"CustomerId": "44545",
"CustomerPhone": "5554443444",
"CustomerPhone2": "5554443441",
"Address": "Adres bilgisi...",
"AddressDescription": "Adres tarif",
"Region": "Ataşehir",
"City": "İstanbul",
"PaymentMethodId": 3,
"PaymentNote": "temassız çalışmıyorr",
"Discount": 20,
"OrderNote": "ıslak mendil getirin",
"WebOrderId": "746364",
"OrderTotal": "20.00",
"OrderDetails": [
{
"Quantity": 1,
"ProductCode": null,
"Name": "Efsane Menu",
"OrderDetailNote": null,
"IsMenu": true,
"ProductUnitId": 7324219,
"MenuId": 1
},
{
"Quantity": 1,
"ProductCode": null,
"Name": "Cheeseburger",
"OrderDetailNote": null,
"IsMenu": false,
"ProductUnitId": 7324216,
"ParentId": "1"
},
{
"Quantity": 1,
"ProductCode": null,
"Name": "Kola",
"OrderDetailNote": null,
"IsMenu": false,
"ProductUnitId": 7324245,
"ParentId": "1"
},
{
"Quantity": 1,
"ProductCode": null,
"Name": "Brownie",
"OrderDetailNote": null,
"IsMenu": false,
"ProductUnitId": 7324214
}
]
}