Add Live Products

Function

Support batch adding products, allowing maximum 100 items to be added in an API call.
支持批量添加商品到直播,單次最多允許添加 100 件商品。

Please refer to https://open-api.docs.shoplineapp.com/reference/post_sales-saleid-products for more details.

❗️

API request rate limit: 1 request per second.

The API for live streaming has a different rate limit than other APIs. Once the limit is reached, additional requests will be temporarily blocked until the next time window starts.

📘

Notice

  • This API supports batch adding of products, allowing a maximum of 100 items to be added in a single operation.
  • For LINE channel, a single variation (or products without variations) is only allowed to have one keyword or product number.
  • The products[].custom_keys field is only effective for products without variations, while the products[].variations[].custom_keys field is only effective for products with single or multiple variations.
  • custom_keys and custom_number fields are mutually exclusive. If custom_number is filled, custom_keys should be left empty. If custom_keys are filled, it must ensure that all custom_keys fields are filled and meet the rules, while custom_number should be left empty.

URL

POST <<api_domain>>/v1/sales/:sale_id/products

Request Parameters

Parameter

Type

Description

Example

sale_id *Required

String

Sale Event ID
直播間 ID

61a77ab95972890008b40106

products
*Required

List<Object>

Product Lists
商品列表

(Please refer to request example)

products[].product_id
*Required

String

Product ID
商品 ID

products[].custom_numbers

List<String>

Product Custom Numbers
商品編號

products[].custom_keys

List<String>

Product Custom Keys
商品關鍵字(無規格商品),最多支援 3 個
Product keywords (effective when there are no variations), supports maximum 3 keywords.

products[].variations

List<Object>

Variations
規格品

products[].variations[].variation_id
*Required

String

Variation ID
規格品 ID

products[].variations[].custom_keys
*Required

List<String>

Variation Custom Keys
規格品關鍵字,最多支援 3 個
Variation keywords, supports maximum 3 keywords.

Response Parameters

Parameter

Type

Description

Example

items

List<Object>

Sale Event Product Lists
直播間商品列表

items[].product_id

String

Product ID
商品 ID

items[].custom_numbers

List<String>

Product Custom Numbers
商品編號

items[].custom_keys

List<String>

Product Custom Keys
商品關鍵字

items[].effective_key

Boolean

Keyword Effectiveness
關鍵字是否生效
Whether the keywords are effective

items[].create_time

DateTime

Create Time
創建時間

items[].update_time

DateTime

Update Time
更新時間

items[].variations

List<Object>

Variations
規格品

items[].variations[].variation_id

String

Variation ID
規格品 ID

items[].variations[].custom_keys

List<String>

Variation Keyword Lists
規格品關鍵字列表

Error Code

Code

Description

SC_POST_0102

The quantity of products added in a single operation exceeds the limit.
單次添加商品的數量超過限制

SC_POST_0103

The keywords of products or variations are duplicated.
商品或規格品關鍵字重複

SC_POST_0104

The keyword is invalid.
關鍵字不合法

SC_POST_0105

The product or variation has already been added.
商品或規格品已經被加入直播間

SC_POST_0106

SKU missing, or data in variations and product_detail does not match.
SKU 缺失,或是 variations 和 product_detail 中的資訊不相符

SC_POST_0107

There is a task in progress. Please try again later.
任務進行中,請稍後再試