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
611 stars 735 forks source link

Get Inventory from SP-API #2768

Closed z85510 closed 8 months ago

z85510 commented 8 months ago

I'm trying to get inventory using this endpoint

https://sellingpartnerapi-na.amazon.com/fba/inventory/v1/summaries?marketplaceIds=A2EUQ1WTGCTBG2,ATVPDKIKX0DER,A1AM78C64UM0Y8&granularityType =Marketplace&granularityId =A2EUQ1WTGCTBG2

Headers:

content-Type : application/json
x-amz-access-token: Atza|I...

first of all, I don't know what I should use for granularityId, I want to get data from 3 marketplaces then when I ran this endpoint I got 400


{
    "errors": [
        {
            "code": "InvalidInput",
            "message": "Invalid request, please check your input.",
            "details": ""
        }
    ]
}

What am I doing wrong?

https://sellingpartnerapi-na.amazon.com/fba/inventory/v1/summaries?marketplaceIds=A2EUQ1WTGCTBG2&granularityType =Marketplace&granularityId =A2EUQ1WTGCTBG2 I tried for just one marketplace but still getting error

littleylv commented 8 months ago

granularityType =Marketplace&granularityId =A2EUQ1WTGCTBG2

Why you put a space before =?

z85510 commented 8 months ago

Thanks, I didn't notice that

rugved1991 commented 8 months ago

Hi @z85510,

Please refer to the FBA Inventory API Use Case Guide for an example of the request for getInventorySummaries operation using marketplace as granularityType.

Best, Rugved Solutions Architect, SP-API