Skip to content

Upload Order Details

Description

Update order details.

Resource

POST /v1/data_center/order/upload

Authorization

Use OAuth 2.0 Bearer Token,Please refer to the use process Auth Login

Request Body Parameters

Name Type Description
orders Orders order details

Request Body Parameters - Orders

Name Type Description
order_id string order ID
current_state string
(enum)
order status
ALLOWED VALUES:
  • CANCELLED
  • COMPLETED

(optional)
paid bool paid or non-paid
(optional)
placed_at string commit time ISO 8601 format
EXAMPLE "2020-01-01T15:16:54.723Z"
(optional)
pickup_at string pickup time ISO 8601 format
EXAMPLE "2020-01-01T15:16:54.723Z"
(optional)
type string sales method
(optional)
store Store order store
customer Customer consumer info
payments Payment[] payment info
charges Charges fee
cart Cart shopping info
source_type string client equipment
(optional)
customize string Any text content
(optional)

Request Body Parameters - Store

Name Type Description
id string store code
name string store name
(optional)
group string
(optional)
Country or region or group...
company string company

Request Body Parameters - Customer

Name Type Description
name string name
(optional)
mobile string phone number
(optional)
address string address
(optional)

Request Body Parameters - Payment

Name Type Description
type string payment methods
(optional)
payment_amount int amount
(optional)

Request Body Parameters - Charges

Name Type Description
total Money total amount
sub_total Money items amount
discount Money discount
total_fee Money payment

Request Body Parameters - Cart

Name Type Description
items Item[] items info

Request Body Parameters - Item

Name Type Description
id string number
(optional)
title string name
(optional)
serial_number int serial number
(optional)
quantity int amount
(optional)
price ItemPrice price
(optional)
selected_modifier_groups ModifierGroup[] available group
(optional)
ticket_no string ticket number
(optional)
redeem_point int exchange points
(optional)

Request Body Parameters - ItemPrice

Name Type Description
unit_price Money unit price
(optional)
total_price Money total price
(optional)

Request Body Parameters - ModifierGroup

Name Type Description
id string number
(optional)
title string name
(optional)
selected_items Item[] choose items
(optional)
removed_items Item[] unchoose items
(optional)

Request Body Parameters - Money

Name Type Description
amount integer amount
(optional)
discount integer discount
(optional)
currency_code string currency code ISO 4217 code
(optional)
formatted_amount string visual amount
(optional)

Request Example

{
  "orders": [
    {
      "order_id": "tywn21072900008",
      "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"
    }
  ]
}