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ên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| partner_id | int | 1 | Partner 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. |
| timestamp | timestamp | 1610000000 | Dù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_token | string | c09222e3fc40ffb25fc947f738b1abf1 | Token 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_id | int | 600000 | Mã đị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. |
| sign | string | e318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2 | Signature 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ên | Kiểu | Bắt buộc | Mẫu | Mô tả |
|---|---|---|---|---|
| item_id | int64 | True | 28001430 | ID of kit item. |
| item_setting | object | False | ||
| item_name | string | False | item name sample | Tên của this kit item. |
| images | object | False | Item images with 1:1 ratio. | |
| image_id_list | string[] | True | ID of image. | |
| long_images | object | False | Item images with 3:4 ratio. | |
| image_id_list | string[] | True | ID of image. | |
| video_upload_id | string[] | False | ["sg_f4bde9bc-ff3c-485e-a6dd-3161dab4b942_000000"] | Video upload ID returned from video uploading API. Only accept one video_upload_id. |
| description | string | False | item description sample | If description_type is normal, description information should be set by this field. |
| description_info | object | False | Rich 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_description | object | True | If description_type is extended , Description information should be set by this field. | |
| field_list | object[] | True | Field of extended description. | |
| field_type | string | True | Type of extended description field. See Data Definition- description_field_type (text , image). | |
| text | string | True | If field_type is text, text information will be set by this field. | |
| image_info | object | False | If field_type is image, image will be set by this field. | |
| image_id | string | True | Image id. | |
| description_type | string | False | extended | See Data Definition- description_type (normal , extended). If you want to use extended_description, this field must be inputed. |
| logistic_info | object[] | False | Kênh vận chuyển setting. | |
| logistic_id | int64 | True | ID of the channel. | |
| enabled | boolean | True | Whether channel is enabled for this kit item. | |
| shipping_fee | float | False | Phí vận chuyển. Only needed when logistics fee_type = CUSTOM_PRICE. | |
| size_id | int64 | False | Size ID. Only needed when logistic fee_type = SIZE_SELECTION. | |
| is_free | boolean | False | Whether cover phí vận chuyển for buyer. | |
| unlisted | boolean | False | false | Unlist or not. |
| item_sku | string | False | item sku sample | SKU tag of item |
| weight | float | False | 1.1 | The weight of this kit item, the unit is KG. |
| dimension | object | False | The dimension of this kit item. | |
| package_length | int32 | True | 11 | The length of package for this kit item, the unit is CM. |
| package_width | int32 | True | 11 | The width of package for this kit item, the unit is CM. |
| package_height | int32 | True | 11 | The height of package for this kit item, the unit is CM. |
| pre_order | object | False | Pre order setting. | |
| is_pre_order | boolean | True | false | Whether kit item is pre order. |
| days_to_ship | int64 | False | 10 | The guaranteed số ngày giao hàng orders. Please get the days_to_ship range from get_kit_item_limit api. |
| model_list | object[] | False | Model info list, model number at most 9. | |
| model_id | int64 | False | 1002066586922 | ID of this kit model. |
| tier_index | int64[] | True | [2] | Tier index of this kit model. |
| model_sku | string | False | model sku sample | Seller SKU of this kit model, model_sku length information needs to be no more than 100 characters. |
| original_price | float | False | 38.3 | Giá gốc of this kit model. |
| component_list | object[] | False | Please get the amount of item/model that one kit model support from get_kit_item_limit. | |
| component_item_id | int64 | True | 892568916 | ID of the item that composes this kit model. |
| component_model_id | int64 | False | 8501462426 | ID of the model that composes this kit model. |
| quantity | int64 | True | 2 | The amount of the item/model that composes this kit model. |
| main_component | boolean | False | false | Whether this item/model is the main component for this kit. One kit item can only have one item/model as main component. |
| tier_variation_list | object[] | False | Biế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. | |
| name | string | False | Biến thể theo cấp name. | |
| option_list | object[] | True | Biến thể theo cấp option info list. | |
| option | string | True | Option name. | |
| image | object | False | Option image. | |
| image_id | string | True | ID of image. If you choose to define, you need to define an image for all options. | |
| sync_setting | object | False | ||
| auto_sync_dts | boolean | True | Auto sync the pre_order setting from main component or not. |
Tham số Response
| Tên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| error | string | ||
| message | string | ||
| warning | string | ||
| request_id | string |
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×tamp=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×tamp=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×tamp=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×tamp=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)