HomeGuidesAPI ReferenceChangelogDiscussions
HomeLog In
Guides

Get Order Labels for Delivery

❗️

Note

If you'd like to use the 7-11 B2C / 7-11 Cross Border / FMT Freeze / FMT B2C / FMT C2C / T-cat / HCT / SF(HK only)、T-cat Emap delivery labels, please contact your corespondent service contact in SHOPLINE. Thank you!

目前支援 7-11 B2C、7-11 跨境、全家冷凍、全家 B2C、全家 C2C、黑貓(常溫、冷藏、冷凍)、新竹物流(常溫、冷藏、冷凍)、順豐(只限香港)、黑貓快速到店(常溫、冷藏、冷凍)的送貨標籤列印。
請向您的客戶服務窗口申請對應的物流服務。

Function

Open API supports getting delivery labels in one URL with multiple order IDs for below delivery options in TW:
FMT B2C
FMT C2C
FMT Freeze
711 B2C
7-11 Cross Border
TCat Room temperature
TCat Refrigerated
TCat Frozen
HCT room temp
HCT refrigerated
HCT frozen
TCat Emap room temp
TCat Emap refrigerated
TCat Emap frozen

*For SF(HK only), you can get delivery labels by Open API, but it will response multiple URLs if you request multiple order IDs.

Please check "Occasions when labels cannot be printed" below for condition of failure.

使用多個訂單 ID 獲取寄貨標籤 (多個 OrderID 對應到一個物流面單 URL),目前支援的物流方式有:7-11 B2C、7-11 跨境、全家冷凍、全家 B2C、全家 C2C、黑貓(常溫、冷藏、冷凍)、新竹物流(常溫、冷藏、冷凍)、黑貓快速到店(常溫、冷藏、冷凍)。

使用多個訂單 ID 獲取寄貨標籤 (多個 OrderID 對應到多個物流面單 URL),目前支援的物流方式有:順豐(只限香港)。

請參閱下方"不能列印送貨標籤的可能狀況"了解請求失敗情況。

URL

GET <<api_domain>>/v1/orders/label

Request Parameters

ParameterTypeDescriptionNote
ids
*Required
ArrayOrder ID
訂單ID
-
*Allow 24 order IDs in one batch
一次最多輸入24筆訂單ID
-
ruby ids[]=5def3cabcc5c4e002d1a4a49&ids[]=5def43c4318a96003a33f38a

Response Fields

ParamsTypeDescriptionExample
fmt_b2cArrayLabel image URLs for Familiy Mart B2C order
全家B2C寄貨標籤url

Note: 全家 b2c pay & b2c nopay 會分成兩份 pdf
"fmt_b2c": ["https:// 寄貨標籤url"]
fmt_c2cArrayLabel image URLs for Familiy Mart C2C order
全家C2C寄貨標籤url
"fmt_c2c": ["https:// 寄貨標籤url"]
fmt_freezeArrayLabel image URLs for Familiy Mart Freeze order
全家Freeze寄貨標籤url

Note: 全家Freeze pay & Freeze nopay 會分成兩份 pdf
"fmt_freeze": ["https:// 寄貨標籤url"]
seven_eleven_b2cArrayLabel image URLs for 7-11 B2C order
7-11 B2C寄貨標籤url
"seven_eleven_b2c": ["https:// 寄貨標籤url"]
cross_border_711_store_pick_upArrayLabel image URLs for 7-11 Cross Border Store Pickup
7-11 跨境店取寄貨標籤url
"cross_border_711_store_pick_up": ["https:// 寄貨標籤url"]
cross_border_711_home_deliveryArrayLabel image URLs for 7-11 Cross Border Home Delivery
7-11 跨境宅配寄貨標籤url
"cross_border_711_home_delivery": ["https:// 寄貨標籤url"]
tcat_roomtempArrayLabel image URLs for TCat roomtemp order"tcat_roomtemp": ["https:// 寄貨標籤url"]
tcat_refrigeratedArrayLabel image URLs for TCat refrigerated order"tcat_refrigerated": ["https:// 寄貨標籤url"]
tcat_frozenArrayLabel image URLs for TCat Forzen order"tcat_frozen": ["https:// 寄貨標籤url"]
sfexpressArrayLabel image URLs for TCat SFExpress order"sfexpress": ["https:// 寄貨標籤url"]
sf_pickupArrayLabel image URLs for TCat SFPickup order"sf_pickup": ["https:// 寄貨標籤url"]
hct_roomtempArrayLabel image URLs for 新竹物流 room temp"hct_roomtemp": ["https:// 寄貨標籤url"]
hct_refrigeratedArrayLabel image URLs for 新竹物流 refrigerated"hct_refrigerated": ["https:// 寄貨標籤url"]
hct_frozenArrayLabel image URLs for 新竹物流 frozen"hct_frozen": ["https:// 寄貨標籤url"]
sl_tcat_emap_roomtempArrayLabel image URLs for 黑貓快速到店 frozen"sl_tcat_emap_roomtemp": ["https:// 寄貨標籤url"]
sl_tcat_emap_refrigeratedArrayLabel image URLs for 黑貓快速到店 frozen"sl_tcat_emap_refrigerated": ["https:// 寄貨標籤url"]
sl_tcat_emap_frozenArrayLabel image URLs for 黑貓快速到店 frozen"sl_tcat_emap_frozen": ["https:// 寄貨標籤url"]
failed_ordersObjectFor fmt_c2c, fmt_b2c, seven_eleven_b2c, tcat_roomtemp, tcat_refrigerated, tcat_frozen, hct_roomtemp, hct_refrigerated, hct_frozen orders, if validations are passed, any partially failed orders will be return in this field. 如果通過訂單資訊的驗證,如有fmt_c2c, fmt_b2c, seven_eleven_b2c, tcat_roomtemp, tcat_refrigerated, tcat_frozen, hct_roomtemp, hct_refrigerated, hct_frozen 訂單的部份操作失敗, 部份失敗的訂單訊息將會被返回。"failed_orders": {
"5cece030d62fc30035b33bf1": [{ "delivery_option": "seven_eleven_b2c", "reason": "Cannot handle this order"}]}

Request Example

<<api_domain>>/v1/orders/label?ids[]=5d65e8002ad149001485dc3e&ids[]=5cdd20f7e3880950ce1dcf21&ids[]=5cd00bb2e388093484f78e23

Response Example

JSON sample

{
  "fmt_b2c": [
    "https://shoplineapp-com.s3-ap-southeast-1.amazonaws.com/pdf/private/...tw_fm_b2c_nopay.pdf.../..."
  ],
  "fmt_c2c": [
    "https://shoplineapp-com.s3-ap-southeast-1.amazonaws.com/pdf/private/...tw_fm_c2c_nopay.pdf.../..."
  ],
  "fmt_freeze": [
    "https://shoplineapp-com.s3.ap-southeast-1.amazonaws.com/pdf/private/...sl_logistics_fmt_freeze_nopay.pdf...",
    "https://shoplineapp-com.s3.ap-southeast-1.amazonaws.com/pdf/private/...sl_logistics_fmt_freeze_pay.pdf..."
  ],
  "seven_eleven_b2c": [
    "https://shoplineapp-com.s3-ap-southeast-1.amazonaws.com/pdf/private/...tw_711_b2c_nopay.pdf.../..."
  ],
  "cross_border_711_store_pick_up": [
    "https://shoplineapp-com.s3.ap-southeast-1.amazonaws.com/pdf/private/...cross_border_711_store_pick_up.pdf..."
  ],
  "cross_border_711_home_delivery": [
    "https://shoplineapp-com.s3.ap-southeast-1.amazonaws.com/pdf/private/...cross_border_711_home_delivery.pdf..."
  ],
  "tcat_roomtemp": [
    "https://shoplineapp-com.s3-ap-southeast-1.amazonaws.com/tcat/..."
  ],
  "tcat_refrigerated": [
    "https://shoplineapp-com.s3-ap-southeast-1.amazonaws.com/tcat/..."
  ],
  "tcat_frozen": [
    "https://shoplineapp-com.s3-ap-southeast-1.amazonaws.com/tcat/..."
  ],
  "sfexpress": [
    "https://shoplineapp-com.s3-ap-southeast-1.amazonaws.com/sf_express/...",
    "https://shoplineapp-com.s3-ap-southeast-1.amazonaws.com/sf_express/..."
  ],
  "sf_pickup": [
    "https://shoplineapp-com.s3-ap-southeast-1.amazonaws.com/sf_express/..."
  ],
  "hct_roomtemp": [
    "https://shoplineapp-com.s3-ap-southeast-1.amazonaws.com/pdf/private/...sl_logistics_hct_hct_roomtemp.pdf.../..."
  ],
  "hct_refrigerated": [
    "https://shoplineapp-com.s3-ap-southeast-1.amazonaws.com/pdf/private/...sl_logistics_hct_hct_refrigerated.pdf.../..."
  ],
  "hct_frozen": [
    "https://shoplineapp-com.s3-ap-southeast-1.amazonaws.com/pdf/private/...sl_logistics_hct_hct_frozen.pdf.../..."
  ],
  "sl_tcat_emap_roomtemp": [
    "https://shoplineapp-com.s3-ap-southeast-1.amazonaws.com/pdf/private/...sl_logistics_tcat_cat_store_roomtemp_c.pdf.../..."
  ],
  "sl_tcat_emap_refrigerated": [
    "https://shoplineapp-com.s3-ap-southeast-1.amazonaws.com/pdf/private/...sl_logistics_tcat_cat_store_refrigerated_c.pdf.../..." 
  ],
  "sl_tcat_emap_frozen": [
    "https://shoplineapp-com.s3-ap-southeast-1.amazonaws.com/pdf/private/...sl_logistics_tcat_cat_store_frozen_c.pdf.../..." 
  ],
  "failed_orders": {
    "61405486588cb80383c9edb8": [
      {
        "delivery_option": "seven_eleven_b2c",
        "reason": "Cannot handle this order"
      }
    ],
    "61529568588cb80383c9f056": [
      {
        "delivery_option": "seven_eleven_b2c",
        "reason": "Unprocessed"
      }
    ]
  }
}

不能列印送貨標籤的可能狀況 Occasions when labels cannot be printed

  1. Order delivery not found
    訂單編號不存在
  2. Not a supported delivery order
    不支援的物流方式
  3. Shipping label is expired
    送貨標籤已失效
  4. Label not available
    送貨標籤不存在
  5. Over 24 orders
    超過24筆訂單ID

In the above situations, the whole operation will not be processed.
這些情況下,其他訂單的操作也不會通過。

JSON sample for failure cases

{
  "error": [
    "Order#[5cece030d62fc30035b33bf1] Order delivery not found"
  ],
  "failed_orders": {
    "5cece030d62fc30035b33bf1": [
      {
        "reason": "Order delivery not found",
        "delivery_option": "hct_roomtemp"
      }
    ],
    "5ceb986da638180014cb4ae0": [
      {
        "reason": "Unprocessed",
        "delivery_option": "hct_roomtemp"
      }
    ]
  }
}
{
  "error": [
    "Order#[5cece030d62fc30035b33bf1] Not a supported delivery order"
  ],
  "failed_orders": {
    "5cece030d62fc30035b33bf2": [
      {
        "reason": "Not a supported delivery order",
        "delivery_option": "xxx"
      }
    ],
    "5ceb986da638180014cb4ae0": [
      {
        "reason": "Unprocessed",
        "delivery_option": "hct_roomtemp"
      }
    ]
  }
}
{
  "error": [
    "Order#[5cece030d62fc30035b33bf1] Shipping label is expired"
  ],
  "failed_orders": {
    "5cece030d62fc30035b33bf1": [
      {
        "reason": "Shipping label is expired",
        "delivery_option": "hct_roomtemp"
      }
    ],
    "5ceb986da638180014cb4ae0": [
      {
        "reason": "Unprocessed",
        "delivery_option": "hct_roomtemp"
      }
    ]
  }
}
{
  "error": [
    "Order#[5cece030d62fc30035b33bf1] Label not available"
  ],
  "failed_orders": {
    "5cece030d62fc30035b33bf1": [
      {
        "reason": "Label not available",
        "delivery_option": "hct_roomtemp"
      }
    ],
    "5ceb986da638180014cb4ae0xx": [
      {
        "reason": "Unprocessed",
        "delivery_option": "hct_roomtemp"
      }
    ]
  }
}

JSON sample for over 24 orders case

{
    "error": "order quantity Limit : 24",
    "code": "GetOrderLabelError",
    "caused_by": null
}