Search code examples
node.jsamazon-web-servicesexpressamazon-selling-partner-api

is there any endpoint in amazon sp api to get seller Id?


I want to update the listing quantity on amazon through patchlistingItem API but it requires SellerID , I can't find any endpoint to get sellerId (I have only a refresh token ) of sellers that are authorized with our website.
https://developer-docs.amazon.com/sp-api/docs/listings-items-api-v2021-08-01-reference#patchlistingsitem

I have tried this endpoint but cant get sellerId
https://developer-docs.amazon.com/sp-api/docs/sellers-api-v1-reference


Solution

  • I've been having the exact same issue trying to find any information regarding how to get a seller's ID through the SP-API.

    As far as I can see, the only way to programmatically get the seller's ID is during the app authorization process via oauth:

    https://developer-docs.amazon.com/sp-api/docs/selling-partner-appstore-authorization-workflow

    It mentions in Step 4 that the redirect after authorization includes selling_partner_id as a query parameter. That is the seller account's ID.

    Unfortunately, I cannot find any way to retrieve the seller ID after the fact. There is a Github issue regarding this missing feature but, unsurprisingly from Amazon, has not gotten very far:

    https://github.com/amzn/selling-partner-api-docs/issues/492