【问题标题】:Amazon SP-API giving wrong catalog items list亚马逊 SP-API 提供错误的目录项列表
【发布时间】:2021-02-01 12:52:25
【问题描述】:

我正在为我的销售伙伴集成 Amazon sp-api。但是列出所有产品的 API(列表目录 API)给出了错误的数据。它提供不在卖方库存中的产品。任何解决方案。

【问题讨论】:

标签: amazon amazon-mws


【解决方案1】:

此 API 调用 catalog-items 不会检索卖家的产品,它只是列出亚马逊提供的市场中的所有产品并根据提供的查询过滤它们。

要列出您的产品,请使用fba-inventory-api。 虽然,它只支持北美库存,如果你的市场不支持,根据 SP-API 文档,它将在今年内,阅读更多here

【讨论】:

    【解决方案2】:

    要检索所有卖家合作伙伴列表,您应该使用 Reports API。见https://github.com/amzn/selling-partner-api-docs/blob/main/references/reports-api/reporttype-values.md#inventory-reports

    是的,这个信息在列表 API 中不可用,这很棘手,因为更新和删除列表的端点在那里。

    【讨论】:

      【解决方案3】:

      谢谢@Borda 我使用了 Inventory Reports API 并且它可以工作,即使它很棘手。

      我正在使用 amazon-php/sp-api-sdk,我是这样做的:

      1. 创建“GET_MERCHANT_LISTINGS_ALL_DATA”报告。
      2. 使用reportId 通过getReport 端点获取报告。您必须循环并等待,直到报告状态为“DONE”。
      3. 调用提供reportDocumentId的getReportDocument端点来获取documentUrl和key+initializationVector来解密它
      4. 下载文档。

      CSV 文档已加密 (AES-256),您必须对其进行解密:

      $iv = base64_decode($reportDocument->getPayload()->getEncryptionDetails()->getInitializationVector());
      $key = base64_decode($reportDocument->getPayload()->getEncryptionDetails()->getKey());
      
      $encryptedDocument = file_get_contents($documentUrl);
      $decryptedData = openssl_decrypt($encryptedDocument, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv);
      

      由于某种原因,法国商城在我的报告中不包含 ASIN,仅包含 SKU 和产品 ID 要获得这些 ASIN,我必须下载包含 ASIN 和 SKU 匹配的“GET_FLAT_FILE_OPEN_LISTINGS_DATA”报告。

      然后,您可能希望将列表的变体相互关联,并获取主要图片。 为此,您可以使用 Catalog API,提供 ASIN 和“['images', 'summaries','variations']”作为“included_data”参数。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2023-03-30
        • 2023-02-14
        • 2021-09-24
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-11-26
        相关资源
        最近更新 更多