Get Order
Funciton
To get detailed information for a specific order with its ID
使用訂單ID獲取特定一筆訂單的詳細資料
URL
GET <<api_domain>>/v1/orders/:id
Request parameters
Parameter | Type | Description | Example |
---|---|---|---|
:id *Required | String | Order ID 訂單ID | ruby 5ceb910c43e2dd001d6d40d3 |
include_fields[] | String | Provide additional attributes in the response 結果添加哪些參數 | affiliate_campaign |
Response fields
Field | Type | Descritption | Example |
---|---|---|---|
id | String | Order ID 訂單ID | 5d8c8b3be388095d25acbc89 |
order_number | String | Order Number 訂單號碼 | 2019052707260498 |
system_order_number | String | 系统生成的訂單號 | |
merchant_order_number | String | 店家自定義訂單號 (會根據rollout_key選擇用哪個order_number) | |
status | String | Order Status 訂單狀態 - Status allows temp 暫存狀態 pending 處理中 removed 已刪除 confirmed 已確認 completed 已完成 cancelled 已取消 | pending |
order_remarks | String | Order Remarks 訂單備註 | Please send the goods after 4p.m. |
order_payment | OrderPayment | Order Payment Information 付款資訊 | Please check the link on the left |
order_delivery | Order OrderDelivery | Order Delivery Information 送貨資訊 | Please check the link on the left |
delivery_address | Order DeliveryAddress | Recipient Information 收件人基本資訊 | Please check the link on the left |
delivery_data | Order DeliveryData | Third-Party Delivery Information 第三方串接物流資訊 | Please check the link on the left |
inclusive_tax_info | Tax Info | Included tax info 內含稅訊息 | { "country_code" : "SG", "fee" : { "cents" : 7883, "currency_iso" : "HKD", "currency_symbol" : "HK$", "dollars" : 78.83, "label" : "HK$78.83" }, "rate" : 0.07, "tax_name" : "GST", "tax_region_id" : "5e548e14e3880918ef272e4e", "type" : "inclusive" } |
customer_id | String | Cutomer ID 顧客ID | 5cc17da1e388091b6fd299ed |
customer_name | String | Customer's Name 顧客姓名 | 郭美玉 |
customer_email | String | Customer's Email 顧客Email | [email protected] |
customer_phone | String | Customer's Phone 顧客電話 | 0912345678 |
customer_info | Order CustomerInfo | Customer's Information 顧客其他基本資訊 | Please check the link on the left |
currency_iso | String | Currency ISO (ISO-4217) ISO 4217 貨幣代碼 | TWD |
subtotal | Money | Price total for all order items 訂單小計,包含商品總價 | Please check the link on the left |
order_discount | Money | Order discount 優惠折扣 | Please check the link on the left |
user_credit | Money | Customer Credit 折抵購物金 | Please check the link on the left |
total_tax_fee | Money | Total Tax Fee 訂單稅費 | Please check the link on the left |
total | Money | Final price total, which includes payment fee and delivery fee 付款總金額,包含附加費與運費 | Please check the link on the left |
order_points | Integer | Points used 會員點數使用 | 15 |
order_points_to_cash | Hash | Points used to cash 會員點數轉現金 | { "cents": 0, "currency_symbol": "NT$", "currency_iso": "TWD", "label": "", "dollars": 0.0 } |
invoice | Order Invoice | Invoice Info 發票資訊 | Please check the link on the left |
subtotal_items | Order Subtotal_items | Order Product Item Data 訂單商品資訊 | Please check the link on the left |
promotion_items | Order Promotion_items | Promotion Item Data 訂單折扣資訊 | Please check the link on the left |
custom_data | Array | Customized Order Fields 客製化欄位 - *欲使用此欄位請先至商店後台>訂單設定>自訂訂單欄位 進行設定 | "value": "優質的店家!", "field_translations": { "zh-hant": "想對老闆說的話" }, "field_id": "5c404ef1e3880922e57856a6" |
custom_discount_items | Order Item | Order Custom Discount Item Data | Please check the link on the left |
applied_member_point | Number | Applied Member Point 已使用購物金 | 120 |
applied_member_point_redeem_to_cash | Money | Member Point redeem to Cash 購物金拆現金 | Please check the link on the left |
ref_order_id | String | For third party custom order id 可供儲存第三方訂單ID | ORD0001 |
ref_customer_id | String | For third party custom customer id 可供儲存第三方顧客ID | CUS0001 |
agent | Order Agent | 員工資料 - *只供POS商户使用 | Please check the link on the left |
parent_order_id | String | Parent Order ID 拆單後之母訂單ID | |
child_order_ids | Array | Child Order ID 拆單後之子訂單ID | |
split_at | DateTime | Order Split Time 拆單時間 | |
confirmed_at | DateTime | Order Confirmed Time 訂單確認時間 (如尚未確認則顯示null) - *UTC Time | |
updated_at | DateTime | Order Updated Time 訂單更新時間 - *UTC Time | 2019-09-26 T09:56:16.803+00:00 |
created_at | DateTime | Order Created Time 訂單創造日期 - *UTC Time | 2019-09-26 T09:56:11.924+00:00 |
skip_fulfillment | Boolean | Is order skipping fulfillment? 訂單是否略過“扣減庫存” | false |
utm_data | UTM Data | UTM Data UTM參數 | Please check the link on the left |
ga_tracked | Boolean | Is tracked by GA? 是否使用GA追蹤 | false |
order_comments | Array | Customer Comments 顧客通訊內容 | [ { "value": "it will be delivered on 6/18, thanks!", "time": "2020-06-16T04:23:02.811+00:00" } ] |
order_notes | Array | Order Notes 訂單備註 | [ { "value": "please deliver this order on 6/18", "time": "2020-06-16T04:23:26.235+00:00" } ] |
created_by | String | Channel that created the order 建立訂單的渠道 - openapi admin shop shop_crm pos sc mc import | |
is_guest_checkout | Boolean | true checkout as guestfalse checkout as login user | |
affiliate_campaign | Object | Affiliate campaign associated with the order 訂單對應的推薦活動 need to add in query to show include_fields=affiliate_campaign | |
affiliate_campaign.id | String | Order Campaign ID 訂單推薦活動ID | |
affiliate_campaign. name_translations | Object | Name of Campaign 推薦活動名稱 | |
affiliate_campaign.type | String | Campaign Type 推薦活動類型 | |
affiliate_campaign. reward_type | String | Campaign Reward Type 推薦活動獎勵類型 | |
affiliate_campaign.reward_value | Money | Reward Amount 獎勵金額 | |
affiliate_campaign. campaign_data | Object | Campaign Data 推薦活動參數 | |
affiliate_campaign. campaign_id | String | Campaign ID 推薦活動ID | |
affiliate_campaign. order_id | String | Order ID 訂單ID | |
affiliate_campaign. bonus_balance | Money | Bonus Balance 結算金額 | |
order_source | Object | Source of the order 訂單來源 | |
order_source.id | String | ID of the order source 訂單來源ID | |
order_source.type | String | Type of the order source 訂單來源類型 | |
order_source.source_id | String | ID of the external source 外部來源id Might be fb_fan_page_id / channel_id 可能是 fb_fan_page_id / channel_id | |
order_source. name | Object | Name 名字 Might be fb fan page name / channel name 可能是 fb 粉絲頁面名稱/頻道名稱 | |
created_from | String | Order created from 訂單來源 | admin_openapi |
Response Example
JSON sample
{
"id": "608faafe3985d70013d89319",
"order_number": "20210503074918429",
"system_order_number": "20210503074918429",
"merchant_order_number": null,
"status": "pending",
"order_remarks": null,
"order_payment": {
"id": "608faafe3985d70013d8931f",
"payment_method_id": "5d8aededcddd1c0023802556",
"payment_type": "cash_on_delivery",
"name_translations": {
"en": "[DO NOT UPDATE/REMOVE] Static Payment",
"zh-hant": "貨到付款"
},
"status": "temp",
"payment_fee": {
"cents": 0,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "",
"dollars": 0.0
},
"total": {
"cents": 100,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$100",
"dollars": 100.0
},
"paid_at": null,
"updated_at": "2021-05-03T07:49:18.548+00:00",
"created_at": "2021-05-03T07:49:18.548+00:00",
"payment_data": {},
"last_four_digits": "",
"ref_payment_id": null
},
"order_delivery": {
"delivery_option_id": "5d8aee9c1c1435002c8655c5",
"platform": "custom",
"status": "pending",
"delivery_status": "pending",
"name_translations": {
"en": "[DO NOT UPDATE/REMOVE] Static Delivery",
"zh-hant": ""
},
"total": {
"cents": 100,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$100",
"dollars": 100.0
},
"shipped_at": null,
"arrived_at": null,
"collected_at": null,
"returned_at": null,
"remark": null,
"request_accepted_at": null,
"request_authorized_at": null,
"request_submitted_at": null,
"requested_fmt_at": null,
"require_expired_upload": false,
"require_storeclosed_upload": false,
"return_order_id": null,
"store_closed_at": null,
"storeclosed_upload_at": null
},
"delivery_address": {
"country_code": "TW",
"country": "台灣",
"city": "台北市",
"state": null,
"postcode": "10560",
"address_1": "光復北路11巷44號14樓",
"address_2": "松山區",
"key": null,
"layer1": null,
"layer2": null,
"layer3": null,
"district": null,
"logistic_codes": null,
"recipient_name": "收件人",
"recipient_phone": "0227423966",
"remarks": null
},
"delivery_data": {
"hk_sfplus_home_region": null,
"location_code": null,
"location_name": null,
"name_translations": null,
"store_address": null,
"url": null,
"tracking_number": "",
"scheduled_delivery_date": null,
"time_slot_key": null,
"time_slot_translations": {}
},
"customer_id": "5d8b0968f478ad0001c167c2",
"customer_name": "Shopline User",
"customer_email": "[email protected]",
"customer_phone": "02-27423586",
"customer_info": {},
"currency_iso": "TWD",
"subtotal": {
"cents": 110,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$110",
"dollars": 110.0
},
"order_discount": {
"cents": 0,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "",
"dollars": 0.0
},
"user_credit": {
"cents": 0,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "",
"dollars": 0.0
},
"total_tax_fee": {
"cents": 0,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "",
"dollars": 0.0
},
"total": {
"cents": 100,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$100",
"dollars": 100.0
},
"order_points": 0,
"order_points_to_cash": {
"cents": 0,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "",
"dollars": 0.0
},
"invoice": {
"tax_id": "",
"mailing_address": "",
"invoice_type": "",
"buyer_name": "",
"carrier_type": "",
"carrier_number": "",
"n_p_o_b_a_n": "",
"invoice_tax_type": "",
"invoice_number": "",
"invoice_status": "",
"invoice_date": null,
"invoice_cancelled_at": null
},
"subtotal_items": [
{
"id": "608faafe3985d70013d8931c",
"item_type": "Product",
"item_data": {},
"item_id": "5d8b0806d4e45400297e5e7d",
"item_variation_id": "",
"item_variation_key": "",
"item_price": {
"cents": 100,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$100",
"dollars": 100.0
},
"price": {
"cents": 100,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$100",
"dollars": 100.0
},
"cost": {
"cents": 0,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "",
"dollars": 0.0
},
"ref_data": null,
"media": {
"images": {
"favicon_small": {
"width": 80.0,
"height": 80.0,
"url": "https://img.shoplineapp.com/media/image_clips/608a81438d88b80038919b82/original.jpg?1619689795"
},
"favicon": {
"width": 80.0,
"height": 80.0,
"url": "https://img.shoplineapp.com/media/image_clips/608a81438d88b80038919b82/original.jpg?1619689795"
},
"favicon_large": {
"width": 80.0,
"height": 80.0,
"url": "https://img.shoplineapp.com/media/image_clips/608a81438d88b80038919b82/original.jpg?1619689795"
},
"transparent_thumb": {
"width": 80.0,
"height": 80.0,
"url": "https://img.shoplineapp.com/media/image_clips/608a81438d88b80038919b82/original.jpg?1619689795"
},
"transparent_large": {
"width": 80.0,
"height": 80.0,
"url": "https://img.shoplineapp.com/media/image_clips/608a81438d88b80038919b82/original.jpg?1619689795"
},
"transparent_xlarge": {
"width": 80.0,
"height": 80.0,
"url": "https://img.shoplineapp.com/media/image_clips/608a81438d88b80038919b82/original.jpg?1619689795"
},
"original": {
"width": 80.0,
"height": 80.0,
"url": "https://img.shoplineapp.com/media/image_clips/608a81438d88b80038919b82/original.jpg?1619689795"
},
"thumb": {
"width": 80.0,
"height": 80.0,
"url": "https://img.shoplineapp.com/media/image_clips/608a81438d88b80038919b82/original.jpg?1619689795"
},
"source": {
"width": 80.0,
"height": 80.0,
"url": "https://img.shoplineapp.com/media/image_clips/608a81438d88b80038919b82/original.jpg?1619689795"
}
},
"_id": "608a81438d88b80038919b82",
"alt_translations": {}
},
"title_translations": {
"en": "[DO NOT UPDATE/REMOVE] Static Product"
},
"fields_translations": {},
"sku": "static_product",
"is_preorder": false,
"quantity": 1,
"total": {
"cents": 100,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$100",
"dollars": 100.0
},
"order_discounted_price": null,
"discounted_price": null,
"created_by": "admin",
"object_data": {
"gender": "unisex",
"age_group": "adult",
"adult": "no",
"condition": "new",
"barcode_type": "Code 128",
"max_order_quantity": -1
}
},
{
"id": "608faafe3985d70013d8931e",
"item_type": "CustomProduct",
"item_data": {},
"item_id": null,
"item_variation_id": "",
"item_variation_key": "",
"item_price": {
"cents": 10,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$10",
"dollars": 10.0
},
"price": {
"cents": 10,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$10",
"dollars": 10.0
},
"cost": {
"cents": 0,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "",
"dollars": 0.0
},
"ref_data": null,
"media": {
"images": {
"thumb": {
"url": "https://img-shoplineapp-com.s3.amazonaws.com/media/image_clips/58ec630101cda37fdb00003d/thumb.png"
}
}
},
"title_translations": {
"en": "Custom Product Name",
"zh-hant": "Custom Product Name"
},
"fields_translations": {},
"sku": "",
"is_preorder": false,
"quantity": 1,
"total": {
"cents": 10,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$10",
"dollars": 10.0
},
"order_discounted_price": null,
"discounted_price": null,
"created_by": null,
"object_data": {}
}
],
"promotion_items": [],
"custom_data": [],
"custom_discount_items": [
{
"id": "608faafe3985d70013d8931d",
"item_type": "CustomDiscount",
"item_data": {
"name": "DDD"
},
"item_id": null,
"item_variation_id": "",
"item_variation_key": "",
"item_price": {
"cents": 10,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$10",
"dollars": 10.0
},
"price": {
"cents": 10,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$10",
"dollars": 10.0
},
"cost": {
"cents": 0,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "",
"dollars": 0.0
},
"ref_data": null,
"media": {},
"title_translations": {
"en": "DDD",
"zh-hant": "DDD",
"zh-hk": "DDD",
"zh-cn": "DDD",
"zh-tw": "DDD",
"vi": "DDD",
"ms": "DDD",
"ja": "DDD",
"th": "DDD",
"id": "DDD",
"de": "DDD",
"fr": "DDD"
},
"fields_translations": {},
"sku": "",
"is_preorder": false,
"quantity": 1,
"total": {
"cents": 10,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$10",
"dollars": 10.0
},
"order_discounted_price": null,
"discounted_price": null,
"created_by": null,
"object_data": {}
}
],
"applied_member_point": 120,
"applied_member_point_redeem_to_cash": {
"cents": 12,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$12",
"dollars": 12,
},
"affiliate_data": {},
"ref_order_id": "",
"ref_customer_id": "SL001",
"channel": {},
"parent_order_id": "",
"child_order_ids": [],
"split_at": null,
"confirmed_at": null,
"created_by": "openapi",
"updated_at": "2021-05-03T07:49:18.756+00:00",
"created_at": "2021-05-03T07:49:18.557+00:00",
"skip_fulfillment": true,
"utm_data": {},
"ga_tracked": false,
"order_comments": [],
"order_notes": [],
"payment_slips": [],
"affiliate_campaign":{
"id":"60ab17a431042e0029c283ea",
"name_translations":{
"en":"全單購買滿NT$348:訂單回饋 10%"
},
"type":"affiliate_referral",
"reward_type":"percentage",
"reward_value":{
"cents":35,
"currency_symbol":"NT$",
"currency_iso":"TWD",
"label":"NT$35",
"dollars":35.0
},
"campaign_data":{
"_id":"60a79136d29c0a00464d860a",
"code":"210521a",
"condition_value":348,
"created_at":"2021-05-21T10:53:42.193Z",
"end_at":null,
"merchant_id":"5e3cddc33b79300008116aaa",
"name_translations":{
"en":"全單購買滿NT$348:訂單回饋 10%"
},
"partner_info":{
},
"promotion_id":null,
"remarks_translations":{
},
"reward_type":"percentage",
"reward_value":10,
"start_at":"2021-05-21T10:00:00.000Z",
"status":"active",
"type":"affiliate_referral",
"updated_at":"2021-05-21T10:53:42.193Z"
},
"campaign_id":"60a79136d29c0a00464d860a",
"order_id":"60ab17a331042e0029c283d3",
"bonus_balance":{
"cents":348,
"currency_symbol":"NT$",
"currency_iso":"TWD",
"label":"NT$348",
"dollars":348.0
}
},
"tags": [],
"created_from": "admin_openapi"
}
Updated almost 3 years ago