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

Detailed introduction of the "v2.product.init_tier_variation" API

Shopee 官方资料 · Shopee Open Platform 常见问题(FAQ) · 适合开发者

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

来自 Shopee 官方资料快照 ·

打开官方原文 ↗
  1. 当前资料结构化阅读页
  2. 固定快照已留存,可追溯
  3. 官方原文可核对
查看技术与溯源信息
平台 / profile
Shopee / profile.shopee.faq
语言
en
发布版本
cn-20260909-2
标签
zhuge/sourceplatform/shopeeaudience/developercategory/help_centertopic/apitopic/developertopic/faqtopic/feature-apistopic/product

资料正文

§1 Detailed introduction of the "v2.product.init_tier_variation" API

Detailed introduction of the "v2.product.init_tier_variation" API

Request Body

{
    "item_id": 101008234,
    "tier_variation": [
        {
            "option_list": [
                {
                    "option": "red",
                    "image": {
                        "image_id": "afa113fe168ffc481210f3b04bc12042"
                    }
                },
                {
                    "option": "blue",
                    "image": {
                        "image_id": "e9b4f207a92944fd41be9263f84e9b4d"
                    }
                },
                {
                    "option": "green",
                    "image": {
                        "image_id": "874b8aa780c3fc435bd4fbc56e9b4262"
                    }
                }
            ],
            "name": "color"
        },
        {
            "option_list": [
                {
                    "option": "XL"
                },
                {
                    "option": "2XL"
                }
            ],
            "name": "size"
        }
    ],
    "model": [
        {
            "tier_index": [
0,
0
],
            "normal_stock": 100,
            "original_price": 11.11,
            "model_sku": "abcd"
        }
    ]
}

Take the above request as an example

tier index[0,0]=[red,XL]

tier index[0,1]=[red,2XL]

tier index[1,0]=[blue,XL]

tier index[1,1]=[blue,2XL]

tier index[2,0]=[green,XL]

tier index[2,1]=[green,2XL]

When calling the "v2.product.init_tier_variation" API, you do not have to upload models for every option, but please upload at least one model, otherwise the API will report an error.

(For the above example, there is no need to upload 3*2=6 models, but at least one model needs to be uploaded)

Image upload principles

If there're 2 tiers, at present, you can only choose one tier and upload one image for each option under it, meaning you can choose either tier 1 or tier 2 to upload images, and the system will only display images of options under the chosen tier.

For the above example

tier index[0,0]=[red,XL]--image id=afa113fe168ffc481210f3b04bc12042

tier index[0,1]=[red,2XL]--image id=afa113fe168ffc481210f3b04bc12042

tier index[1,0]=[blue,XL]--image id=e9b4f207a92944fd41be9263f84e9b4d

tier index[1,1]=[blue,2XL]--image id=e9b4f207a92944fd41be9263f84e9b4d

tier index[2,0]=[green,XL]--image id=874b8aa780c3fc435bd4fbc56e9b4262

tier index[2,1]=[green,2XL]--image id=874b8aa780c3fc435bd4fbc56e9b4262

#