调用SP API putListingsItem成功但getListingsItem返回INVALID_ATTRIBUTE错误
问题
通过Postman多次调用putListingsItem接口,均收到ACCEPTED状态响应且issues数组为空。但调用已创建SKU的getListingsItem接口时,返回的属性与提交的完全一致,却存在非空的issues数组,具体错误响应如下:
{"sku": "BOX-XR-PATN-1050", "summaries": [], "attributes": {"color": [{"value": "White", "language_tag": "en_US", "marketplace_id": "ATVPDKIKX0DER"}], "item_type_name": [{"value": "Color Laser Printer", "language_tag": "en_US", "marketplace_id": "ATVPDKIKX0DER"}], "item_package_weight": [{"unit": "kilograms", "value": 0.5, "marketplace_id": "ATVPDKIKX0DER"}], "manufacturer": [{"value": "Brother", "language_tag": "en_US", "marketplace_id": "ATVPDKIKX0DER"}], "model_name": [{"value": "Color Printer Toner TN-1050", "language_tag": "en_US", "marketplace_id": "ATVPDKIKX0DER"}], "bullet_point": [{"value": "Toner for Brother TN1050 TN-1050 Black Compatible", "language_tag": "en_US", "marketplace_id": "ATVPDKIKX0DER"}], "model_number": [{"value": "BOX-XR-PATN-1050", "marketplace_id": "ATVPDKIKX0DER"}], "product_description": [{"value": "The compatible toner for Brother TN-1050 has a print capacity of up to 1,000 pages in black and white at 5% coverage of the A4 sheet. The inks and pigments used for the production of compatible consumables are extremely high-performance and ensure perfect printing performance on paper until the last copy made. Long-lasting prints and ink mixes that do not damage the printer make the compatible Brother TN-1050 toner a toner equivalent in quality and performance to the originals of the brand, only more convenient in terms of cost.", "language_tag": "en_US", "marketplace_id": "ATVPDKIKX0DER"}], "supplier_declared_dg_hz_regulation": [{"value": "storage", "marketplace_id": "ATVPDKIKX0DER"}], "brand": [{"value": "SSC", "language_tag": "en_US", "marketplace_id": "ATVPDKIKX0DER"}], "mfg_series_number": [{"value": "TN1050", "marketplace_id": "ATVPDKIKX0DER"}], "country_of_origin": [{"value": "IT", "marketplace_id": "ATVPDKIKX0DER"}], "merchant_shipping_group": [{"value": "legacy-template-id", "marketplace_id": "ATVPDKIKX0DER"}], "item_name": [{"value": "Toner for Brother TN1050 TN-1050 Black Compatible", "language_tag": "en_US", "marketplace_id": "ATVPDKIKX0DER"}], "list_price": [{"currency": "USD", "value": 10.0, "marketplace_id": "ATVPDKIKX0DER"}], "batteries_required": [{"value": false, "marketplace_id": "ATVPDKIKX0DER"}], "item_type_keyword": [{"value": "Toner", "marketplace_id": "ATVPDKIKX0DER"}], "item_depth_width_height": [{"depth": {"unit": "inches", "value": 5.0}, "width": {"unit": "inches", "value": 20.0}, "height": {"unit": "inches", "value": 10.0}, "marketplace_id": "ATVPDKIKX0DER"}], "merchant_suggested_asin": [{"value": "XRPATN1050", "marketplace_id": "ATVPDKIKX0DER"}], "condition_type": [{"value": "new_new", "marketplace_id": "ATVPDKIKX0DER"}], "number_of_items": [{"value": 10, "marketplace_id": "ATVPDKIKX0DER"}], "item_package_dimensions": [{"length": {"unit": "inches", "value": 5.0}, "width": {"unit": "inches", "value": 10.0}, "height": {"unit": "inches", "value": 20.0}, "marketplace_id": "ATVPDKIKX0DER"}], "size": [{"value": "5Dx10Wx20L", "language_tag": "en_US", "marketplace_id": "ATVPDKIKX0DER"}], "warranty_description": [{"value": "1 Year Manufacturer", "language_tag": "en_US", "marketplace_id": "ATVPDKIKX0DER"}], "part_number": [{"value": "BOX-XR-PATN-1050", "marketplace_id": "ATVPDKIKX0DER"}]}, "issues": [{"code": "8105", "message": "The data you provided for an attribute is invalid. Please refer the data definitions and resubmit with a valid value.", "severity": "ERROR", "categories": ["INVALID_ATTRIBUTE"]}], "offers": [], "fulfillmentAvailability": [], "procurement": []}
请问这是SP-API的问题,还是我遗漏了某些配置?
分析与解决建议
- 这不是SP-API的问题,而是后台异步校验发现了属性值不合法。
putListingsItem返回ACCEPTED仅代表请求被成功接收,后台会做二次校验,当时返回的空issues只是即时校验通过,不代表所有校验都通过;getListingsItem返回的是后台校验后的最终状态,所以这个错误是真实存在的。 - 错误码8105指向属性值无效,重点排查以下几个属性:
item_type_name:你提交的是"Color Laser Printer",但产品是硒鼓(Toner),分类明显不匹配,必须选择对应硒鼓类目的item_type_name值。supplier_declared_dg_hz_regulation:值"storage"是否符合亚马逊该属性的枚举值要求,该属性用于危险品合规声明,需确认有效值范围。size:值"5Dx10Wx20L"的格式是否符合对应类目下的尺寸规范,部分类目对尺寸格式有明确要求。merchant_shipping_group:"legacy-template-id"是否是你账号内有效的配送组ID,无效ID会触发属性校验错误。
- 验证步骤:先修改最明显的
item_type_name为正确的硒鼓类目值,重新调用putListingsItem,之后再调用getListingsItem查看错误是否消失,逐步排查其他属性。
内容的提问来源于stack exchange,提问作者Tommy Hoang
相关产品推荐
相关产品推荐

