亚马逊产品 API:“您的请求缺少必需的参数组合”关于混合项目搜索

发布于 2024-08-27 08:18:19 字数 2364 浏览 5 评论 0原文

我在尝试使用 Amazon Product API 对混合索引进行 ItemSearch 时遇到一些问题。

根据文档,混合请求无法指定 MerchantId 参数 - 事实上,如果我尝试包含它,我会收到一条错误消息。但是,当我不包含它时,我收到一条错误消息,告诉我我的请求缺少必需的参数组合,并且有效的组合包含 MerchantId...到底是什么?

失败的请求将与其他成功的请求一起作为批次的一部分发送。我正在使用 REST 发送请求,因此这里有一个示例:

http://ecs.amazonaws.com/onca/xml?AWSAccessKeyId=-------------&
ItemSearch.1.Keywords=Mates%20of%20State&
ItemSearch.1.MerchantId=Amazon&
ItemSearch.1.SearchIndex=DVD&
ItemSearch.2.Keywords=teaching%20Lily%20various%20computer%20related%20skills&
ItemSearch.2.SearchIndex=Blended&
ItemSearch.Shared.Availability=Available&
ItemSearch.Shared.Condition=All&
ItemSearch.Shared.ResponseGroup=Small%2CSalesRank%2CImages%2COfferSummary%2CSimilarities&
Operation=ItemSearch%2CSimilarityLookup&
Service=AWSECommerceService&
SimilarityLookup.1.ItemId=B000FNNHZ2&
SimilarityLookup.2.ItemId=B000EQ5UPU&
SimilarityLookup.Shared.Availability=Available&
SimilarityLookup.Shared.Condition=All&
SimilarityLookup.Shared.MerchantId=Amazon&
SimilarityLookup.Shared.ResponseGroup=Small%2CSalesRank%2CImages%2COfferSummary&
Timestamp=2010-04-02T17%3A18%3A05Z&
Signature=----------------

这是 XML 响应:

<Items xmlns="http://webservices.amazon.com/AWSECommerceService/2005-10-05">
  <Request>
    <IsValid>False</IsValid>
    <ItemSearchRequest>
      <Availability>Available</Availability>
      <Condition>All</Condition>
      <Keywords>teaching Lily various computer related skills</Keywords>
      <ResponseGroup>Similarities</ResponseGroup>
      <ResponseGroup>SalesRank</ResponseGroup>
      <ResponseGroup>OfferSummary</ResponseGroup>
      <ResponseGroup>Small</ResponseGroup>
      <ResponseGroup>Images</ResponseGroup>
      <SearchIndex>Blended</SearchIndex>
    </ItemSearchRequest>
    <Errors>
      <Error>
        <Code>AWS.MissingParameterCombination</Code>
        <Message>Your request is missing a required parameter combination. Required parameter combinations include MerchantId, Availability.</Message>
      </Error>
    </Errors>
  </Request>
</Items>

您对我做错了什么有什么想法吗?

I'm having some problems trying to do an ItemSearch on the Blended index using the Amazon Product API.

According to the documentation, Blended requests cannot specify the MerchantId parameter - and indeed, if I try to include it I get an error telling me so. However, when I don't include it, I get an error telling me that my request is missing a required parameter combination and that a valid combination includes MerchantId... what the hell?

The failing requests are being sent as part of batches with other requests that are succeeding. I'm using REST to send my requests, so here's an example:

http://ecs.amazonaws.com/onca/xml?AWSAccessKeyId=-------------&
ItemSearch.1.Keywords=Mates%20of%20State&
ItemSearch.1.MerchantId=Amazon&
ItemSearch.1.SearchIndex=DVD&
ItemSearch.2.Keywords=teaching%20Lily%20various%20computer%20related%20skills&
ItemSearch.2.SearchIndex=Blended&
ItemSearch.Shared.Availability=Available&
ItemSearch.Shared.Condition=All&
ItemSearch.Shared.ResponseGroup=Small%2CSalesRank%2CImages%2COfferSummary%2CSimilarities&
Operation=ItemSearch%2CSimilarityLookup&
Service=AWSECommerceService&
SimilarityLookup.1.ItemId=B000FNNHZ2&
SimilarityLookup.2.ItemId=B000EQ5UPU&
SimilarityLookup.Shared.Availability=Available&
SimilarityLookup.Shared.Condition=All&
SimilarityLookup.Shared.MerchantId=Amazon&
SimilarityLookup.Shared.ResponseGroup=Small%2CSalesRank%2CImages%2COfferSummary&
Timestamp=2010-04-02T17%3A18%3A05Z&
Signature=----------------

Here's the XML response:

<Items xmlns="http://webservices.amazon.com/AWSECommerceService/2005-10-05">
  <Request>
    <IsValid>False</IsValid>
    <ItemSearchRequest>
      <Availability>Available</Availability>
      <Condition>All</Condition>
      <Keywords>teaching Lily various computer related skills</Keywords>
      <ResponseGroup>Similarities</ResponseGroup>
      <ResponseGroup>SalesRank</ResponseGroup>
      <ResponseGroup>OfferSummary</ResponseGroup>
      <ResponseGroup>Small</ResponseGroup>
      <ResponseGroup>Images</ResponseGroup>
      <SearchIndex>Blended</SearchIndex>
    </ItemSearchRequest>
    <Errors>
      <Error>
        <Code>AWS.MissingParameterCombination</Code>
        <Message>Your request is missing a required parameter combination. Required parameter combinations include MerchantId, Availability.</Message>
      </Error>
    </Errors>
  </Request>
</Items>

Any ideas as to what I'm doing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

罗罗贝儿 2024-09-03 08:18:19

我似乎通过删除 AvailabilityCondition 参数解决了这个问题。理想情况下,我希望能够按可用性进行过滤,但至少它可以工作。

I seem to have solved this by removing both the Availability and Condition parameters. I'd ideally prefer to be able to filter by availability, but at least it's working.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文