question

lubefinder avatar image
0 Likes"
lubefinder asked

Cannot get List of Inventory Items

Calling https://api.sandbox.ebay.com/sell/inventory/v1/inventory_item?limit=2&offset=0 on sandbox results in 500 error

{
  "errors": [
    {
      "errorId": 25001,
      "domain": "API_INVENTORY",
      "subdomain": "Selling",
      "category": "SYSTEM",
      "message": "A system error has occurred."
    }
  ]
}


fulfillment api
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

shave_3589 avatar image
0 Likes"
shave_3589 answered

@lubefinder I think we need to provide an array of SKU to get inventory Items like for one item we provide the SKU as URL params to get the inventory item. Even for the publishing offer we provide the offerID as URL params and for bulk publishing offers we provide an array of offerIDs. was it working before ?

10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

shave_3589 avatar image
0 Likes"
shave_3589 answered

@lubefinder use this API to get items https://api.sandbox.ebay.com/sell/inventory/v1/bulk_get_inventory_item

and provide the request body like this

{

"requests":[

{

"sku":" 3"},

{

"sku":"324AS"}.....

]

}

· 1
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Yes, I hadn't seen that one. Slight pain that you can only request 25 at a time. Still, the better solution would be for getInventoryItems to work on sandbox as it does on production. Even the help docs for bulkGetInventoryItem states "For those who prefer to retrieve only one inventory item record by SKU value, , the getInventoryItem method can be used. To retrieve all inventory item records defined on the seller's account, the getInventoryItems method can be used (with pagination control if desired)."

0 Likes 0 ·
lubefinder avatar image
0 Likes"
lubefinder answered

I'm not so sure.

You can call https://api.sandbox.ebay.com/sell/inventory/v1/inventory_item/{SKU} to get individual Inventory Items for sure, but you can calso call https://api.sandbox.ebay.com/sell/inventory/v1/inventory_item to get ALL of your inventory items.

That is according to https://developer.ebay.com/api-docs/sell/inventory/resources/inventory_item/methods/getInventoryItems


The first call to get individual SKU's succeeds, but the second call to get all InventoryItems in one call fails. It would be a huge pain to have to call getInventoryItem once per SKU, just like it is because there is no bulk getOffers to just return ALL of my offers regardless of SKU.

10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

lubefinder avatar image
0 Likes"
lubefinder answered

The behaviour has changed slightly on this.

Here is the call to getInventoryItem for my SKU XXXXX

https://api.sandbox.ebay.com/sell/inventory/v1/inventory_item/XXXXX

{
  "sku": "XXXXX",
  "locale": "en_GB",
  "product": {
    "title": "XXXXX",
    "aspects": {
      "Brand": [
        "XXXXX"
      ],
      "EAN": [
        "XXXXX"
      ],
      "Country/Region of Manufacture": [
        "XXXXX"
      ],
      "MPN": [
        "XXXXX"
      ],
      "UPC": [
        "XXXXX"
      ]
    },
    "brand": "XXXXX",
    "mpn": "XXXXX",
    "imageUrls": [
      "XXXXX"
    ]
  },
  "condition": "NEW",
  "availability": {
    "shipToLocationAvailability": {
      "quantity": 18
    }
  }
}

And if I call getInventoryItems it shows the SKU's but does not show the detail for each like it does in the docs, and on production.

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

{
  "total": 94,
  "size": 25,
  "href": "/sell/inventory/v1/inventory_item?offset=0&limit=25",
  "next": "/sell/inventory/v1/inventory_item?offset=25&limit=25",
  "limit": 25,
  "inventoryItems": [
    {
      "sku": "XXXXX"
    },
    ......


10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.