Get Order Details
Description
Get order details.
Resource
GET /v1/order/
Authorization
Use OAuth 2.0 Bearer Token,Please refer to the use process Auth Login。
Query Parameters
| Name | Type | Description |
|---|---|---|
| start_date | string | start date time ISO 8601 format EXAMPLE "2020-01-01 15:16:54" |
| end_date | string | end date time ISO 8601 format EXAMPLE "2020-01-31 15:16:54" |
Response
{
"orders": [
{
"current_state": "COMPLETED",
"placed_at": "2020-05-01T22:25:49Z",
"pickup_at": "2020-05-01T22:25:49Z",
"type": "DELIVERY",
"store": {
"id": "A01",
"name": "Tainan Store",
"group": "Singapore",
"company": "Epoint"
},
"customer": {
"name": "Wang Daming",
"mobile": "0910123456",
"address": "No. 999, Jiankang 3rd Street, Anping District, Tainan City"
},
"payments": [
{
"type": "CASH",
"payment_amount": 1000
}
],
"charges": {
"total": {
"amount": 1100,
"currency_code": "TWD",
"formatted_amount": "1100"
},
"sub_total": {
"amount": 1100,
"currency_code": "TWD",
"formatted_amount": "1100"
},
"discount": {
"amount": 100,
"currency_code": "TWD",
"formatted_amount": "100"
},
"total_fee": {
"amount": 1000,
"currency_code": "TWD",
"formatted_amount": "1000"
}
},
"cart": {
"items": [
{
"id": "P001",
"title": "Stir-fried bean buns with tomato kimchi",
"serial_number": 1,
"quantity": 2,
"price": {
"unit_price": {
"amount": 40000,
"currency_code": "TWD",
"formatted_amount": "400"
},
"total_price": {
"amount": 80000,
"currency_code": "TWD",
"formatted_amount": "800"
}
},
"selected_modifier_groups": [
{
"id": "1",
"title": "spicy",
"selected_items": [
{
"id": "1-1",
"title": "small spicy",
"quantity": 1,
"price": {
"unit_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
},
"total_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
}
},
"selected_modifier_groups": null
}
],
"removed_items": null
}
],
"ticket_no": "",
"redeem_point": 0
},
{
"id": "P002",
"title": "Fried Rice with Perilla Seed Oil and Fermented Bean Curd",
"serial_number": 5001,
"quantity": 1,
"price": {
"unit_price": {
"amount": 20000,
"currency_code": "TWD",
"formatted_amount": "200"
},
"total_price": {
"amount": 20000,
"currency_code": "TWD",
"formatted_amount": "200"
}
},
"selected_modifier_groups": [
{
"id": "2",
"title": "add rice",
"selected_items": [
{
"id": "2-1",
"title": "rice",
"quantity": 1,
"price": {
"unit_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
},
"total_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
}
},
"selected_modifier_groups": null
}
],
"removed_items": null
},
{
"id": "3",
"title": "add pepper",
"selected_items": [
{
"id": "3-1",
"title": "pepper",
"quantity": 0,
"price": {
"unit_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
},
"total_price": {
"amount": 0,
"currency_code": "TWD",
"formatted_amount": "0"
}
},
"selected_modifier_groups": null
}
],
"removed_items": null
}
],
"ticket_no": "",
"redeem_point": 0
}
]
},
"source_type": "APP",
"customize": "customize content"
}
]
}
Response Body Parameters
| Name | Type | Description |
|---|---|---|
| orders | Orders | 訂單資料 |
Response Body Parameters - Orders
| Name | Type | Description |
|---|---|---|
| current_state | string (enum) |
order status ALLOWED VALUES:
|
| paid | bool | paid or non-paid |
| placed_at | string | commit time ISO 8601 format EXAMPLE "2020-01-01T15:16:54.723Z" |
| pickup_at | string | pickup time ISO 8601 format EXAMPLE "2020-01-01T15:16:54.723Z" |
| type | string | sales method |
| store | Store | order store |
| customer | Customer | consumer info |
| payments | Payment[] | payment info |
| charges | Charges | fee |
| cart | Cart | shopping info |
| source_type | string | client equipment |
| customize | string | customize content |
Response Body Parameters - Store
| Name | Type | Description |
|---|---|---|
| id | string | store code |
| name | string | store name |
| group | string | group or country |
| company | string | company |
Response Body Parameters - Customer
| Name | Type | Description |
|---|---|---|
| name | string | name (optional) |
| mobile | string | phone number (optional) |
| address | string | address (optional) |
Response Body Parameters - Payment
| Name | Type | Description |
|---|---|---|
| type | string | payment methods |
| payment_amount | int | amount |
Response Body Parameters - Charges
| Name | Type | Description |
|---|---|---|
| total | Money | total amount |
| sub_total | Money | items amount |
| discount | Money | discount |
| total_fee | Money | payment |
| points | Point | order points info 只有訂單狀態為CREATED,且有使用點數時回傳 (optional) |
Response Body Parameters - Cart
| Name | Type | Description |
|---|---|---|
| items | Item[] | items info |
Response Body Parameters - Item
| Name | Type | Description |
|---|---|---|
| id | string | number |
| title | string | name |
| serial_number | int | serial number |
| quantity | int | amount |
| price | ItemPrice | price |
| selected_modifier_groups | ModifierGroup[] | available group (optional) |
| ticket_no | string | ticket number (optional) |
| redeem_point | int | exchange points |
Response Body Parameters - ItemPrice
| Name | Type | Description |
|---|---|---|
| unit_price | Money | unit price |
| total_price | Money | total price |
Response Body Parameters - ModifierGroup
| Name | Type | Description |
|---|---|---|
| id | string | number |
| title | string | name |
| selected_items | Item[] | choose items |
| removed_items | Item[] | unchoose items |
Response Body Parameters - Money
| Name | Type | Description |
|---|---|---|
| amount | integer | amount |
| discount | integer | discount |
| currency_code | string | currency code ISO 4217 code |
| formatted_amount | string | visual amount |