Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

[Bug] listInventorySupply is not supporting SellerSkus #368

Closed
danielbebbernovacode opened this issue May 4, 2021 · 15 comments
Closed

[Bug] listInventorySupply is not supporting SellerSkus #368

danielbebbernovacode opened this issue May 4, 2021 · 15 comments
Labels

Comments

@danielbebbernovacode
Copy link

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:
<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>41763488-209b-4ea9-bbf7-2c136983c908</RequestId> </ErrorResponse>

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

@moltar
Copy link
Contributor

moltar commented May 4, 2021

Yes, the example was wrong. But the implementation was correct.

It is SellerSkus: string[]

@repo-ranger repo-ranger bot closed this as completed in 9f0f405 May 4, 2021
@github-actions
Copy link

github-actions bot commented May 4, 2021

🎉 This issue has been resolved in version 1.9.50 🎉

The release is available on:

Your semantic-release bot 📦🚀

@danielbebbernovacode
Copy link
Author

danielbebbernovacode commented May 5, 2021

Also tried it with SellerSkus same result.

<Error> <Type>Sender</Type> <Code>InvalidRequestException</Code> <Message>One of SellerSkus and QueryStartDateTime is required</Message> </Error>

@moltar moltar reopened this May 5, 2021
@moltar
Copy link
Contributor

moltar commented May 5, 2021

Hopefully, #372 fixes it! Please test the next release (should be shortly after merge).

@repo-ranger repo-ranger bot closed this as completed in d0176f9 May 5, 2021
github-actions bot pushed a commit that referenced this issue May 5, 2021
## [1.9.51](v1.9.50...v1.9.51) (2021-05-05)

### Bug Fixes

* listInventorySupply to use GET method instead of POST ([d0176f9](d0176f9)), closes [#368](#368)
@github-actions
Copy link

github-actions bot commented May 5, 2021

🎉 This issue has been resolved in version 1.9.51 🎉

The release is available on:

Your semantic-release bot 📦🚀

@danielbebbernovacode
Copy link
Author

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.

@danielbebbernovacode
Copy link
Author

@moltar could you have a look at this issue again?

@moltar
Copy link
Contributor

moltar commented May 11, 2021

@danielbebbernovacode please provide your request example

@danielbebbernovacode
Copy link
Author

danielbebbernovacode commented May 11, 2021

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>

@moltar
Copy link
Contributor

moltar commented May 11, 2021

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 SellerId, but it is not documented.
Never mind that, this was just because it was not set in the config. Once set it is correctly set in the request too.


Can you do a successful request in a scratchpad, and then share the HTTP request?

Scratchpad URL: https://mws.amazonservices.ca/scratchpad/index.html

@moltar moltar reopened this May 11, 2021
@danielbebbernovacode
Copy link
Author

danielbebbernovacode commented May 11, 2021

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>

moltar added a commit that referenced this issue May 11, 2021
@moltar
Copy link
Contributor

moltar commented May 11, 2021

Yeah, I found the bug for sure this time. I tested and the call works locally. Wait for the release shortly.

@moltar moltar closed this as completed in 358cfb9 May 11, 2021
github-actions bot pushed a commit that referenced this issue May 11, 2021
## [1.9.55](v1.9.54...v1.9.55) (2021-05-11)

### Bug Fixes

* the FNSKU prop is optional when SKU does not exist ([d093ff9](d093ff9))
* typo in the parameter transformation ([358cfb9](358cfb9)), closes [#368](#368)
@github-actions
Copy link

🎉 This issue has been resolved in version 1.9.55 🎉

The release is available on:

Your semantic-release bot 📦🚀

@danielbebbernovacode
Copy link
Author

Working fine! Thank you for fixing this issue so fast :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants