Closed danielbebbernovacode closed 3 years ago
Yes, the example was wrong. But the implementation was correct.
It is SellerSkus: string[]
:tada: This issue has been resolved in version 1.9.50 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Also tried it with SellerSkus
same result.
`
<Code>InvalidRequestException</Code>
<Message>One of SellerSkus and QueryStartDateTime is required</Message>
`
Hopefully, #372 fixes it! Please test the next release (should be shortly after merge).
:tada: This issue has been resolved in version 1.9.51 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
The issue still persists. It seems like SellerSkus is totally ignored.
I tested to provide SellerSkus and QueryStartDateTime (which should result into an error) but it worked. Only providing SellerSkus still results in the same rror.
@moltar could you have a look at this issue again?
@danielbebbernovacode please provide your request example
Query:
const main = async () => {
const parameters = {
MarketplaceId: amazonMarketplaces.DE.id,
SellerSkus: ["QA-D58Q-SVCD"]
};
const [
listInventorySupply,
requestMeta
] = await fulfillmentInventory.listInventorySupply(parameters);
console.log(listInventorySupply);
Response:
<ErrorResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">
<Error>
<Type>Sender</Type>
<Code>InvalidRequestException</Code>
<Message>One of SellerSkus and QueryStartDateTime is required</Message>
</Error>
<RequestId>b8929c12-bd2e-4cac-b3d7-e4fbf7b1f4e9</RequestId>
</ErrorResponse>
I'm making a request from the examples, and I am seeing the following HTTP request:
GET /FulfillmentInventory/2010-10-01?AWSAccessKeyId=&Action=ListInventorySupply&MWSAuthToken=&MarketplaceId=ATVPDKIKX0DER&SellerId=&SellersSkus.member.1=SKU123&SellersSkus.member.2=SKU456&Signature=...&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2021-05-11T08%3A56%3A26.664Z&Version=2010-10-01
Which is almost exactly the same as the one in the example:
https://mws.amazonservices.com/FulfillmentInventory/2010-10-01
?Action=ListInventorySupply
&Version=2011-03-01
&AWSAccessKeyId=AKIAJGUEXAMPLEE2NVUA
&MWSAuthToken=amzn.mws.4ea38b7b-f563-7709-4bae-87aeaEXAMPLE
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Signature=ZRA9DR5rveSuz%2F1D18AHvoipg2BAev8yblPQ1BbEbfU%3D
&Timestamp=2010-10-01T02:40:36Z
&SellerId=A2NKEXAMPLEF53
&SellerSkus.member.1=SampleSKU1
&SellerSkus.member.2=SampleSKU2
&ResponseGroup=Basic
The only difference I see is that their example has a
Never mind that, this was just because it was not set in the config. Once set it is correctly set in the request too.SellerId
, but it is not documented.
Can you do a successful request in a scratchpad, and then share the HTTP request?
Scratchpad URL: https://mws.amazonservices.ca/scratchpad/index.html
POST /FulfillmentInventory/2010-10-01?AWSAccessKeyId=ACESSKEY
&Action=ListInventorySupply
&SellerId=SELLERID
&MWSAuthToken=AUTHTOKEN
&SignatureVersion=2
&Timestamp=2021-05-11T09%3A07%3A22Z
&Version=2010-10-01
&Signature=SIGNATURE
&SignatureMethod=HmacSHA256
&SellerSkus.member.1=QA-D58Q-SVCD HTTP/1.1
Host: mws.amazonservices.de
x-amazon-user-agent: AmazonJavascriptScratchpad/1.0 (Language=Javascript)
Content-Type: text/xml
I also get a correct response in scratchpad:
<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">
<ListInventorySupplyResult>
<MarketplaceId>A1PA6795UKMFR9</MarketplaceId>
<InventorySupplyList>
<member>
<Condition>NewItem</Condition>
<SupplyDetail/>
<TotalSupplyQuantity>448</TotalSupplyQuantity>
<EarliestAvailability>
<TimepointType>Immediately</TimepointType>
</EarliestAvailability>
<FNSKU>X00147VYVF</FNSKU>
<InStockSupplyQuantity>448</InStockSupplyQuantity>
<ASIN>B07YF3YX9X</ASIN>
<SellerSKU>QA-D58Q-SVCD</SellerSKU>
</member>
</InventorySupplyList>
</ListInventorySupplyResult>
<ResponseMetadata>
<RequestId>12879177-a9ee-430b-9022-6655f35a2b40</RequestId>
</ResponseMetadata>
</ListInventorySupplyResponse>
Yeah, I found the bug for sure this time. I tested and the call works locally. Wait for the release shortly.
:tada: This issue has been resolved in version 1.9.55 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Working fine! Thank you for fixing this issue so fast :)
Hello,
While I was using the listInventorySupply API call I noticed that it is not possible to use the SellerSkus parameter. I always get an error as response: `
InvalidRequestException
`
Since you noted it as "SellerSku" inside the example (which would not match the Amazon API docu) I also tried it with SellerSku but had the same result. Seems like there is a bug there.
Best Regards, Daniel