Susan Cai
Susan Cai

Reputation: 121

eBay inventory API: Get InventoryItems Always return 0 Results

I have a problem about ebay API.

When I call the inventory_item API I get an empty result. My request is

https://api.ebay.com/sell/inventory/v1/inventory_item?limit=2&offset=0

Response body is:

{
    "total": 0,
    "size": 0
}

Then I call the inventory_item API By SKU, of course I failed again.

My request is:

https://api.ebay.com/sell/inventory/v1/inventory_item/80003953

(80003953 is my sku in ebay sell platform)

Response body is:

{
    "errors": [
        {
            "errorId": 25710,
            "domain": "API_INVENTORY",
            "subdomain": "Selling",
            "category": "REQUEST",
            "message": "We didn't find the entity you are requesting. Please verify the request"
        }
    ]
}

I'm confirm my authorization and sku are correct!

Upvotes: 3

Views: 1775

Answers (3)

Giga
Giga

Reputation: 77

Perhaps you are trying to get items that are created by Ebay-GUI.

This case was already discribed here

So it turns out that eBay's Inventory API is fairly new. Only items created via the Inventory API's can be queried with the Inventory API.

In my case, using the old Trading-API solved the problem.

Upvotes: 1

Lord Elrond
Lord Elrond

Reputation: 16012

The getInventoryItem (ie first url) call assumes that an item with the given sku exists, while getInventoryItems does not.

It looks like an item with sku 80003953 doesn't exist. You will need to use createOrRemplaceInventoryItem to create a new one.

Upvotes: 0

TiChu
TiChu

Reputation: 1

First, try the getInventoryItems API without limit and offset values.

If the value still returns 0 as count, try to gain new token for the Bearer and double-check with the actual account in the ebay website.

It may be that you are obtaining valid token, but from another account.

Else, try to contact the developers in ebay.

Upvotes: 0

Related Questions