skip to Main Content

I’m planning to integrate a website with eBay using PHP, but first I’m using Postman to test everything.

Authorization took me an entire day, but I think I’ve got it working now. (I had to update to the latest version of Postman, then I got it to create a token for me.)

I say I think because I haven’t managed to get a single request to work. I deliberately chose bulkGetInventoryItem (documentation) as it seemed like one of the easier authorized requests to get working. I just know that when the authentication settings are wrong, I get a different error message to when they are right.

For troubleshooting reasons, I made a token with all the scopes:

(added as space-separated list of links)

I have changed one of the eBay listings to have an SKU of “123456” just for this test, however the error I get is exactly the same as if I change "sku": "123456" to "sku": "anObviouslyFakeSKU", but anything else I change creates a new error, so I’m suspecting the issue to be SKU related, but maybe it isn’t. (I’ve found the eBay API to be very poor at sending relevant error messages.)

I’m quite new to Postman, so it’s likely a rookie mistake.

Earlier errors have shown to be minor punctuation issues or wrong radio buttons ticked, so hopefully whatever the error is this time, it should appear in this screenshot.

What did I do wrong this time? (Let me know if there are any other screenshots I can send that might help.)

screenshot

To help, both with the post’s SEO, and ease of copy/pasting, I am transcribing the important text in the screenshot above:

url

POST https://api.ebay.com/sell/inventory/v1/bulk_get_inventory_item

body, raw

{
  "requests": [
    {
      "sku": "123456"
    }
  ]
}

output

{
    "errors": [
        {
            "errorId": 2003,
            "domain": "ACCESS",
            "category": "APPLICATION",
            "message": "Internal error",
            "longMessage": "There was a problem with an eBay internal system or process. Contact eBay developer support for assistance",
            "parameters": [
                {
                    "name": "reason",
                    "value": "Failed to transform underlying error response, see logs."
                }
            ]
        }
    ]
}

Update:
One more screenshotenter image description here

Update 2:
Another screenshotenter image description here

2

Answers


  1. Chosen as BEST ANSWER

    I figured out the issue. My biggest mistake was choosing bulkGetInventoryItem as the "simplest" call. I should have chosen getInventoryItem, as the error reporting on that function is far more user friendly.

    So the error I got, for exactly the same request was "We didn't find the entity you are requesting. Please verify the request"

    A quick google of the error found me this page https://forums.developer.ebay.com/questions/17883/cannot-get-my-listed-product-by-get-inventory-api.html which led me to the correct answer!

    The inventory item I was trying to access was unreachable because it was not created through the developer API.

    I hope this answer helps others, as it wasted a full day of my life trying getInventoryItem before tackling bulkGetInventoryItem.


  2. A few things you need to check for in Postman.

    1. When you authenticate and receive a token are you posting that token with your api calls like this one POST https://api.ebay.com/sell/inventory/v1/bulk_get_inventory_item?

    2. Have you set the Authorization HTTP header for authentication authorization?

    3. Have you set the Content-Type header for the call to application/json?

    More info here: https://developer.ebay.com/api-docs/sell/inventory/resources/inventory_item/methods/bulkGetInventoryItem

    Update

    Authorization with environment variable in Postman:

    Authorization with environment variable

    Postman environment variables documentation:
    https://learning.postman.com/docs/postman/variables-and-environments/variables/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search