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

Unknown errors from the inventory API's "createInventoryLocation" method

Attempting to write a connector to eBay's inventory API, I'm using the API explorer to test out some method calls in the sandbox environment.  The example request for the "createInventoryLocation" call seems to error out with a 400 code, despite all attempts to correct the body and merchantLocationKey parameter.  The error message is particularly (some would say aggressively) useless in this case - included below for clarity:

 

```

{
"errors": [
{
"errorId": 25802,
"domain": "API_INVENTORY",
"category": "REQUEST",
"message": "errorDetails(20400/Invalid request.)"
}
]
}

```

 

Note that this is with the default example request body in the API explorer.  Nothing has been changed except several attempts at unique merchantLocationKeys - there are no inventory locations in our sandbox environment anyway, so I would expect any string shorter than 36 characters (as per the documentation) to work.  Additionally, I would expect any errors from that field to be relayed in the error message response.

 

Does anyone have any experience with this endpoint, or could shed any light on this bug?

Message 1 of 23
latest reply
22 REPLIES 22

Re: Unknown errors from the inventory API's "createInventoryLocation" method

Hi @davick-39 

 

createInventoryLocation call is working fine and we are able create the new new inventory location with the request body mentioned below:

{
    "location": {
        "address": {
            "addressLine1": "Test Addrress",
            "addressLine2": "Test Addrress2",
            "city": "Meridian",
            "stateOrProvince": "Illinois",
            "postalCode": "83642",
            "country": "US"
        }
    },
    "locationInstructions": "Items ship from here.",
    "name": "TEST WAREHOUSE",
    "merchantLocationStatus": "ENABLED",
    "locationTypes": [
        "WAREHOUSE"
    ]
}
Best Regards,
eBay Developer Support
Message 2 of 23
latest reply

Re: Unknown errors from the inventory API's "createInventoryLocation" method

Could I ask what you are using as the `merchantLocationKey`?  I attempted to use the request body you have provided with a unique random [a-z] string for the key, but it is still returning the same 400 error code and useless "Bad Request" message.  Our developer account username is `dows-developer`, if that helps you diagnose this issue further.

Message 3 of 23
latest reply

Re: Unknown errors from the inventory API's "createInventoryLocation" method

Hi @davick-39 

 

I have used the following request URL: https://api.ebay.com/sell/inventory/v1/location/TEST_LOCATION

 
merchantLocationKey parameter takes the input as a string of characters. All characters in the Unicode character set are supported.
 
Character entity references are used for escaping markup-significant characters. For example, use &amp; for the & (ampersand) character, &lt; for the < (less-than sign) character, and &gt; for the > (greater-than sign) character. It is a good idea to escape such characters in requests instead of using a CDATA construct. Responses from eBay do not include CDATA constructs.
Best Regards,
eBay Developer Support
Message 4 of 23
latest reply

Re: Unknown errors from the inventory API's "createInventoryLocation" method

Okay, I'm familiar with how to construct url-encoded strings - that is not the issue at the moment.  The issue is the bad request error that has continued to persist.  Are you able to check our dev account (dows-developer) for whether we have that feature enabled?  If you are able to successfully run that command in the sandbox environment, but we are not while using the same request body and url parameter (which seems to be the case, as I have just run the test again and received the same failure message) - that suggests to me that it is an issue with either our account permissions or the sandbox server itself.

 

To reiterate - request url: 

https://api.sandbox.ebay.com/sell/inventory/v1/location/TEST_LOCATION

 

Request body:

{
"location": {
"address": {
"addressLine1": "Test Addrress",
"addressLine2": "Test Addrress2",
"city": "Meridian",
"stateOrProvince": "Illinois",
"postalCode": "83642",
"country": "US"
}
},
"locationInstructions": "Items ship from here.",
"name": "TEST WAREHOUSE",
"merchantLocationStatus": "ENABLED",
"locationTypes": [
"WAREHOUSE"
]
}

 

Error received:

{
"errors": [
{
"errorId": 25802,
"domain": "API_INVENTORY",
"category": "REQUEST",
"message": "errorDetails(20400/Invalid request.)"
}
]
}

 

All other API routes we have tested appear to be working correctly.  It is only this route that seems to be impossible to use.

Message 5 of 23
latest reply

Re: Unknown errors from the inventory API's "createInventoryLocation" method

Having exactly the same issue so no point starting a new thread. Also using the Sandbox and exact same error

Message 6 of 23
latest reply

Re: Unknown errors from the inventory API's "createInventoryLocation" method

developer_support@ebay Not sure what the status of this issue is at this point, but it is significantly blocking development of our application.  We do not feel comfortable using the production API to test our work.  Is there a solution in the pipeline for this?

Message 7 of 23
latest reply

Re: Unknown errors from the inventory API's "createInventoryLocation" method

Also having the same problem. I've tried submitting the suggested request and got this response:

{
    "errors": [
        {
            "errorId": 25802,
            "domain": "API_INVENTORY",
            "category": "REQUEST",
            "message": "errorDetails(20400/Invalid request.)"
        }
    ]
}
Message 8 of 23
latest reply

Re: Unknown errors from the inventory API's "createInventoryLocation" method

I have the same error as everyone else in this thread. Apparently the problem is in https://api.sandbox.ebay.com. Please test your request in a sandbox environment.

Message 9 of 23
latest reply

Re: Unknown errors from the inventory API's "createInventoryLocation" method

I'm also seeing this issue in sandbox - but it's working fine in production. Does anyone know if there is a way to work around this? As far as I can see, this is blocking to testing creating offers through the API as `merchantLocationKey` is a required field.

Message 10 of 23
latest reply

Re: Unknown errors from the inventory API's "createInventoryLocation" method

developer_support@ebay  Can we please get an update on this bug?  Lots(!) of development hours are being wasted due to this issue - we are now at 3+ weeks without resolution.

Message 11 of 23
latest reply

Re: Unknown errors from the inventory API's "createInventoryLocation" method

I can't see to get this endpoint to work on sandbox either.
Works on production but not on sandbox.

I have no way of testing offer without creating an inventory location

Message 12 of 23
latest reply

Re: Unknown errors from the inventory API's "createInventoryLocation" method

I've got the exact same issue as others in this thread. I've wasted far to many hours chasing an issue which seems to be in the sandbox. My script isn't ready to be used against a production enviroment yet (hence using the sandbox) but how am I supposed to test when the sandbox itself is broken? Please help

Message 13 of 23
latest reply

Re: Unknown errors from the inventory API's "createInventoryLocation" method

Hi developer_support@ebay 

Are there any updates to this issue or a workaround?

Message 14 of 23
latest reply

Re: Unknown errors from the inventory API's "createInventoryLocation" method

Having the same issue as everyone else. Man I wish eBay cared about its user base.

Message 15 of 23
latest reply