You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Amazon SP API添加商品报价至库存失败问题排查

问题描述

我正在使用Node.js编写代码管理亚马逊卖家平台库存,目前通过手动提交CSV文件管理商品报价(CD、DVD、唱片)。尝试使用Amazon SP API实现该功能但未成功,请求示例如下:

const body = {
  "productType":"PRODUCT",
  "product_type":"PRODUCT",
  "requirements":"LISTING_OFFER_ONLY",
  "attributes":{
    "condition_type":[
      {"value":"used_acceptable","marketplace_id":"APJ6JRA9NG5V4"}
    ]
  },
  "offers":[
    {"marketplaceId":"APJ6JRA9NG5V4","offerType":"B2C","price":{"currencyCode":"EUR","amount":20.99}}
  ]
};

var config = {
    method: 'PUT',
    url: `https://sellingpartnerapi-eu.amazon.com/listings/2021-08-01/items/A23B5NP94ZWC8W/${sku}?marketplaceIds=${marketplaceIds}&issueLocale=en_US`,
    headers: {
        'Accept': 'application/json',
        'x-amz-access-token': access_token,
        'X-Amz-Date': awssign.headers["X-Amz-Date"],
        'Authorization': `${awssign.headers.Authorization}`,
        "Content-Type":'application/json'
    },
    data: body
};

await axios(config);

收到的错误响应:

{
  "sku": "AAACD100249",
  "status": "INVALID",
  "submissionId": "b3e9b60a2e0c41ad804d17795b0f5f41",
  "issues": [
    {
      "code": "90220",
      "message": "'merchant_suggested_asin' is required but not supplied.",
      "severity": "ERROR",
      "attributeNames": ["merchant_suggested_asin"]
    },
    {
      "code": "90220",
      "message": "'externally_assigned_product_identifier' is required but not supplied.",
      "severity": "ERROR",
      "attributeNames": ["externally_assigned_product_identifier"]
    }
  ]
}

该商品已存在且ASIN有效,我无需创建新商品,仅需添加报价。官方文档未提供有效帮助,请问缺失哪些参数?当前方式是否正确?


解决方案

缺失参数说明

  1. merchant_suggested_asin:即使商品已存在,使用LISTING_OFFER_ONLY要求时仍需明确指定关联的ASIN。将此字段添加到attributes中,值为SKU对应的有效ASIN:

    "attributes": {
      "condition_type": [{"value":"used_acceptable","marketplace_id":"APJ6JRA9NG5V4"}],
      "merchant_suggested_asin": [{"value":"目标ASIN值","marketplace_id":"APJ6JRA9NG5V4"}]
    }
    
  2. externally_assigned_product_identifier:对应商品的外部标准标识(如UPC、EAN),CD/DVD这类标品必须提供该参数。同样添加到attributes中:

    "attributes": {
      // 已有字段...
      "externally_assigned_product_identifier": [{"value":"商品的UPC/EAN码","marketplace_id":"APJ6JRA9NG5V4"}]
    }
    

请求方式正确性

你使用PUT请求是正确的,该方法支持创建或更新商品列表/报价。额外注意两点:

  • requirements设置为LISTING_OFFER_ONLY符合仅更新报价的需求,无需调整。
  • 确认URL中的卖家ID(A23B5NP94ZWC8W)和marketplaceIds参数与实际运营区域匹配,避免跨环境错误。

修改后的完整请求体示例:

{
  "productType": "PRODUCT",
  "requirements": "LISTING_OFFER_ONLY",
  "attributes": {
    "condition_type": [{"value":"used_acceptable","marketplace_id":"APJ6JRA9NG5V4"}],
    "merchant_suggested_asin": [{"value":"B0XXXXXXX","marketplace_id":"APJ6JRA9NG5V4"}],
    "externally_assigned_product_identifier": [{"value":"1234567890123","marketplace_id":"APJ6JRA9NG5V4"}]
  },
  "offers": [{"marketplaceId":"APJ6JRA9NG5V4","offerType":"B2C","price":{"currencyCode":"EUR","amount":20.99}}]
}

注:已移除重复的product_type字段(与productType冗余)。

内容的提问来源于stack exchange,提问作者Edoardo Lobbiani

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.18 08:47:46