cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

In the API Explorer I have a different response than through the API. Why?!

Hello, 

 

API Explorer response for https://api.ebay.com/sell/inventory/v1/bulk_migrate_listing

{
  "responses": [
    {
      "statusCode": 400,
      "listingId": "184762324743",
      "marketplaceId": "EBAY_DE",
      "errors": [
        {
          "errorId": 25002,
          "domain": "API_INVENTORY",
          "subdomain": "Selling",
          "category": "REQUEST",
          "message": "A user error has occurred. The listing SKU cannot be null or empty."
        }
      ]
    }
  ]
}

Response for API the same URL and the same parameters as in API explorer

{
"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."
    }]
}]
}

 

Same account. Production in both cases. Same parameters. Yes, I know that you need to set the SKU for the offer before migration, but that's not the problem.

 

API Explorer gives more specific error details, API doesn't. So what? if I have a general error in the API, I have to make a query through API Explorer to get to know the details?!

 

Tell me what I'm doing wrong. I want the same error descriptions in the API. 

 

Regards

Message 1 of 3
latest reply
1 BEST ANSWER

Accepted Solutions

In the API Explorer I have a different response than through the API. Why?!

for a request payload of:

 

 

{"requests":[{"listingId":"<your_item_id>"}]}

 

 

I receive in both the explorer and directly the following response.

 

 

{
  "responses": [
    {
      "statusCode": 400,
      "listingId": "<your_item_id>",
      "errors": [
        {
          "errorId": 25002,
          "domain": "API_INVENTORY",
          "subdomain": "Selling",
          "category": "REQUEST",
          "message": "A user error has occurred. Invalid listing id"
        }
      ]
    }
  ]
}

 

 

If I don't send a payload, I receive in both the following:

 

 

{
    "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"
        }
    ]
}

 

 

If I add a header of Accept:text/html to the headers section of the API Explorer I receive the exact error message you get.

 

 

{
  "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."
        }
      ]
    }
  ]
}

 

 


So my guess is it is likely a header issue, to a lesser extent perhaps something with the payload, -- in whatever client you are using to interface with the API.

 

View Best Answer in original post

Message 2 of 3
latest reply
2 REPLIES 2

In the API Explorer I have a different response than through the API. Why?!

for a request payload of:

 

 

{"requests":[{"listingId":"<your_item_id>"}]}

 

 

I receive in both the explorer and directly the following response.

 

 

{
  "responses": [
    {
      "statusCode": 400,
      "listingId": "<your_item_id>",
      "errors": [
        {
          "errorId": 25002,
          "domain": "API_INVENTORY",
          "subdomain": "Selling",
          "category": "REQUEST",
          "message": "A user error has occurred. Invalid listing id"
        }
      ]
    }
  ]
}

 

 

If I don't send a payload, I receive in both the following:

 

 

{
    "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"
        }
    ]
}

 

 

If I add a header of Accept:text/html to the headers section of the API Explorer I receive the exact error message you get.

 

 

{
  "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."
        }
      ]
    }
  ]
}

 

 


So my guess is it is likely a header issue, to a lesser extent perhaps something with the payload, -- in whatever client you are using to interface with the API.

 

Message 2 of 3
latest reply

In the API Explorer I have a different response than through the API. Why?!

Hello,

 

thank you very much for your help.

 

I checked the request headers as you suggested.

The bulkMigrateListing method requires a header in the request: 'Accept', 'application/json' to return detailed errors. This method works fine without this header, it just doesn't return detailed error information if the header is missing.

 

Now I have this response for an attempt to migrate a multi-variant offer that has no SKU/groupId set.

 

{
    "responses":[
    {
        "statusCode":400,
        "listingId":"1********7",
        "marketplaceId":"EBAY_DE",
        "errors":[
            {
                "errorId":25002,
                "domain":"API_INVENTORY",
                "subdomain":"Selling",
                "category":"REQUEST",
                "message":"A user error has occurred. The listing SKU cannot be null or empty."
            }]
    }]
}

 

 

 

Thank you for your time

Regards

Message 3 of 3
latest reply