Chuyển tới nội dung chính

PUT Update Activity Product

Cập nhật sản phẩm hoạt động Shop Scope yêu cầu: seller.promotion.write Sử dụng API này để thêm các sản phẩm hoặc SKU vào danh sách của hoạt động giảm giá sản phẩm hoặc hoạt động flash deal. Bạn cũng có thể thay đổi mức giảm giá trên các sản phẩm hoặc SKU hiện có. Để xóa các sản phẩm hoặc SKU khỏi danh sách, hãy sử dụng Remove Activity Product

. Phiên bản 202309

PUT/promotion/202309/activities/{activity_id}/products

Request

Path

PropertiesTypeDescription
activity_id RequiredstringActivity ID

Header

PropertiesTypeDescription
content-type RequiredstringLoại được cho phép: application/json
x-tts-access-token RequiredstringGiá trị access_token của seller từ Get Access Token, khi user_type = 0. Làm theo hướng dẫn này để lấy access_token của seller.

Query

PropertiesTypeDescription
app_key RequiredstringMỗi app sẽ có một key riêng. Vui lòng sử dụng key cụ thể được gán cho app của bạn.
sign RequiredstringChữ ký được tạo bởi thuật toán gen. Khi bạn gửi các API request đến TTS, bạn phải ký chúng để TTS có thể xác định người gửi.
timestamp RequiredintUnix timestamp GMT (UTC+00:00). Timestamp này được sử dụng trong tất cả các API request. Nhà phát triển có thể dùng để chuyển đổi sang giờ địa phương.
shop_cipher RequiredstringSử dụng thuộc tính này để truyền thông tin shop khi gọi API. Việc không truyền đúng giá trị khi gọi API cho các shop xuyên biên giới sẽ trả về response không chính xác. Lấy bằng API Get Authorization Shop

Body

PropertiesTypeDescription
products[]objectCác mục cần thêm vào danh sách hoặc các mục hiện có trong danh sách của hoạt động khuyến mãi cần chỉnh sửa. Độ dài không được vượt quá 300.
activity_id RequiredstringMột ID duy nhất xác định các hoạt động. Bạn không thể cập nhật các sản phẩm trong hoạt động DEACTIVATED hoặc EXPIRED.
benefit_product_ids[]stringDanh sách TikTokShop product ID.
exclude_product_ids[]stringID của các sản phẩm BXGY exclude cần xóa. Số lượng tối đa: 100.

Example

CurlGoNode.jsJavaEnable word wrap

Response Parameters

PropertiesTypeDescription
codeintMã trạng thái thành công hoặc thất bại được trả về trong API response.
messagestringThông báo thành công hoặc thất bại được trả về trong API response. Lý do thất bại sẽ được mô tả trong message.
request_idstringRequest log
dataobjectThông tin trả về cụ thể

Example

JSONEnable word wrap

Error Code

View common error codes

| Code | Message | | --- | --- | | 17011102 | Promotion title cannot be a duplicate. | | 17027107 | Internal system error, please try again later. | | 17029001 | Invalid parameters | | 17029009 | Activity does not exist | | 17029010 | Activity is deactivated | | 17029012 | Not allowed to update expired activities | | 17029013 | sku must be [] for activities of which product_level==PRODUCT. | | 17029014 | The value of quantity_per_user is out of range. | | 17029015 | When product_level==VARIATION, the value of quantity_limit must be -1. | | 17029016 | Invalid SKU ID. | | 17029017 | You are specifying products not in your shop. | | 17029018 | The provided SKU quantity is greater than the available stock. | | 17029019 | The provided product quantity is greater than the available stock. | | 17029020 | Product discount exceeds limit. The limit varies based on products and regions. | | 17029021 | SKU discount exceeds limit. The limit varies based on products and regions. | | 17029022 | The product or SKU cannot be in two ONGOING or NOT_START activities at the same time. | | 17029025 | The quantity of the products or the SKUs included in the activity exceeds 10000. | | 17029026 | Invalid SellerID | | 17029028 | You are specifying activities not in your shop. | | 17029029 | You are incorrectly specifying activity_price_amount instead of discount when activity_type==DIRECT_DISCOUNT and product_level==PRODUCT. | | 17029030 | You are incorrectly specifying discount instead of activity_price_amount when activity_type==FIXED_PRICE / FLASHSALE and product_level==PRODUCT. | | 17029031 | You are incorrectly specifying activity_price_amount instead of discount when activity_type==DIRECT_DISCOUNT and product_level==VARIATION. | | 17029032 | You are incorrectly specifying discount instead of activity_price_amount when activity_type==FIXED_PRICE / FLASHSALE and product_level==VARIATION. | | 17029033 | products is empty. | | 17029034 | activity_price_amount is invalid. | | 17029037 | skus is empty when product_level==VARIATION. | | 17029038 | When product_level==VARIATION, you must not specify product.activity_price_amount and product.discount. | | 17029039 | Duplicate product ID. | | 17029040 | Duplicate SKU ID. | | 17029041 | You must specify product.discount when activity_type==DIRECT_DISCOUNT and product_level==PRODUCT. | | 17029042 | You must specify product.activity_price_amount when activity_type==FIXED_PRICE / FLASHSALE and product_level==PRODUCT. | | 17029043 | You must specify sku.discount when activity_type==DIRECT_DISCOUNT and product_level==VARIATION. | | 17029044 | You must specify sku.activity_price_amount when activity_type==FIXED_PRICE / FLASHSALE and product_level==VARIATION. | | 17029045 | Duplicated RequestSerialNo. | | 17029046 | Number of items per request exceeds the limit. | | 17029047 | An ONGOING flash sale product cannot be updated. | | 17029048 | An ONGOING flash sale SKU cannot be updated. | | 17029049 | ActivityVersion is not supported. | | 17029050 | The value of quantity_limit and quantity_per_user must be -1 or in the range of [1, 99]. | | 17029051 | Product ID not found. | | 17029053 | The SKU ID does not match the product ID. | | 17029054 | Please limit the request frequency. | | 17029055 | Request Timeout | | 17029056 | Invalid product status. | | 17029058 | Unable to decrease buyer/num PurchaseLimit. | | 17029060 | The Categories of products is invalid | | 17029062 | Discount is below the limit, please confirm. | | 17029063 | SKU discount is below the limit, please confirm. | | 17029064 | Product is non-sellable. | | 17029065 | Target quota is less than the initial quota. | | 17029066 | Limit info cannot be changed or modified. | | 17029067 | Auction products are not eligible for promotions. | | 17029069 | Access denied. This activity does not belong to this shop and therefore cannot be modified. | | 17029074 | Eligible products and the gift products must not be the same product. | | 17029079 | Product is already assigned in another conflicting promotion. | | 17029103 | Partial of products have already been applied to another conflict promotion during the selected period. | | 17029104 | The product(s) selected have already been applied to another buy more save more promotion during the selected period. To proceed, edit the product list or change the promotion period. | | 17029113 | The number of products will exceed the maximum number of the promotion. | | 36009003 | Internal error. Please try again. If the issue persists after multiple attempts, please contact platform support. |

Nội dung này có hữu ích không?Hữu ích

Không hữu ích

PreviousNext