Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] getInventorySummaries does not work if sellerSkus contain ',' character #421

Closed
hamduc7 opened this issue Jun 24, 2022 · 21 comments
Closed
Labels
bug Something isn't working question Further information is requested Support Issue

Comments

@hamduc7
Copy link

hamduc7 commented Jun 24, 2022

The getInventorySummaries function cannot work if the SKU contains ",":

API: /fba/inventory/v1/summaries
granularityType=Marketplace
granularityId=NOT_IMPORTANT
marketplaceIds=A3KFBWWTZ2P8CN -->ANY MARKETPLACE
sellerSkus=abc,d

Note the 'abc,d' is an SKU

URL of the content on GitHub
https://developer-docs.amazon.com/sp-api/docs/fbainventory-api-v1-reference

Because the sellerSkus is a list of values, separated by a comma. But the SKU itself has a comma that causes a problem

How to solve this?

@hamduc7 hamduc7 added the bug Something isn't working label Jun 24, 2022
@hamduc7
Copy link
Author

hamduc7 commented Jun 24, 2022

@puppsupr

@marvs
Copy link

marvs commented Jun 30, 2022

Same issue here. We tried the following on the sellerSkus parameter but it still didn't work:

  • Adding a backslash \ before the comma
  • Using HTML encoding
  • Using URL encoding
  • Double URL encoding

@hamduc7
Copy link
Author

hamduc7 commented Jun 30, 2022

This issue is important but still have not received any comment from Amazon

@Adrian-T-AMZN Adrian-T-AMZN added Support Issue question Further information is requested labels Jul 6, 2022
@Adrian-T-AMZN
Copy link

Hello @hamduc7,

Thank you for bringing this to our attention.

In order to correctly resolve this issue, please open a support case so we can pursue the investigation and provide the following details:

  • Full request and full response of the API operation (Not truncated), file in .txt format
  • Operation
  • Timestamp
  • Request ID
  • Application ID

Once you do so, please post the Case ID so we can keep track of the situation.

Thanks,
Adrian T.
Selling Partner API Developer Support

@marolt
Copy link

marolt commented Jul 8, 2022

Hi @Adrian-T-AMZN,

we opened a support case a while ago, but it did not get resolved.

Here is the response from the support:

I understand that you are having issues with SKU's with commas since the system does not recognize as valid parameters.

When using the SKU's, please avoid using the commas since this cause the system do not recognized the entries.

For more information I will suggest to review the following page:
https://developer-docs.amazon.com/sp-api/docs/fbainventory-api-v1-reference

Can you please take a look at this case log?
All the requested information is provided there.
CASE ID: 9784299241

Thanks!

@kennedyjustin
Copy link

This is still occurring, is there an eta for when we will get a fix similar to the searchCatalogItems fix?

@jesusvalle
Copy link

Same problem here. Those SKUs with commas cannot be ordered via searchCatalogItems, for example.

@VeskeR
Copy link

VeskeR commented Nov 23, 2022

Bumping it up, having the same issue.
Seller has couple of products for which there is a comma “,” in the SKU, and we cannot make requests for such products using Search Catalog API

@jacobglanz
Copy link

Hi @Adrian-T-AMZN,

we opened a support case a while ago, but it did not get resolved.

Here is the response from the support:

I understand that you are having issues with SKU's with commas since the system does not recognize as valid parameters.

When using the SKU's, please avoid using the commas since this cause the system do not recognized the entries.

For more information I will suggest to review the following page:
https://developer-docs.amazon.com/sp-api/docs/fbainventory-api-v1-reference

Can you please take a look at this case log? All the requested information is provided there. CASE ID: 9784299241

Thanks!

You won't get a straight answer from their support team, they suck too. This a common problem and it's not going away soon, as they state on their website.

Solution: You should use the Reports API.
To replace the getInventorySummaries API, Use combination of the "GET_FBA_MYI_ALL_INVENTORY_DATA" and the "GET_RESERVED_INVENTORY_DATA" reports to get this data.

The problem is that Amazon uses a comma to separate 1 SKU from another (sku1,sku2,sku3), so when a SKU contains a comma (like this 'sk,u1') amazon will interoperate this 1 SKU into as 2 separate SKUs.

The first solution is to use ASIN instead of the SKU (A ASIN can't have a comma), and if the API doesn't accept ASIN than you should use the API report. And if there is no Report for that than I guess your screwed.

Yeps 2023

@lachesis
Copy link

lachesis commented Feb 9, 2023

This is insane. The MWS API didn't have this problem. We were all forced to switch to SP-API before they resolved this. We do not have any control over what SKUs our users select. This definitely needs to be fixed by Amazon.

@jacobglanz
Copy link

In the meantime you can switch to get data from reports, and you'll save a lot CPU.

@jacobglanz
Copy link

I'm just curios how it worked on MWS, How can you distinguish 2 SKUs with a "," when a SKU itself may contain a ","?

@lachesis
Copy link

lachesis commented Feb 9, 2023

We cannot switch to getting data from Reports because we fetch this data every 10 minutes for each SKU. Reports cannot be generated that quickly, and if we try, Amazon will either return old data, or cancel the attempted reports.

This was not a problem for the old MWS API because it was designed more carefully. Multiple SKUs were specified by repeating the query parameter:

  &SellerSkus.member.1=SampleSKU1
  &SellerSkus.member.2=SampleSKU2

@hamduc7
Copy link
Author

hamduc7 commented Mar 8, 2023

This problem is still existing on 8-Mar-2023.

Do you have any plan to fix this issue?
https://developer-docs.amazon.com/sp-api/docs/fbainventory-api-v1-reference

@jamesyanyuk
Copy link

We're still experiencing this issue with getPricing and getCompetitivePricing. When will these operations have a fix similar to searchCatalogItems?
@chapmanjw

@ryanjpaul
Copy link

Still having this issue, please fix

@stefnats
Copy link

stefnats commented Dec 7, 2023

Interested in a fix as well.
But to be honest, i think it's a design choice, maybe they didn't think about it in the first place. Now the API is in production and not easy to change.
They propose the way to call this operation for comma SKUs not batched, so one SKU at a time:

SKUs with commas

SP-API is unable to distinguish encoded comma (%2C) values from literal comma (,) values. This prevents SKUs with commas from being used in comma-delimited query parameters, as the commas in those SKUs cannot be distinguished from commas separating arguments.

When a comma is present in a SKU, you must search for the SKU individually.

(Source: https://developer-docs.amazon.com/sp-api/docs/url-encoding#how-do-i-encode-a-url)

This is far from optimal, but at least this is a way to get the data.

@shreeharsh-a shreeharsh-a transferred this issue from amzn/selling-partner-api-docs May 9, 2024
@lachesis
Copy link

lachesis commented May 9, 2024 via email

@shreeharsh-a
Copy link
Contributor

Please reach out to developer support so that we can better help you with issues related to SP API.

Note: SP API related issues / troubleshooting support is managed by a different team. We can help if the issue is related to the content published on this repo.

@jacobglanz
Copy link

Can you please be a more specific? Do have me an email address or phone number?

Please reach out to developer support so that we can better help you with issues related to SP API.

@shreeharsh-a
Copy link
Contributor

Sure @jacobglanz, here's the link: https://developer.amazonservices.com/support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested Support Issue
Projects
None yet
Development

No branches or pull requests