amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
580 stars 730 forks source link

how to get SKU number for a product using ASIN ? #2507

Closed arcmax1998 closed 1 year ago

arcmax1998 commented 1 year ago

SP o i am working with the Amazon seller api. I have my catalog and pricing api working. I am able to retrieve the details using the ASIN values. What i need is the inventory for those products. The inventory feed required SKU number. I cant seem to find the SKU number in any of the feeds. And the inventory feed seems to only work with sku, i have tried other identifiers available in the summery but none of them work.

any help would be appreciated.

thanks

puppsupr commented 1 year ago

Hi @arcmax1998,

If you do a Catalog Item Get on an ASIN the identifiers contains mapped SKU for the seller, if there is one. https://developer-docs.amazon.com/sp-api/docs/catalog-items-api-v2022-04-01-reference#includeddata

Thanks and Regards, Supriya P Solutions Architect, Selling Partner API SP API Blogs | SP API YouTube Channel

github-actions[bot] commented 1 year ago

closed for inactivity

PeterTough2 commented 1 year ago

@puppsupr Is there a sandbox with API credentials and list of ASIN I can use for a test, I am implementing this on Google sheet.

Here is the endpoint I am calling from Postman, I need the test header parameters

https://sellingpartnerapi-na.amazon.com//products/pricing/v0/competitivePrice?MarketplaceId=ATVPDKIKX0DER&Asins=B08V57P86Z,B0964K3MC7,B00J31YARQ

@arcmax1998 Do you care to share your request headers?

Thanks.

widdydev commented 1 year ago

Hi @arcmax1998,

If you do a Catalog Item Get on an ASIN the identifiers contains mapped SKU for the seller, if there is one. https://developer-docs.amazon.com/sp-api/docs/catalog-items-api-v2022-04-01-reference#includeddata

Thanks and Regards, Supriya P Solutions Architect, Selling Partner API SP API Blogs | SP API YouTube Channel

It seems that the catalog items API does not always return the correct identifiers in the response. I could verify this by performing 2 search queries. 1 by ASIN and 1 by the corresponding SKU. Both gave me the same item in the response. But the SKU in the identifiers response is missing when queried by ASIN. The SKU identifier is present when querying by SKU. So apparently there is some inconsistency.

Is there a way to solve this issue? Thanks in advance

gusbarba commented 1 year ago

Hi @arcmax1998, If you do a Catalog Item Get on an ASIN the identifiers contains mapped SKU for the seller, if there is one. https://developer-docs.amazon.com/sp-api/docs/catalog-items-api-v2022-04-01-reference#includeddata Thanks and Regards, Supriya P Solutions Architect, Selling Partner API SP API Blogs | SP API YouTube Channel

It seems that the catalog items API does not always return the correct identifiers in the response. I could verify this by performing 2 search queries. 1 by ASIN and 1 by the corresponding SKU. Both gave me the same item in the response. But the SKU in the identifiers response is missing when queried by ASIN. The SKU identifier is present when querying by SKU. So apparently there is some inconsistency.

Is there a way to solve this issue? Thanks in advance

I have the same problem...

https://sellingpartnerapi-na.amazon.com/catalog/2022-04-01/items?marketplaceIds={mktplaceId}&includedData=attributes,summaries,identifiers,relationships,images,dimensions,productTypes,salesRanks&identifiersType=ASIN&identifiers={asin}

the response is

"identifiers": [ { "marketplaceId": "{mktplaceId}", "identifiers": [ { "identifierType": "EAN", "identifier": "{eanCode}" } ] } ],

but if i use the corresponding SKU for that ASIN....

https://sellingpartnerapi-na.amazon.com/catalog/2022-04-01/items?marketplaceIds={mktplaceId}&sellerId={sellerId}&includedData=attributes,summaries,identifiers,relationships,images,dimensions,productTypes,salesRanks&identifiersType=SKU&identifiers={sku}

the response is....

"identifiers": [ { "marketplaceId": "{mktplaceId}", "identifiers": [ { "identifierType": "EAN", "identifier": "{ean}" }, { "identifierType": "SKU", "identifier": "{sku}" } ] } ],

so... maybe then the origin of the problem lies in the sellerId parameter (that is mandatory when using SKU).... SO! if i try with

https://sellingpartnerapi-na.amazon.com/catalog/2022-04-01/items?marketplaceIds={mktplaceId}&sellerId={sellerId}&includedData=attributes,summaries,identifiers,relationships,images,dimensions,productTypes,salesRanks&identifiersType=ASIN&identifiers={asin}

the response is...

"identifiers": [ { "marketplaceId": "{mktplaceId}", "identifiers": [ { "identifierType": "EAN", "identifier": "{ean}" } ] } ],

no sku :disappointed:.... thank you amazon...

i understand that the problem lies in using the sellerId only when the identifier is SKU. and the SKU only returns when it knows which seller we are using (can't it obtain it from the token?). so when we use ASIN, it ignores the sellerId parameter and does not include the SKU in the response.

anyway, to solve the following problem...

SP o i am working with the Amazon seller api. I have my catalog and pricing api working. I am able to retrieve the details using the ASIN values. What i need is the inventory for those products. The inventory feed required SKU number. I cant seem to find the SKU number in any of the feeds. And the inventory feed seems to only work with sku, i have tried other identifiers available in the summery but none of them work.

any help would be appreciated.

thanks

can use that: https://developer-docs.amazon.com/sp-api/docs/reports-api-v2021-06-30-reference

make a report calling https://sellingpartnerapi-na.amazon.com/reports/2021-06-30/reports (POST) with the body {"reportType": "GET_MERCHANT_LISTINGS_ALL_DATA", "marketplaceIds": ["{mktplaceId}"]}

get the report status with https://sellingpartnerapi-na.amazon.com/reports/2021-06-30/reports/{reportId} (the response of the previous request)

when its done, call https://sellingpartnerapi-na.amazon.com/reports/2021-06-30/documents/{reportDocumentId} ( this comes with the status in the response of the previous request)

this return that

{"reportDocumentId":"{reportDocumentId}","url":"{urlOfDocument}"}

this returns a listing with all the users products, which includes ASIN and SKU for all the products!

is this terrible? YES! once again... thank you, Amazon. :sweat_smile:... but it is a solution that may help someone.

xEverth commented 10 months ago

Is there a planned update for the CatalogItems to return the seller SKUs when querying by ASIN and providing the SellerId as well? Edit: Some marketplaces like France may not always provide asin1, so this is not a suitable method: https://github.com/amzn/selling-partner-api-models/issues/1199

chapmanjw commented 10 months ago

Is there a planned update for the CatalogItems to return the seller SKUs when querying by ASIN and providing the SellerId as well? Edit: Some marketplaces like France may not always provide asin1, so this is not a suitable method: #580 (comment)

Not as part of the Catalog Items API. In a future release of the Listings Items API, a search operation will be added that allows for querying listings (SKUs) for a given list of ASINs (or other product identifiers).

Xkta commented 1 month ago

Is there a planned update for the CatalogItems to return the seller SKUs when querying by ASIN and providing the SellerId as well? Edit: Some marketplaces like France may not always provide asin1, so this is not a suitable method: #580 (comment)

Not as part of the Catalog Items API. In a future release of the Listings Items API, a search operation will be added that allows for querying listings (SKUs) for a given list of ASINs (or other product identifiers).

Could you please let me know if the search operation that allows for querying listings (SKUs) for a given list of ASINs (or other product identifiers) has been released? This feature is crucial for our operations, and any details about its availability would be greatly appreciated.

chapmanjw commented 1 month ago

@Xkta It has not been released yet, our teams are working on getting it ready. Stay tuned for launch announcements: https://developer-docs.amazon.com/sp-api/changelog.

Xkta commented 1 month ago

Hi, Thank you for your prompt reply and for all the effort you’ve put in over time, even though there hasn't been substantial progress on the issue. Best regards

@Xkta https://github.com/Xkta It has not been released yet, our teams are working on getting it ready. Stay tuned for launch announcements: https://developer-docs.amazon.com/sp-api/changelog.

— Reply to this email directly, view it on GitHub https://github.com/amzn/selling-partner-api-models/issues/2507#issuecomment-2271927494, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXL6NOPXV45OZRDSWGVBTDZQEK2NAVCNFSM6AAAAABIHQDVEGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZRHEZDONBZGQ . You are receiving this because you were mentioned.Message ID: @.***>