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

v2.product.get_weight_recommendation

POST /api/v2/product/get_weight_recommendation

Get recommended weight. Now only BR shop support to use this api to get recommended weight.

Đường dẫn Endpoint

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

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_namestringTruepaperName of the item in local language.
cover_image_idstringTruee9a76cf159c3e7f12510a7017e120467Image id of first product image.
category_idintTrue100061Shopee's mã định danh duy nhất for a category.
attribute_listobject[]True
attribute_idintTrue100019The Identify of each attribute.
attribute_value_listobject[]True
value_idintTrue1009Mã định danh duy nhất for value of this item attribute.
original_value_namestringFalsevalueValue name of this item attribute.
value_unitstringFalsekgValue unit of this item attribute.
brand_idintTrue100021Id of brand.
description_typestringTrueextendedType of description, values: See Data Definition- description_type (normal , extended).
descriptionstringFalseIf description_type is normal , Description information should be set by this field.
description_infoobjectFalseNew description field. Only whitelist sellers can use it. If you use the field, please upload the description_type=extended.
extended_descriptionobjectFalseIf description_type is extended , Description information should be set by this field.
field_listobject[]FalseField of extended description.
field_typestringFalsetextType of extended description field, values: See Data Definition- description_field_type (text , image).
textstringFalsedesc textIf field_type is text, text information will be set by this field.
image_infoobjectFalseIf field_type is image, image information will be set by this field.
image_idstringFalse564d29618a333337fa1798f20476c4f5Image id.

Tham số Response

TênKiểuMẫuMô tả
messagestringChi tiết lỗi nếu có lỗi xảy ra. Trống nếu không có lỗi.
warningstringIndicate waring details if hit waring. Empty if no waring happened.
request_idstring41b0c8c1c414ed0624bf1c9ebdb21d20The identifier for an API request for error tracking
responseobject
normal_weight_rangefloat[][0.1,0.5]Recommended weight range, in kg. If there are no recommended results, return empty.
errorstringerror_paramLoại lỗi nếu có lỗi xảy ra. Trống nếu không có lỗi.

Dữ liệu gửi

] } ], "brand_id": 100021, "description_type": "extended", "description_info": { "extended_description": { "field_list": [ { "field_type": "text", "text": "desc text", } ] } } }Unirest.setTimeouts(0, 0); HttpResponse<String> response = Unirest.post("https://open.admin.uat.shopee.io/api/v2/product/get\_weight\_recommendation?access\_token=access\_token&partner\_id=partner\_id&shop\_id=shop\_id&sign=sign&timestamp=timestamp") .header("Content-Type","application/json") .body("{ "attribute_list": [ { "attribute_id": 0, "attribute_value_list": [ { "original_value_name": "-", "value_id": 0, "value_unit": "-" } ] } ], "brand_id": 0, "category_id": 0, "cover_image_id": "xaszciahddms", "description": "-", "description_info": { "extended_description": { "field_list": [ { "field_type": "-", "image_info": { "image_id": "-" }, "text": "-" } ] } }, "description_type": "-", "item_name": "paper" }") .asString();<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://open.admin.uat.shopee.io/api/v2/product/get\_weight\_recommendation?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 => '{ "attribute_list": [ { "attribute_id": 0, "attribute_value_list": [ { "original_value_name": "-", "value_id": 0, "value_unit": "-" } ] } ], "brand_id": 0, "category_id": 0, "cover_image_id": "xaszciahddms", "description": "-", "description_info": { "extended_description": { "field_list": [ { "field_type": "-", "image_info": { "image_id": "-" }, "text": "-" } ] } }, "description_type": "-", "item_name": "paper" }', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), )); $response = curl_exec($curl); curl_close($curl); echo $response; curl --location --request POST 'https://open.admin.uat.shopee.io/api/v2/product/get\_weight\_recommendation?access\_token=access\_token&partner\_id=partner\_id&shop\_id=shop\_id&sign=sign&timestamp=timestamp'
--header 'Content-Type: application/json'
--data-raw '{ "attribute_list": [ { "attribute_id": 0, "attribute_value_list": [ { "original_value_name": "-", "value_id": 0, "value_unit": "-" } ] } ], "brand_id": 0, "category_id": 0, "cover_image_id": "xaszciahddms", "description": "-", "description_info": { "extended_description": { "field_list": [ { "field_type": "-", "image_info": { "image_id": "-" }, "text": "-" } ] } }, "description_type": "-", "item_name": "paper" }' import requests import json url = "https://open.admin.uat.shopee.io/api/v2/product/get\_weight\_recommendation?access\_token=access\_token&partner\_id=partner\_id&shop\_id=shop\_id&sign=sign&timestamp=timestamp" payload=json.dumps({ "attribute_list": [ { "attribute_id": 0, "attribute_value_list": [ { "original_value_name": "-", "value_id": 0, "value_unit": "-" } ] } ], "brand_id": 0, "category_id": 0, "cover_image_id": "xaszciahddms", "description": "-", "description_info": { "extended_description": { "field_list": [ { "field_type": "-", "image_info": { "image_id": "-" }, "text": "-" } ] } }, "description_type": "-", "item_name": "paper" }) headers = { 'Content-Type': 'application/json' } response = requests.request("POST",url,headers=headers, data=payload, allow_redirects=False) print(response.text)

, "error": "" }