快工助手跨境电商知识与商机助手

Significant OpenAPI Updates

Shopee 官方资料 · Shopee Open Platform 变更通知(Announcements) · 适合开发者

stable本次发布有变化全部展示

来自 Shopee 官方资料快照 ·

打开官方原文 ↗
  1. 当前资料结构化阅读页
  2. 固定快照已留存,可追溯
  3. 官方原文可核对
查看技术与溯源信息
平台 / profile
Shopee / profile.shopee.announcements
语言
en
发布版本
cn-20260909-2
标签
zhuge/sourceplatform/shopeeaudience/developercategory/announcementtopic/apitopic/api-add-on-dealtopic/api-bundle-dealtopic/api-discounttopic/api-producttopic/changelogtopic/developertopic/openapi-updates

资料正文

§1 Significant OpenAPI Updates

Dear developer,

Please note the following changes:

1.We will launch the Floating Reserved Stock function, so we have made relevant adjustments to the stock fields. This function is only available in V2.0 api, not supported by V1.0 api.This function mainly affects sellers with Shopee stock. In order for you to serve all sellers normally in the future, please switch to the new stock field of V2.0 as soon as possible, so as to obtain the correct stock value and modify the stock correctly. In the future we will also deprecate the V2.0 old stock field. Adjustment points include:

v2.product.get_item_base_info, v2.product.get_model_list api added stock_info_v2 field

v2.product.add_item, v2.product.init_tier_variation, v2.product.add_model, v2.product.update_stock api added seller_stock field

v2.product.get_item_promotion added promotion_stock_info_v2 field

When the seller has the function of Floating Reserved Stock, during the promotion, it is necessary to ensure total stock(including Seller Stock and Shopee Stock) should be larger than or equal to real-time reserved stock.

New field meaning:

Field NameMeaningAre there location ids
total_reserved_stockStock reserved for promotionNo
seller_stockSeller-managed stockYes
total_available_stockStock can be sold currentlyNo
shopee_stockShopee warehouse stockYes

Please note that the meaning of the new field seller_stock and the old field normal stock are different.

You can learn more about the scenarios of Floating Reserved Stock through this FAQ1

You can learn more about stock related errors through this FAQ2

Effective Date on Live: Lived

Related APIs:

v2.product.get_item_base_info

v2.product.get_model_list

v2.product.add_item

v2.product.init_tier_variation

v2.product.add_model

v2.product.update_stock

v2.product.get_item_promotion

2.In order to reduce the error when calculating volumetric weight. Shopee will support 1 decimal place for dimension field. The function of supporting 1 decimal place will depend on different regions and shop types.

If the shop supports, the shop will be able to pass 1 decimal place for dimension related parameters which includes package_length、package_width、package_height in both openapi v1 and v2 but will get an error message like "dimension width decimal place is invalid" when you are trying to pass 2 or more decimal places.

If the shop doesn't support, the shop will be unable to pass 1 decimal place for dimension related parameters successfully, Shopee will make your input value "round up" to be an integer automatically no matter how many places of decimal you've passed.

Sample of "round up":

Your request:"dimension": { "package_height": 6.18, "package_length": 6.18, "package_width": 6.18 } or { "package_height": 6.1, "package_length": 6.1, "package_width": 6.1 }

The actual result:"dimension": { "package_length": 7, "package_width": 7, "package_height": 7 }

Effective Date on Live:2022/5/25

Related APIs

item.Add

item.UpdateItem

item.GetItemDetail

v2.product.add_item

v2.product.update_item

v2.product.get_item_base_info

The initial configuration is as below, if there are any changes in the future, Shopee will inform sellers.

CB shopsLocal shops
Support 1 decimal placeALLSG/MY/PH/VN/PL/ES
Not support 1 decimal place\TH/TW/ID/BR/MX/CO/CL/AR

3.Added Two new Error Codes “discount.item_in_promotion_too_many” and “discount.item_in_promotion_too_many_whitelist” with corresponding error message “A maximum of 1000 items can be uploaded in one promotion” and “A maximum of 15,000 items can be uploaded in one promotion” to the response of Discount related apis.These updates aimed to extend the item limit to be added into discount promotions, please synchronize and update in time.

Effective Date on Live: 2022/5/25

Related APIs:

v1.discount.items.add

v1.discount.items.updatem

v2.discount.add_discount_item

v2.discount.update_discount_item

4.Added a new Error Code ‘discount.error_item_under_block_categories’ and according Error Message “This product is under a category that is prohibited from promotions due to regulations in your country” to the response of the Discount related apis to prohibit products under blocked categories to be added into discount promotions, please synchronize and update in time.

Effective Date on Live: 2022/5/25

Related APIs:

v1.discount.items.add

v1.discount.items.update

v2.discount.add_discount_item

v2.discount.update_discount_item

5.For Bundle Deal:

Added a new Error Code ‘bundle.bundle_deal_item_under_block_categories’ and according Error Message “This product is under a category that is prohibited from promotions due to regulations in your country” to the response of the Bundle Deal related apis to prohibit products under blocked categories to be added into Bundle Deal promotions, please synchronize and update in time.

For Add-On Deal:

Added a new Error Code ‘add_on.add_on_deal_item_under_block_categories’ and according Error Message “This product is under a category that is prohibited from promotions due to regulations in your country” to the response of the Add-On Deal apis to prohibit products under blocked categories to be added into Add-On Deal promotions, please synchronize and update in time.

Effective Date on Live: 2022/5/25

Related APIs:

Bundle Deal:

v2.bundle_deal.add_bundle_deal_item

v2.bundle_deal.update_bundle_deal_item

Add-On Deal:

v2.add_on_deal.add_add_on_deal_main_item

v2.add_on_deal.add_add_on_deal_sub_item

v2.add_on_deal.update_add_on_deal_main_item

v2.add_on_deal.update_add_on_deal_sub_item

尊敬的开发者

请留意以下变动:

1.我们将会推出共享活动库存的功能,因此我们对相关库存字段做了相关的调整。请注意,此功能只有V2.0 api支持,V1.0 api不支持,目前这个功能主要影响有shopee_stock的卖家。为了您后续能正常服务所有卖家,请尽快切换V2.0新库存字段,从而获取到正确的库存值和正确修改库存,将来我们也会弃用V2.0旧库存字段。调整点包括

1.v2.product.get_item_base_info、v2.product.get_model_list 新增stock_info_v2 字段

2.v2.product.add_item 、 v2.product.init_tier_variation 、v2.product.add_model、v2.product.update_stock 新增seller_stock字段

3.v2.product.get_item_promotion 新增promotion_stock_info_v2字段当卖家拥有共享活动库存功能,在活动期间,需要保证总库存大于或等于活动库存。

新字段含义如下:

字段名含义是否有location id 概念
total_reserved_stock卖家设置的所有活动库存
seller_stock卖家管理的库存
total_available_stock当前可售卖库存
shopee_stockShopee仓库的库存

请注意新字段seller_stock 和旧字段normal stock 含义不一样

您可以通过这个FAQ1了解到更多库存变动的场景

您可以通过这个FAQ2了解到更多库存相关的报错

上线时间:已上线

影响接口:

v2.product.get_item_base_info

v2.product.get_model_list

v2.product.add_item

v2.product.init_tier_variation

v2.product.add_model

v2.product.update_stock

v2.product.get_item_promotion

  1. 为了去减少在计算体积重量时精确度导致的误差,Shopee将会支持尺寸字段上传一位小数。我们将会基于站点和shop类型来支持一位小数的功能。

如果shop支持,店铺将能够使用v1或v2接口为包括package_length、package_width、package_height在内的尺寸相关字段传一位小数的值,但如果传两位或更多位数的小数值,将会报错如下message:"dimension width decimal place is invalid"

如果shop不支持,店铺将无法成功为尺寸相关字段传入一位小数,且无论您传入几位小数,shopee都会将您传入的数值进行向上取整。

向上取整示例:

你的请求:"dimension": { "package_height": 6.18, "package_length": 6.18, "package_width": 6.18 } or { "package_height": 6.1, "package_length": 6.1, "package_width": 6.1 }

实际结果:"dimension": { "package_length": 7, "package_width": 7, "package_height": 7 }

上线时间:2022/5/25

影响接口:

item.Add

item.UpdateItem

item.GetItemDetail

v2.product.add_item

v2.product.update_item

v2.product.get_item_base_info

初始配置如下表,后续如有配置变更,shopee将会提前通知卖家。

CB 店铺Local 店铺
支持传1位小数ALLSG/MY/PH/VN/PL/ES
不支持传1位小数\TH/TW/ID/BR/MX/CO/CL/AR
  1. 在Discount相关接口新增报错 Error Code为discount.item_in_promotion_too_many (对应 Error Message 为 “A maximum of 1000 items can be uploaded in one promotion” ), 以及新增针对白名单用户的Error Code =discount.item_in_promotion_too_many_whitelist (对应 Error Message 为 “A maximum of 15,000 items can be uploaded in one promotion” )。本次变动用于延长要添加到行销活动中的商品限制,请及时同步更新。

上线时间: 2022/5/25

影响接口:

v1.discount.items.add

v1.discount.items.updatem

v2.discount.add_discount_item

v2.discount.update_discount_item

  1. 在Discount相关接口的返回参数中新增 Error Code =discount.error_item_under_block_categories (对应 Error Message 为 “This product is under a category that is prohibited from promotions due to regulations in your country” 的字段信息),以保障不符合当地政府规定的商品不会加入到行销活动中,请及时进行同步更新。

上线时间:2022/5/25

影响接口:

v1.discount.items.add

v1.discount.items.update

v2.discount.add_discount_item

v2.discount.update_discount_item

  1. 促销组合:

在Bundle Deal相关接口的返回参数中新增 Error Code = bundle.bundle_deal_item_under_block_categories(对应 Error Message 为 “This product is under a category that is prohibited from promotions due to regulations in your country” 的字段信息,以保障不符合当地政府规定的商品不会加入到行销活动中,请及时进行同步更新。

在Add-On Deal相关接口的返回参数中新增 Error Code = add_on.add_on_deal_item_under_block_categories(对应 Error Message 为 “This product is under a category that is prohibited from promotions due to regulations in your country” 的字段信息,以保障不符合当地政府规定的商品不会加入到行销活动中,请及时进行同步更新。

上线时间:2022/5/25

影响接口:

促销组合:

v2.bundle_deal.add_bundle_deal_item

v2.bundle_deal.update_bundle_deal_item

加价购:

v2.add_on_deal.add_add_on_deal_main_item

v2.add_on_deal.add_add_on_deal_sub_item

v2.add_on_deal.update_add_on_deal_main_item

v2.add_on_deal.update_add_on_deal_sub_item

#