Order

get
Lấy thông tin đơn hàng

{{api-endpoint}}/order/{id}
Request
Response
Request
Path Parameters
id
required
string
Order id
Response
200: OK
{
"status": "success",
"code": 0,
"data": {
"id": "ce067881-920b-475a-9db6-33c91bab1afb",
"code": "1318360489",
"merchantId": "1148e25c-1bb7-4fae-ba58-f5e62d550f77",
"outletId": "a1ca3be0-b20d-46c3-8b8b-0a5425c898cd",
"orderType": "DELIVERY",
"orderStatus": "Draft",
"orderTime": "2020-10-12T08:17:29.419402",
"currency": {
"code": 0,
"symbol": "đ"
},
"itemPrice": 143000,
"deliveryPrice": 20000,
"specialRequestPrice": 0,
"discount": 0,
"grossTotal": 163000,
"total": 163000,
"items": [
{
"id": "280e1f2a-9a23-4878-b1f0-68148e5f5062",
"name": "Gà quay",
"sortIndex": 0,
"availableStatus": true,
"takeawayAllowance": false,
"price": 135000,
"description": "abc",
"modifierGroups": [
{
"name": "Toppings",
"sortIndex": 0,
"availableStatus": true,
"selectionRangeMin": 0,
"selectionRangeMax": 0,
"modifiers": [
{
"id": "2d97c15b-cf5c-4a61-bec8-ab8b12789c87",
"name": "khoai tây lắc",
"sortIndex": 0,
"availableStatus": true,
"price": 20000
}
]
}
]
},
{
"id": "0ecb007e-f893-4960-9874-73ae29ad68a2",
"name": "vịt quay Vân Đình",
"sortIndex": 0,
"availableStatus": true,
"takeawayAllowance": false,
"price": 0,
"description": "abc",
"modifierGroups": [
{
"name": "Ice",
"sortIndex": 0,
"availableStatus": true,
"selectionRangeMin": 0,
"selectionRangeMax": 0,
"modifiers": [
{
"id": "084c8203-5217-4004-963f-f5c4954973ef",
"name": "80%",
"sortIndex": 0,
"availableStatus": true,
"price": 0
}
]
}
]
},
{
"id": "4593aef0-325f-4a46-b0d8-b57d934200fd",
"name": "vịt quay Vân Đình",
"sortIndex": 0,
"availableStatus": true,
"takeawayAllowance": false,
"price": 8000,
"description": "abc",
"modifierGroups": [
{
"name": "Toppings",
"sortIndex": 0,
"availableStatus": true,
"selectionRangeMin": 0,
"selectionRangeMax": 0,
"modifiers": [
{
"id": "77d1f01b-2848-4681-a10c-4dd2d9ddb941",
"name": "Trân châu trắng",
"sortIndex": 0,
"availableStatus": true,
"price": 8000
}
]
},
{
"name": "Ice",
"sortIndex": 0,
"availableStatus": true,
"selectionRangeMin": 0,
"selectionRangeMax": 0,
"modifiers": [
{
"id": "7479106d-af20-4b33-8231-cf9a8033799b",
"name": "50%",
"sortIndex": 0,
"availableStatus": true,
"price": 0
}
]
}
]
}
],
"receiver": {
"phone": "0912312312",
"address": {
"line": "164 KDT",
"coordinates": {
"latitude": 202020.0123,
"longitude": 202020.0123
}
}
},
"member":{
"id":"d834cfd7-8c22-42c9-b5d9-c0936ea1f265",
"phone": "0912434334"
}
}
}

post
Submit order

{{api-endpoint}}/order/submit
Request
Response
Request
Headers
Authorization
required
string
Access token
Content-Type
required
string
application/json
Body Parameters
merchantId
required
string
Mã thương hiệu
outletId
required
string
Mã điểm bán hàng
items[].id
required
string
Mã sản phẩm
items[].quantity
required
number
Số lượng sản phẩm
items[].specialRequest
optional
string
Yêu cầu đặc biệt
items[].modifiers[].id
optional
string
Mã biến thể
items[].modifiers[].quantity
optional
number
Số lượng biến thể
discounts[].code
optional
string
Mã giảm giá
orderType
required
string
Hình thức đơn hàng (Ví dụ:DELIVERY)
paymentType
required
string
Hình thức thanh toán (Ví dụ:BANKCARD)
paymentMethod
required
string
Phương thức thanh toán (Ví dụ:VNPAY)
currencyCode
required
string
Mã tiền tệ (Ví dụ:VND)
receiver.name
required
string
Tên Người nhận đơn hàng
receiver.phone
required
string
Số điện thoại người nhận đơn hàng
receiver.address.line
required
string
Địa chỉ nhận đơn hàng
receiver.address.coordinates.latitude
required
string
Vị trí nhận đơn hàng
receiver.address.coordinates.longitude
required
string
Vị trí nhận đơn hàng
Response
200: OK
{
"status": "success",
"code": 0,
"data": {
"id": "ce067881-920b-475a-9db6-33c91bab1afb",
"code": "1318360489",
"merchantId": "1148e25c-1bb7-4fae-ba58-f5e62d550f77",
"outletId": "a1ca3be0-b20d-46c3-8b8b-0a5425c898cd",
"orderType": "DELIVERY",
"orderStatus": "Draft",
"orderTime": "2020-10-12T08:17:29.419402",
"currency": {
"code": 0,
"symbol": "đ"
},
"itemPrice": 143000,
"deliveryPrice": 20000,
"specialRequestPrice": 0,
"discount": 0,
"grossTotal": 163000,
"total": 163000,
"items": [
{
"id": "280e1f2a-9a23-4878-b1f0-68148e5f5062",
"name": "Gà quay",
"sortIndex": 0,
"availableStatus": true,
"takeawayAllowance": false,
"price": 135000,
"description": "abc",
"modifierGroups": [
{
"name": "Toppings",
"sortIndex": 0,
"availableStatus": true,
"selectionRangeMin": 0,
"selectionRangeMax": 0,
"modifiers": [
{
"id": "2d97c15b-cf5c-4a61-bec8-ab8b12789c87",
"name": "khoai tây lắc",
"sortIndex": 0,
"availableStatus": true,
"price": 20000
}
]
}
]
},
{
"id": "0ecb007e-f893-4960-9874-73ae29ad68a2",
"name": "vịt quay Vân Đình",
"sortIndex": 0,
"availableStatus": true,
"takeawayAllowance": false,
"price": 0,
"description": "abc",
"modifierGroups": [
{
"name": "Ice",
"sortIndex": 0,
"availableStatus": true,
"selectionRangeMin": 0,
"selectionRangeMax": 0,
"modifiers": [
{
"id": "084c8203-5217-4004-963f-f5c4954973ef",
"name": "80%",
"sortIndex": 0,
"availableStatus": true,
"price": 0
}
]
}
]
},
{
"id": "4593aef0-325f-4a46-b0d8-b57d934200fd",
"name": "vịt quay Vân Đình",
"sortIndex": 0,
"availableStatus": true,
"takeawayAllowance": false,
"price": 8000,
"description": "abc",
"modifierGroups": [
{
"name": "Toppings",
"sortIndex": 0,
"availableStatus": true,
"selectionRangeMin": 0,
"selectionRangeMax": 0,
"modifiers": [
{
"id": "77d1f01b-2848-4681-a10c-4dd2d9ddb941",
"name": "Trân châu trắng",
"sortIndex": 0,
"availableStatus": true,
"price": 8000
}
]
},
{
"name": "Ice",
"sortIndex": 0,
"availableStatus": true,
"selectionRangeMin": 0,
"selectionRangeMax": 0,
"modifiers": [
{
"id": "7479106d-af20-4b33-8231-cf9a8033799b",
"name": "50%",
"sortIndex": 0,
"availableStatus": true,
"price": 0
}
]
}
]
}
],
"receiver": {
"phone": "0912312312",
"address": {
"line": "164 KDT",
"coordinates": {
"latitude": 202020.0123,
"longitude": 202020.0123
}
}
}
}
}
400: Bad Request
{
"status": "failure",
"code": -1,
"msg": "Missing params",
"data": [
"The merchantId field is required."
]
}

Request Example

{
"merchantId": "1148e25c-1bb7-4fae-ba58-f5e62d550f77",
"outletId": "a1ca3be0-b20d-46c3-8b8b-0a5425c898cd",
"orderType": "DINEIN",
"currencyCode": "VND",
"items": [
{
"id": "27dd26e8-c1f6-4e65-8fcb-ecaa1e786de6",
"quantity": 2
},
{
"id": "48a1e837-de10-4d0b-a57c-5a6cd5c132d5",
"quantity": 2,
"modifierGroups": [
{
"modifierGroupType": 2,
"name": "Hello",
"orderModifiers": [
{
"id": "ac0781f8-9637-4029-864b-061b9595d370",
"quantity": 2
}
]
}
]
},
{
"id": "bfcc3912-3c83-404b-bd92-0e9a331ce990",
"quantity": 1,
"specialRequest": "Hello",
"modifierGroups": [
{
"modifierGroupType": 1,
"orderModifiers": [
{
"id": "207122d0-bd6b-4967-a80e-4d9c48a94cf8",
"quantity": 1
}
]
},
{
"modifierGroupType": 0,
"orderModifiers": [
{
"id": "084c8203-5217-4004-963f-f5c4954973ef"
}
]
},
{
"modifierGroupType": 2,
"orderModifiers": [
{
"id": "ac0781f8-9637-4029-864b-061b9595d370",
"quantity": 2
}
]
}
]
}
],
"discounts": [
{
"id": "3804163a-31a4-4103-a6da-d32fdd7fe761",
"discountForItems": []
}
],
"tableNumber": 10,
"pax": 1,
"specialRequest": "Hello"
}