来自 Shopee 官方资料快照 ·
- 当前资料结构化阅读页
- 固定快照已留存,可追溯
- 官方原文可核对
资料正文
§1 Reasons for receiving the error message, "Model tier_index error", when using the "v2.product.add_model" API
Reasons for receiving the error message, "Model tier_index error", when using the "v2.product.add_model" API
- The option corresponding to "tier_index" does not exist.
For example:
Seller has defined two colors, with details as below:
| "tier_index" | "option" | "model_id" |
| tier_index[0] | red | 10001 |
| tier_index[1] | blue | 10002 |
Action: If you call the "v2.product.add_model" API and add tier_index[2], "v2.product.add_model" API will return an error with the message, "Model tier_index error".
Reason: "tier_index" overflow
Solution:
Step 1: Please call the "v2.product.get_model_list" API to view the current "option_list" with "tier_index" information. Step 2: If you need to add a third color, you need to call the "v2.product.update_tier_variation" API to add options, and then call the "v2.product.add_model" API.
- The option corresponding to "tier_index" already exists.
For example:
Seller has defined two colors, with details as below:
| "tier_index" | "option" | "model_id" |
| tier_index[0] | red | 10001 |
| tier_index[1] | blue | 10002 |
Action: If you call the "v2.product.add_model" API and add tier_index[0], "v2.product.add_model" API will return an error with the message, "Model tier_index error".
Reason: tier_index[0] already has model information
Solution:
Step 1: Please call the "v2.product.get_model_list" API to view the current "option_list" with "tier_index" information.
Step 2: If you want to update the tier_index[0] model information, please call the "v2.product.update_model" API.
3.The "tier_index" array is incorrect.
For example:
Seller has defined two colors, with details as below:
| "tier_index" | "option" | "model_id" |
| tier_index[0] | red | 10001 |
| tier_index[1] | blue | 10002 |
Action: If you call the "v2.product.add_model" API and add tier_index[0,0], "v2.product.add_model" API will return an error with the message, "Model tier_index error".
Reason: "tier_index" should not be a two-dimensional array because only 1 tier variation is defined
Solution:
Step 1: Please call the "v2.product.get_model_list" API to view the current "option_list" with "tier_index" information.
Step 2: If you want to define 2-tier variation, please call the "v2.product.init_tier_variation" API instead.
