stable本次发布有变化全部展示
来自 Shopee 官方资料快照 ·
- 当前资料结构化阅读页
- 固定快照已留存,可追溯
- 官方原文可核对
资料正文
§1 v2.global_product.add_global_item
Add global item. Only for China mainland sellers using China Seller Centre(CNSC). More details in https://shopee.cn/cooperate/46/53/926.
§2 Overview
Overview
| Field | Value |
|---|---|
| Module | GlobalProduct |
| API type | Merchant |
| HTTP method | POST |
| Path | /api/v2/global_product/add_global_item |
| Production URL | https://partner.shopeemobile.com/api/v2/global_product/add_global_item |
| Sandbox URL | https://partner.test-stable.shopeemobile.com/api/v2/global_product/add_global_item |
| Rate limit | [0, 0, 0] |
| Permission | ERP System; Seller In House System; Product Management |
§3 Request parameters
Request parameters
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| category_id | int64 | Yes | 14695 | Category id of global item. |
| global_item_name | string | Yes | item name sample | Name of global item. |
| description | string | Yes | item description sample | Description of global item. |
| global_item_sku | string | No | item sku sample | Sku of global item. |
| image | object | No | Image information of global item. | |
| image.image_id_list | string[] | Yes | ["c54265d475b85e00ffb2404585e32b6f", "6fb33d484f232510b5f9b169f2758322"] | Image id list of global item. |
| original_price | float | Yes | 95.5 | Original price of global item. |
| normal_stock | int64 | No | 100 | Normal stock of global item. |
| weight | float | Yes | 100.5 | Weight of global item. |
| dimension | object | No | Dimension information of global item. | |
| dimension.package_length | int64 | Yes | 11 | Package length of global item. |
| dimension.package_width | int64 | Yes | 11 | Package width of global item. |
| dimension.package_height | int64 | Yes | 11 | Package height of global item. |
| pre_order | object | Yes | Preorder information of global item. | |
| pre_order.days_to_ship | int64 | Yes | 3 | Days to ship. |
| condition | string | Yes | NEW | Condition of global item, USED、Used and used will be mapped to Used; NEW、New and new will be mapped to New. |
| video_upload_id | string[] | No | ["00a2258551b5a2f0a7c283f877330f93"] | Video upload id of global item. Only accept one video_upload_id at most. |
| brand | object | No | ||
| brand.brand_id | int64 | No | 1078 | Id of brand. |
| brand.original_brand_name | string | No | Nike | Original name of brand. |
| attribute_list | object[] | No | Item attributes. | |
| attribute_list.attribute_id | int64 | No | 1007105 | ID of attribute. |
| attribute_list.attribute_value_list | object[] | No | ||
| attribute_list.attribute_value_list.value_id | int64 | No | 38173 | ID of attribute value. In the following cases, the value id needs to be uploaded as 0, and original_value_name is mandatory, needs to be filled in customized value. (1) AttributeInputType is TEXT_FILED; (2) AttributeInputType is COMBO_BOX or MULTIPLE_SELECT_COMBO_BOX, and the seller want to fill in a customized value. |
| attribute_list.attribute_value_list.original_value_name | string | No | Red | Name of attribute value. original_value_name from global_product.get_attributes api. If value id=0, this field is required. If AttributeType is DATE_TYPE or TIMESTAMP_TYPE, you can upload timestamp(string type) as the original_value_name. |
| attribute_list.attribute_value_list.value_unit | string | No | kg | Unit of attribute value.(quantitative attribute only) |
| description_info | object | No | New description field. New 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 | |
| description_info.extended_description | object | No | If description_type is extended , Description information should be set by this field. | |
| description_info.extended_description.field_list | object[] | No | Field of extended description. | |
| description_info.extended_description.field_list.field_type | string | No | type of extended description field :values: See Data Definition- description_field_type (text , image). | |
| description_info.extended_description.field_list.text | string | No | If field_type is text, text information will be set by this field. | |
| description_info.extended_description.field_list.image_info | object | No | If field_type is image,image url will be set by this field. | |
| description_info.extended_description.field_list.image_info.image_id | string | No | Image id. | |
| description_type | string | No | Values: See Data Definition- description_type (normal , extended). If you want to use extended_description, this field must be inputed | |
| seller_stock | object[] | No | seller_stock of global item. | |
| seller_stock.location_id | string | No | CNZ | location_id of stock |
| seller_stock.stock | int32 | Yes | 100 | stock |
| ds_cat_rcmd_id | string | No | category recommendation service id | |
| size_chart_info | object | No | ||
| size_chart_info.size_chart | string | No | ID of size chart image. If you want to remove the image size chart of the item, please pass the "size_chart" empty.; You only need to fill out either the image or template. If both are filled, only the template will be kept.; Notes: Both CB shops and local shops are supported to set "size_chart". | |
| size_chart_info.size_chart_id | int64 | No | ID of template size chart. If you want to remove the template size chart of the item, please pass the "size_chart_id" as 0.; You only need to fill out either the image or template. If both are filled, only the template will be kept.; Notes: Both local shops and CB shops are supported to set "size_chart_id" now and seller need set the size_chart template in CBSC in advance |
§4 Response parameters
Response parameters
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| error | string | Indicate error type if hit error. Empty if no error happened. | ||
| message | string | Indicate error details if hit error. Empty if no error happened. | ||
| warning | string | Warning message. | ||
| request_id | string | 98eae35efff24dd0974c21a847127184 | The identifier for an API request for error tracking. | |
| response | object | |||
| response.global_item_id | int64 | 1007962 | Id of added global item. |
§5 Common parameters
Common parameters
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| partner_id | int | 1 | Partner ID is assigned upon registration is successful. Required for all requests. | |
| timestamp | timestamp | 1610000000 | This is to indicate the timestamp of the request. Required for all requests. Expires in 5 minutes. | |
| access_token | string | c09222e3fc40ffb25fc947f738b1abf1 | The token for API access, using to identify your permission to the api. Valid for multiple use and expires in 4 hours. | |
| merchant_id | int | 1 | Shopee’s unique identifier for a merchant. Required for all merchant level requests(CB CNSC user calling global product related APIs). | |
| sign | string | e318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2 | Signature generated by partner_id, api path, timestamp, access_token, merchant_id and partner_key via HMAC-SHA256 hashing algorithm. More details: https://open.shopee.com/documents?module=87&type=2&id=58&version=2 |
§6 Request samples
Request samples
§7 Payload
Payload
{
"attribute_list":{
"attribute_id":1007105,
"attribute_value_list":{
"original_value_name":"Red",
"value_id":38173,
"value_unit":"kg"
}
},
"brand":{
"brand_id":1078,
"original_brand_name":"Nike"
},
"category_id":14695,
"condition":"NEW",
"description":"item description sample",
"description_info":{
"extended_description":{
"field_list":{
"field_type":"",
"image_info":{
"image_id":""
},
"text":""
}
}
},
"description_type":"",
"dimension":{
"package_height":11,
"package_length":12,
"package_width":13
},
"global_item_name":"item name sample",
"global_item_sku":"item sku sample",
"image":{
"image_id_list":"[\"c54265d475b85e00ffb2404585e32b6f\", \"6fb33d484f232510b5f9b169f2758322\"]"
},
"normal_stock":100,
"original_price":95.5,
"pre_order":{
"days_to_ship":3
},
"video_upload_id":"[\"00a2258551b5a2f0a7c283f877330f93\"]",
"weight":100.5,
"seller_stock":[
{
"location_id":"CNZ",
"stock":100
}
]
}
§8 Errors
Errors
| Error | Description | Solution |
|---|---|---|
| add_on.add_on_deal_expired | The expired add on deal can't be edited | |
| error_network | Inner http call failed | |
| error_data | parse data failed | |
| error_data | data not exist | |
| error_param | parameter invalid | |
| error_param | The information you queried is not found. | |
| error_param | Wrong parameters, detail: {msg}. | |
| error_server | Something wrong. Please try later. | |
| error_param | request not from gateway | |
| error_merchant_not_found | Merchant_id is not found. | |
| error_param | Invalid category. | |
| error_param | Invalid attribute. {{.error_info}} | |
| error_param | Parameter is not match the constraints, {{.error_info}}. | |
| error_param | Invalid dimension. | |
| error_invalid_days_to_ship | Invalid days_to_ship. | |
| error_invalid_category_attribute | Category and attribute not match. | |
| error_invalid_brand | Invalid brand | |
| error_invalid_brand | Brand ID value should be "0". | |
| error_invalid_brand | Brand name required | |
| error_invalid_brand | Brand ID required | |
| error_incalid_brand | Brand ID or brand name required | |
| error_invalid_attribute | Mandatory attribute information required | |
| error_invalid_brand | Brand information required | |
| error_busi_cannot_get_category_path | Get category path failed. please try later. | |
| error_busi_add_global_item_failed | Add global item failed, please try later. {{.error_info}} | |
| error_busi_global_item_dimension_over_limit | Global item dimension is over limit. | |
| error_busi_global_item_weight_over_limit | Global item weight is over limit. | |
| error_busi_global_tier_variation_over_limit | Global item tier_variation is over limit. | |
| error_busi_global_item_tier_option_over_limit | Option of tier_variation is over limit. | |
| error_busi_global_item_sku_over_limit | Global item sku is over limit. | |
| error_busi_item_days_to_ship_invalid | Global item days_to_ship is invalid. | |
| error_busi_region_not_supported | Unsupport region. | |
| error_invalid_category | Invalid category ID {{.error_info}} | |
| error_busi_attribute_error | Attribute NCC value is invalid | |
| error_busi_attribute_error | Attribute NCC is mandatory | |
| error_busi_attribute_error | Attribute BSMI value is invalid | |
| error_busi_attribute_error | Attribute BSMI is mandatory | |
| error_attribute_fda_error | Attribute FDA value is invalid | |
| error_inner | Our system is taking some time to respond, please try later. | |
| error_inner | System error, please try again later or contact the OpenAPI support team. | |
| error_updat_mtsku_fail | {{.error_info}} | |
| error_check_language_fail | check language fail, {{.error_info}} | |
| error_price_agp_too_large | the max price is 7 lager the min price | |
| error_check_luc_fail | {{.error_info}} | |
| error_check_luc_fail | {{.error_info}} | |
| error_check_luc_fail | {{.error_info}} | |
| error_check_luc_fail | {{.error_info}} | |
| error_check_luc_fail | {{.error_info}} | |
| error_check_luc_fail | {{.error_info}} | |
| error_check_luc_fail | {{.error_info}} | |
| error_check_luc_fail | {{.error_info}} | |
| error_check_luc_fail | {{.error_info}} | |
| error_check_luc_fail | {{.error_info}} | |
| error_check_luc_fail | {{.error_info}} | |
| error_repeated_mtsku | A similar product has already been uploaded | |
| error_title_len_no_pass | {{.error_info}} | |
| error_desc_len_no_pass | {{.error_info}} | |
| error_image_hight_no_pass | {{.error_info}} | |
| error_image_quantity_no_pass | {{.error_info}} | |
| error_category_not_allowed | {{.error_info}} | |
| error_wholesale_range_not_allowed | {{.error_info}} | |
| error_dts_range_not_allowed | {{.error_info}} | |
| error_stock_limit_no_pass | {{.error_info}} | |
| error_price_limit_no_pass | {{.error_info}} | |
| error_image_width_no_pass | {{.error_info}} | |
| error_no_dts_range_not_allowed | {{.error_info}} | |
| error_category_is_block | Category is restricted | |
| error_less_required_attribute | Mandatory attribute information required | |
| error_less_required_brand | Brand information required | |
| error_inner | Update item failed {{.error_info}} | |
| error_inner | Update item failed {{.error_info}} | |
| error_param | Attribute format is invalid. NCC field only allows Eng Alphanumeric input | |
| error_inner | System error, please try again later or contact the OpenAPI support team. | |
| error_inner | System error, please try again later or contact the OpenAPI support team. | |
| error_permission | Global product related shop is not upgraded. | |
| error_desc_image_no_pass | {{.error_info}} | |
| error_desc_image_no_pass | {{.error_info}} | |
| error_desc_image_no_pass | {{.error_info}} | |
| error_desc_image_no_pass | {{.error_info}} | |
| error_param_validate | Wholesale cannot be used in this category and attributes. | |
| error_param_validate | Your current merchant is a special merchant.Please ensure all your shop are under same region | |
| error_auth | Your shop can not use model level dts | |
| error_param | {{.error_info}} | |
| error_desc_image_no_pass | {{.error_info}} | |
| error_desc_image_no_pass | {{.error_info}} | |
| error_desc_image_no_pass | {{.error_info}} | |
| error_desc_image_no_pass | {{.error_info}} | |
| error_param | {{.error_info}} | |
| error_param | You have 3PF shops, please upload stock with location id | |
| error_inner | Invalid stock location ID | |
| error_busi | The merchant/shop has multi warehouse, please input location id | |
| error_incalid_brand | {{.error_info}} | |
| error_duplicated_brand | Brand already exists | |
| error_system_busy | Our system is taking some time to respond, please try later. | |
| error_image_num_min | {{.error_info}} | |
| error_stock_less_then_min_limit | Normal_stock/ seller_stock is less than min limit. | |
| error_stock_bigger_then_limit | Normal_stock/ seller_stock is bigger than max limit. | |
| error_incalid_category | Category IDs for L1 and L2 do not match. |
§9 Common errors
Common errors
| Error | Description | Solution |
|---|---|---|
| error_auth | partner_id is invalid | |
| error_auth | The App is deleted, and you'll be unable to make any API call. | |
| error_auth | App developer’s permissions for authorizations have been restricted. If you’re a seller, contact the developer for more information. If you’re the developer, refer to the Open Platform Console for details. | |
| error_param | There is no partner_id in query. | |
| error_param | Invalid partner_id. | |
| error_param | no timestamp | |
| error_param | Invalid timestamp | |
| error_param | There is no sign in query. | |
| error_sign | Wrong sign. | |
| invalid_partner_id | Invalid partner_id, please have a check. | |
| error_auth | No permission to current api. | |
| error_api_call_restricted | The App permission for api call have been restricted. If you’re a seller, contact the developer for more information. If you’re the developer, refer to the Open Platform Console for details. | |
| api_suspended | The API is offline. Please call v2 API instead. | |
| error_limit | The total API call number made by your APP has reached the daily API call limit, please try again after 00: 00 (UTC+08:00) | |
| error_rate_limit | Too many requests. You have reached the rate limit. Please try again later. | |
| source_ip_undeclared | Request Source IP ({ip}) is undeclared. Please declare all your IP addresses in the Shopee Open Platform Console > App list > IP Address Whitelist | |
| error_param | Permission denied. This API is currently offline or the request path is incorrect. | |
| error_param | Partner_id is invalid, should be an integer between 0 and 4294967295. | |
| error_param | no timestamp. | |
| error_param | Timestamp is invalid, should be an integer between 0 and 4294967295. | |
| error_param | Timestamp is expired. | |
| error_partner_key_expired | Your API partner key has expired, please reset the Live API Partner Key in Console to get a new valid partner key to call open api. | |
| error_api_permission | This app type has no permission to this API. | |
| error_param | There is no access_token in query. | |
| error_auth | Invalid access_token. | |
| merchant_no_linked | Partner and merchant has no linked. | |
| invalid_acceess_token | Invalid access_token, please have a check. | |
| partner_frozen | The Partner has been frozen. Permissions for merchant authorization and API calls have been suspended until permissions are restored. | |
| error_param | There is no merchant_id in query. | |
| error_param | merchant_id is invalid, should be an integer between 0 and 4294967295. |
§10 Update log
Update log
| Date | Change |
|---|---|
| 2026-09-01 | Condition is required |
| 2025-01-08 | Add size_chart_info |
| 2024-10-23 | sunset the normal_stock |
| 2023-05-12 | add seller_stock parameter |
| 2022-06-17 | remove original_brand_name request parameter |
