HomeGuidesAPI ReferenceChangelogDiscussions
HomeLog In
Guides

Funciton

To get detailed information for a specific order with its ID
使用訂單ID獲取特定一筆訂單的詳細資料

URL

GET <<api_domain>>/v1/orders/:id

Request parameters

ParameterTypeDescriptionExample
:id
*Required
StringOrder ID
訂單ID
ruby 5ceb910c43e2dd001d6d40d3
include_fields[]StringProvide additional attributes in the response
結果添加哪些參數
affiliate_campaign

Response fields

FieldTypeDescritptionExample
idStringOrder ID
訂單ID
5d8c8b3be388095d25acbc89
order_numberStringOrder Number
訂單號碼
2019052707260498
system_order_numberString系统生成的訂單號
merchant_order_numberString店家自定義訂單號
(會根據rollout_key選擇用哪個order_number)
statusStringOrder Status
訂單狀態
-
Status allows
temp 暫存狀態

pending 處理中

removed 已刪除

confirmed 已確認

completed 已完成

cancelled 已取消
pending
order_remarksStringOrder Remarks
訂單備註
Please send the goods after 4p.m.
order_paymentOrderPaymentOrder Payment Information
付款資訊
Please check the link on the left
order_deliveryOrder OrderDeliveryOrder Delivery Information
送貨資訊
Please check the link on the left
delivery_addressOrder DeliveryAddressRecipient Information
收件人基本資訊
Please check the link on the left
delivery_dataOrder DeliveryDataThird-Party Delivery Information
第三方串接物流資訊
Please check the link on the left
inclusive_tax_infoTax InfoIncluded 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_idStringCutomer ID
顧客ID
5cc17da1e388091b6fd299ed
customer_nameStringCustomer's Name
顧客姓名
郭美玉
customer_emailStringCustomer's Email
顧客Email
[email protected]
customer_phoneStringCustomer's Phone
顧客電話
0912345678
customer_infoOrder CustomerInfoCustomer's Information
顧客其他基本資訊
Please check the link on the left
currency_isoStringCurrency ISO (ISO-4217)
ISO 4217 貨幣代碼
TWD
subtotalMoneyPrice total for all order items
訂單小計,包含商品總價
Please check the link on the left
order_discountMoneyOrder discount
優惠折扣
Please check the link on the left
user_creditMoneyCustomer Credit
折抵購物金
Please check the link on the left
total_tax_feeMoneyTotal Tax Fee
訂單稅費
Please check the link on the left
totalMoneyFinal price total, which includes payment fee and delivery fee
付款總金額,包含附加費與運費
Please check the link on the left
order_pointsIntegerPoints used
會員點數使用
15
order_points_to_cashHashPoints used to cash
會員點數轉現金
{ "cents": 0, "currency_symbol": "NT$", "currency_iso": "TWD", "label": "", "dollars": 0.0 }
invoiceOrder InvoiceInvoice Info
發票資訊
Please check the link on the left
subtotal_itemsOrder Subtotal_itemsOrder Product Item Data
訂單商品資訊
Please check the link on the left
promotion_itemsOrder Promotion_itemsPromotion Item Data
訂單折扣資訊
Please check the link on the left
custom_dataArrayCustomized Order Fields
客製化欄位
-
*欲使用此欄位請先至商店後台>訂單設定>自訂訂單欄位 進行設定
"value": "優質的店家!", "field_translations": {
"zh-hant": "想對老闆說的話"
},
"field_id": "5c404ef1e3880922e57856a6"
custom_discount_itemsOrder ItemOrder Custom Discount Item DataPlease check the link on the left
applied_member_pointNumberApplied Member Point
已使用購物金
120
applied_member_point_redeem_to_cashMoneyMember Point redeem to Cash
購物金拆現金
Please check the link on the left
ref_order_idStringFor third party custom order id
可供儲存第三方訂單ID
ORD0001
ref_customer_idStringFor third party custom customer id
可供儲存第三方顧客ID
CUS0001
agentOrder Agent員工資料
-
*只供POS商户使用
Please check the link on the left
parent_order_idStringParent Order ID
拆單後之母訂單ID
child_order_idsArrayChild Order ID
拆單後之子訂單ID
split_atDateTimeOrder Split Time
拆單時間
confirmed_atDateTimeOrder Confirmed Time
訂單確認時間
(如尚未確認則顯示null)
-
*UTC Time
updated_atDateTimeOrder Updated Time
訂單更新時間
-
*UTC Time
2019-09-26
T09:56:16.803+00:00
created_atDateTimeOrder Created Time
訂單創造日期
-
*UTC Time
2019-09-26
T09:56:11.924+00:00
skip_fulfillmentBooleanIs order skipping fulfillment?
訂單是否略過“扣減庫存”
false
utm_dataUTM DataUTM Data
UTM參數
Please check the link on the left
ga_trackedBooleanIs tracked by GA?
是否使用GA追蹤
false
order_commentsArrayCustomer Comments
顧客通訊內容
[
{
"value": "it will be delivered on 6/18, thanks!",
"time": "2020-06-16T04:23:02.811+00:00"
}
]
order_notesArrayOrder Notes
訂單備註
[
{
"value": "please deliver this order on 6/18",
"time": "2020-06-16T04:23:26.235+00:00"
}
]
created_byStringChannel that created the order
建立訂單的渠道
-
openapi
admin
shop
shop_crm
pos
sc
mc
import
is_guest_checkoutBooleantrue checkout as guest
false checkout as login user
affiliate_campaignObjectAffiliate campaign associated with the order
訂單對應的推薦活動

need to add in query to show
include_fields=affiliate_campaign
affiliate_campaign.idStringOrder Campaign ID
訂單推薦活動ID
affiliate_campaign. name_translationsObjectName of Campaign
推薦活動名稱
affiliate_campaign.typeStringCampaign Type
推薦活動類型
affiliate_campaign. reward_typeStringCampaign Reward Type
推薦活動獎勵類型
affiliate_campaign.reward_valueMoneyReward Amount
獎勵金額
affiliate_campaign. campaign_dataObjectCampaign Data
推薦活動參數
affiliate_campaign. campaign_idStringCampaign ID
推薦活動ID
affiliate_campaign. order_idStringOrder ID
訂單ID
affiliate_campaign. bonus_balanceMoneyBonus Balance
結算金額
order_sourceObjectSource of the order
訂單來源
order_source.idStringID of the order source
訂單來源ID
order_source.typeStringType of the order source
訂單來源類型
order_source.source_idStringID of the external source
外部來源id
Might be fb_fan_page_id / channel_id
可能是 fb_fan_page_id / channel_id
order_source. nameObjectName
名字
Might be fb fan page name / channel name
可能是 fb 粉絲頁面名稱/頻道名稱
created_fromStringOrder 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"
}