07-21-2023 11:06 AM
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?
07-24-2023 04:17 PM
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"
]
}
07-25-2023 10:12 AM
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.
07-25-2023 02:38 PM
Hi @davick-39
I have used the following request URL: https://api.ebay.com/sell/inventory/v1/location/TEST_LOCATION
07-27-2023 11:25 AM
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.
07-28-2023 05:09 AM
Having exactly the same issue so no point starting a new thread. Also using the Sandbox and exact same error
08-02-2023 10:17 AM
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?
08-02-2023 10:54 AM
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.)"}]}
08-05-2023 02:40 PM
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.
08-08-2023 06:05 AM
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.
08-14-2023 10:16 AM
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.
08-15-2023 12:28 PM
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
08-25-2023 06:13 AM
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
09-04-2023 02:19 PM
Are there any updates to this issue or a workaround?
09-07-2023 03:32 AM
Having the same issue as everyone else. Man I wish eBay cared about its user base.