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

Error from inventory.createInventoryLocation API method

(Note - I am reposting this here as it seems a better forum for the question than my original post in "eBay APIs: Talk to your fellow developers")

 

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 7
latest reply
6 REPLIES 6

Re: Error from inventory.createInventoryLocation API method

Same experience - using payload data that was previously functioning and also with the sample data from the api explorer it returns this error. 

Not the first time encountering some issues with the ebay api here 😞 

Screen Shot 2023-07-30 at 15.52.43.png

 CURL: 

curl --request POST \
--header 'Authorization: Bearer *****' \
--header 'Content-Type: application/json' \
--data '{
"location": {
"address": {
"addressLine1": "2055 Hamilton Ave",
"addressLine2": "Building 3",
"city": "San Jose",
"stateOrProvince": "CA",
"postalCode": "95125",
"country": "US"
}
},
"locationInstructions": "Open for drop-off only.",
"name": "Warehouse-1",
"merchantLocationStatus": "ENABLED",
"locationTypes": [
"WAREHOUSE"
],
"operatingHours": [
{
"dayOfWeek": "MONDAY",
"intervals": [
{
"open": "09:00:00",
"close": "12:00:00"
},
{
"open": "13:00:00",
"close": "18:00:00"
}
]
},
{
"dayOfWeek": "TUESDAY",
"intervals": [
{
"open": "09:00:00",
"close": "15:00:00"
}
]
}
],
"specialHours": [
{
"date": "2016-10-19T00:09:00.000Z",
"intervals": [
{
"open": "09:00:00",
"close": "11:00:00"
}
]
}
]
}'
Message 2 of 7
latest reply

Re: Error from inventory.createInventoryLocation API method

To note: 
Production version of this api seems to be working fine, but the sandbox does not... It's blocking when working on new development features. 

Message 3 of 7
latest reply

Re: Error from inventory.createInventoryLocation API method

I just tested this and it is the same with me. Works on production but not sandbox.

Message 4 of 7
latest reply

Re: Error from inventory.createInventoryLocation API method

Same here. Can't create inventory location and hence can't create offer🤷

Message 5 of 7
latest reply

Re: Error from inventory.createInventoryLocation API method

Problem still remains, I got the the same error, even with the default payload..

Message 6 of 7
latest reply

Re: Error from inventory.createInventoryLocation API method

Hi @raretrocollectibles @vin460 @kcastizo @dianam-5801202 

 

Create and manage inventory location API calls like createInventoryLocation, updateInventoryLocation are working fine on the Sandbox environment and you should be able to create/manage the inventory locations  in the Sandbox. 

Best Regards,
eBay Developer Support
Message 7 of 7
latest reply