一、创建应用
地址:https://solutionproviderportal.amazon.com/sellingpartner/developerconsole/application



二、编写核心代码
private static Map<String, Object> buildProductAttributes() {
Map<String, Object> attributes = new HashMap<>();
String language = "en_US";
String marketplace = MARKETPLACE_ID;
// ==================== 1. 标识符 ====================
attributes.put("merchant_suggested_asin", List.of(Map.of("value", "QB3V8GFA63")));
// 外部产品 ID(GTIN/UPC/EAN)- 请替换为真实有效的 GTIN
attributes.put("externally_assigned_product_identifier", List.of(
Map.of("value", "01234567890123", "type", "GTIN")
));
// ==================== 2. 危险品信息 ====================
// 厨房水龙头通常不需要危险品声明,删除此行或保留正确值
// attributes.put("supplier_declared_dg_hz_regulation", List.of(Map.of("value", "not_applicable")));
attributes.put("supplier_declared_dg_hz_regulation", List.of(Map.of("value", "other")));
// ==================== 3. 基础信息 ====================
attributes.put("item_name", List.of(
Map.of("value", "Stylish 22 Inch High-Arc Pull-Down Faucet with Spring for Commercial Kitchen Sinks, Polished Chrome",
"language_tag", language, "marketplace_id", marketplace)
));
attributes.put("product_description", List.of(
Map.of("value", "This stylish high-arc pull-down faucet features a commercial spring design…",
"language_tag", language)
));
attributes.put("brand", List.of(Map.of("value", "TGM", "language_tag", language)));
attributes.put("manufacturer", List.of(Map.of("value", "TGM", "language_tag", language)));
attributes.put("part_number", List.of(Map.of("value", "QB3V8GFA69-2")));
attributes.put("condition_type", List.of(Map.of("value", "new_new")));
attributes.put("material", List.of(Map.of("value", "Brass")));
attributes.put("size", List.of(Map.of("value", "One Size")));
attributes.put("color", List.of(Map.of("value", "Polished Chrome")));
attributes.put("country_of_origin", List.of(Map.of("value", "CN")));
attributes.put("item_type_keyword", List.of(Map.of("value", "kitchen-faucet")));
attributes.put("model_name", List.of(Map.of("value", "Kitchen Faucet Spring")));
attributes.put("model_number", List.of(Map.of("value", "QB3V8GFA69-2")));
attributes.put("care_instructions", List.of(Map.of("value", "Clean with soft cloth")));
attributes.put("included_components", List.of(Map.of("value", "Faucet, Installation Kit, Instructions")));
// 布尔 / 数字
attributes.put("is_refurbished", List.of(Map.of("value", false)));
attributes.put("number_of_boxes", List.of(Map.of("value", 1)));
attributes.put("contains_liquid_contents", List.of(Map.of("value", false)));
attributes.put("number_of_items", List.of(Map.of("value", 1)));
// ==================== 4. 五点描述 ====================
attributes.put("bullet_point", List.of(
Map.of("value", "Elegant and Functional Design: This 22-inch high-arc kitchen faucet features a sleek, single-handle design…"),
Map.of("value", "Premium Quality Construction: Crafted from 100% lead-free brass for all water-contact parts…"),
Map.of("value", "Enhanced Flow Rate: Experience the efficiency of a 1.8 GPM flow rate…"),
Map.of("value", "Long-Lasting Seal Valve: Engineered to international brand standards…"),
Map.of("value", "Versatile 3-Function Spray Head: Our pull-down sprayer offers three modes…")
));
// ==================== 5. 搜索关键词 ====================
attributes.put("generic_keyword", List.of(
Map.of("value", "Farmhouse; Kitchen Faucet; 22 Inch; High Arc; Commercial; Spring Faucet; Pull Down Sprayer; Sink; Polished Chrome;")
));
// ==================== 6. 价格与库存 ====================
attributes.put("list_price", List.of(Map.of("value", 99.99, "currency_code", "USD")));
attributes.put("fulfillment_availability", List.of(
Map.of("fulfillment_channel_code", "DEFAULT", "quantity", 1)
));
// ==================== 7. 重量 ====================
attributes.put("item_weight", List.of(Map.of("value", 5.9, "unit", "pounds")));
// ==================== 8. 图片(已移除,改用 PATCH 上传)====================
// 注意:Listings API putListingsItem 不支持直接传 images 属性
// 图片通过 patchListingsItem 单独上传
return attributes;
}
三、运行代码






