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

v2.product.update_kit_item

POST /api/v2/product/update_kit_item

Update the kit basic information and kit components, only support adding kit variations and updating existing kit variation’s image, price, and model_sku, don’t support deleting existing kit variations and updating the items, main component and quantity per kit of existing kit variations.

Đường dẫn Endpoint

URL: https://partner.shopeemobile.com/api/v2/product/update_kit_item

Tham số chung

TênKiểuMẫuMô tả
partner_idint1Partner ID được gán khi đăng ký thành công. Bắt buộc cho tất cả các yêu cầu.
timestamptimestamp1610000000Dùng để chỉ định thời gian của yêu cầu. Bắt buộc cho tất cả các yêu cầu. Hết hạn sau 5 phút.
access_tokenstringc09222e3fc40ffb25fc947f738b1abf1Token truy cập API, dùng để xác định quyền của bạn đối với API. Có thể sử dụng nhiều lần và hết hạn sau 4 giờ.
shop_idint600000Mã định danh duy nhất của Shopee cho một cửa hàng. Tham số bắt buộc cho hầu hết các API.
signstringe318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2Signature generated by partner_id, api path, timestamp, access_token, shop_id and partner_key via HMAC-SHA256 hashing algorithm. More details: https://open.shopee.com/documents?module=87&type=2&id=58&version=2

Tham số Request

TênKiểuBắt buộcMẫuMô tả
item_idint64True28001430ID of kit item.
item_settingobjectFalse
item_namestringFalseitem name sampleTên của this kit item.
imagesobjectFalseItem images with 1:1 ratio.
image_id_liststring[]TrueID of image.
long_imagesobjectFalseItem images with 3:4 ratio.
image_id_liststring[]TrueID of image.
video_upload_idstring[]False["sg_f4bde9bc-ff3c-485e-a6dd-3161dab4b942_000000"]Video upload ID returned from video uploading API. Only accept one video_upload_id.
descriptionstringFalseitem description sampleIf description_type is normal, description information should be set by this field.
description_infoobjectFalseRich text description field. Only whitelist sellers can use it. If you use the field, please upload the description_type=extended otherwise api will return error. If you don't use this field, you don't need to upload the description_type or upload description_type=normal
extended_descriptionobjectTrueIf description_type is extended , Description information should be set by this field.
field_listobject[]TrueField of extended description.
field_typestringTrueType of extended description field. See Data Definition- description_field_type (text , image).
textstringTrueIf field_type is text, text information will be set by this field.
image_infoobjectFalseIf field_type is image, image will be set by this field.
image_idstringTrueImage id.
description_typestringFalseextendedSee Data Definition- description_type (normal , extended). If you want to use extended_description, this field must be inputed.
logistic_infoobject[]FalseKênh vận chuyển setting.
logistic_idint64TrueID of the channel.
enabledbooleanTrueWhether channel is enabled for this kit item.
shipping_feefloatFalsePhí vận chuyển. Only needed when logistics fee_type = CUSTOM_PRICE.
size_idint64FalseSize ID. Only needed when logistic fee_type = SIZE_SELECTION.
is_freebooleanFalseWhether cover phí vận chuyển for buyer.
unlistedbooleanFalsefalseUnlist or not.
item_skustringFalseitem sku sampleSKU tag of item
weightfloatFalse1.1The weight of this kit item, the unit is KG.
dimensionobjectFalseThe dimension of this kit item.
package_lengthint32True11The length of package for this kit item, the unit is CM.
package_widthint32True11The width of package for this kit item, the unit is CM.
package_heightint32True11The height of package for this kit item, the unit is CM.
pre_orderobjectFalsePre order setting.
is_pre_orderbooleanTruefalseWhether kit item is pre order.
days_to_shipint64False10The guaranteed số ngày giao hàng orders. Please get the days_to_ship range from get_kit_item_limit api.
model_listobject[]FalseModel info list, model number at most 9.
model_idint64False1002066586922ID of this kit model.
tier_indexint64[]True[2]Tier index of this kit model.
model_skustringFalsemodel sku sampleSeller SKU of this kit model, model_sku length information needs to be no more than 100 characters.
original_pricefloatFalse38.3Giá gốc of this kit model.
component_listobject[]FalsePlease get the amount of item/model that one kit model support from get_kit_item_limit.
component_item_idint64True892568916ID of the item that composes this kit model.
component_model_idint64False8501462426ID of the model that composes this kit model.
quantityint64True2The amount of the item/model that composes this kit model.
main_componentbooleanFalsefalseWhether this item/model is the main component for this kit. One kit item can only have one item/model as main component.
tier_variation_listobject[]FalseBiến thể theo cấp info list. Only support one biến thể theo cấp, and each kit item can have from 1 to 9 kit variations.
namestringFalseBiến thể theo cấp name.
option_listobject[]TrueBiến thể theo cấp option info list.
optionstringTrueOption name.
imageobjectFalseOption image.
image_idstringTrueID of image. If you choose to define, you need to define an image for all options.
sync_settingobjectFalse
auto_sync_dtsbooleanTrueAuto sync the pre_order setting from main component or not.

Tham số Response

TênKiểuMẫuMô tả
errorstring
messagestring
warningstring
request_idstring

Dữ liệu gửi

, "item_setting": { "item_name": "tên sản phẩm sample", "images": { "image_id_list": [ "br-11134207-7r98o-lzytw8irwzy729" ] }, "description_type": "extended", "description_info": { "extended_description": { "field_list": [ { "field_type": "text", "text": "mô tả sản phẩm sample " } ] } }, "logistic_info": [ { "logistic_id": 90003, "enabled": true } ], "weight": 1.1, "model_list": [ { "model_id": 19250366421, "tier_index": [ 0 ], "original_price": 19, "component_list": [ { "component_item_id": 885138319, "component_model_id": 8501469325, "main_component": false, "quantity": 1 }, { "component_item_id": 892571466, "component_model_id": 18500721259, "main_component": true, "quantity": 1 } ] }, { "model_id": 19250366422, "tier_index": [ 1 ], "original_price": 12, "component_list": [ { "component_item_id": 885138319, "component_model_id": 8501469324, "main_component": false, "quantity": 2 }, { "component_item_id": 892571466, "component_model_id": 18500721256, "main_component": false, "quantity": 3 } ] }, { "model_id": 0, "tier_index": [ 2 ], "original_price": 12, "component_list": [ { "component_item_id": 892568916, "component_model_id": 8501462425, "main_component": false, "quantity": 1 }, { "component_item_id": 892570838, "component_model_id": 9250740314, "main_component": false, "quantity": 2 } ] } ], "tier_variation_list": [ { "name": " ", "option_list": [ { "option": "Kit Variation 1" }, { "option": "Kit Variation 2" }, { "option": "Kit Variation 3" } ] } ] } }Unirest.setTimeouts(0, 0); HttpResponse<String> response = Unirest.post("https://partner.uat.shopeemobile.com/api/v2/product/update\_kit\_item?access\_token=access\_token&partner\_id=partner\_id&shop\_id=shop\_id&sign=sign&timestamp=timestamp") .header("Content-Type","application/json") .body("{ "item_id": 0, "item_setting": { "description": "-", "description_info": { "extended_description": { "field_list": [ { "field_type": "-", "image_info": { "image_id": "-" }, "text": "-" } ] } }, "description_type": "-", "dimension": { "package_height": 0.1, "package_length": 0.1, "package_width": 0.1 }, "images": { "image_id_list": [ "-" ] }, "item_name": "-", "item_sku": "-", "logistic_info": [ { "enabled": true, "is_free": true, "logistic_id": 0, "shipping_fee": 0.1, "size_id": 0 } ], "long_images": { "image_id_list": [ "-" ] }, "model_list": [ { "component_list": [ { "component_item_id": 0, "component_model_id": 0, "main_component": true, "quantity": 0 } ], "model_id": 0, "model_sku": "-", "original_price": 0.1 } ], "pre_order": { "days_to_ship": 0, "is_pre_order": true }, "tier_variation_list": [ { "name": "-", "option_list": [ { "image": { "image_id": "-" }, "option": "-" } ] } ], "unlisted": true, "video_upload_id": [ "-" ], "weight": 0.1 }, "sync_setting": { "auto_sync_dts": true } }") .asString();<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://partner.uat.shopeemobile.com/api/v2/product/update\_kit\_item?access\_token=access\_token&partner\_id=partner\_id&shop\_id=shop\_id&sign=sign&timestamp=timestamp', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => '{ "item_id": 0, "item_setting": { "description": "-", "description_info": { "extended_description": { "field_list": [ { "field_type": "-", "image_info": { "image_id": "-" }, "text": "-" } ] } }, "description_type": "-", "dimension": { "package_height": 0.1, "package_length": 0.1, "package_width": 0.1 }, "images": { "image_id_list": [ "-" ] }, "item_name": "-", "item_sku": "-", "logistic_info": [ { "enabled": true, "is_free": true, "logistic_id": 0, "shipping_fee": 0.1, "size_id": 0 } ], "long_images": { "image_id_list": [ "-" ] }, "model_list": [ { "component_list": [ { "component_item_id": 0, "component_model_id": 0, "main_component": true, "quantity": 0 } ], "model_id": 0, "model_sku": "-", "original_price": 0.1 } ], "pre_order": { "days_to_ship": 0, "is_pre_order": true }, "tier_variation_list": [ { "name": "-", "option_list": [ { "image": { "image_id": "-" }, "option": "-" } ] } ], "unlisted": true, "video_upload_id": [ "-" ], "weight": 0.1 }, "sync_setting": { "auto_sync_dts": true } }', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), )); $response = curl_exec($curl); curl_close($curl); echo $response; curl --location --request POST 'https://partner.uat.shopeemobile.com/api/v2/product/update\_kit\_item?access\_token=access\_token&partner\_id=partner\_id&shop\_id=shop\_id&sign=sign&timestamp=timestamp'
--header 'Content-Type: application/json'
--data-raw '{ "item_id": 0, "item_setting": { "description": "-", "description_info": { "extended_description": { "field_list": [ { "field_type": "-", "image_info": { "image_id": "-" }, "text": "-" } ] } }, "description_type": "-", "dimension": { "package_height": 0.1, "package_length": 0.1, "package_width": 0.1 }, "images": { "image_id_list": [ "-" ] }, "item_name": "-", "item_sku": "-", "logistic_info": [ { "enabled": true, "is_free": true, "logistic_id": 0, "shipping_fee": 0.1, "size_id": 0 } ], "long_images": { "image_id_list": [ "-" ] }, "model_list": [ { "component_list": [ { "component_item_id": 0, "component_model_id": 0, "main_component": true, "quantity": 0 } ], "model_id": 0, "model_sku": "-", "original_price": 0.1 } ], "pre_order": { "days_to_ship": 0, "is_pre_order": true }, "tier_variation_list": [ { "name": "-", "option_list": [ { "image": { "image_id": "-" }, "option": "-" } ] } ], "unlisted": true, "video_upload_id": [ "-" ], "weight": 0.1 }, "sync_setting": { "auto_sync_dts": true } }' import requests import json url = "https://partner.uat.shopeemobile.com/api/v2/product/update\_kit\_item?access\_token=access\_token&partner\_id=partner\_id&shop\_id=shop\_id&sign=sign&timestamp=timestamp" payload=json.dumps({ "item_id": 0, "item_setting": { "description": "-", "description_info": { "extended_description": { "field_list": [ { "field_type": "-", "image_info": { "image_id": "-" }, "text": "-" } ] } }, "description_type": "-", "dimension": { "package_height": 0.1, "package_length": 0.1, "package_width": 0.1 }, "images": { "image_id_list": [ "-" ] }, "item_name": "-", "item_sku": "-", "logistic_info": [ { "enabled": True, "is_free": True, "logistic_id": 0, "shipping_fee": 0.1, "size_id": 0 } ], "long_images": { "image_id_list": [ "-" ] }, "model_list": [ { "component_list": [ { "component_item_id": 0, "component_model_id": 0, "main_component": True, "quantity": 0 } ], "model_id": 0, "model_sku": "-", "original_price": 0.1 } ], "pre_order": { "days_to_ship": 0, "is_pre_order": True }, "tier_variation_list": [ { "name": "-", "option_list": [ { "image": { "image_id": "-" }, "option": "-" } ] } ], "unlisted": True, "video_upload_id": [ "-" ], "weight": 0.1 }, "sync_setting": { "auto_sync_dts": True } }) headers = { 'Content-Type': 'application/json' } response = requests.RPCRequest("POST",url,headers=headers, data=payload, allow_redirects=False) print(response.text)