question

geoffrey59 avatar image
0 Likes"
geoffrey59 asked ·

sandbox broken: createOrReplaceInventoryItem return 204 but doesnt create the item


Hello,


I am trying to migrate my application to the Sell API.

I studied all the ebay documentation, and most of things doesn't work as expected in sandbox.

I try to createOrReplaceInventoryItem with a given body on the sandbox, it returns a 204 http code, with empty response... well... let's google "204 response ebay sandbox": the support seems to think that's it's a normal response code for an API, and it means that's it's OK, and the item is created. hmm. it should return a 200 then, but why not.

So let's call getInventoryItems to check if it's created: nothing is returned. And this time, it's a 200 http code. Weird.


I double check my code, everything seems normal.


So I try in production. The createOrReplaceInventoryItem return the same response (204 and empty body) but this time, the item is created.


Why is the sandbox behave differently than production ?


Thank you...

createorreplaceinventoryitem
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
sagar_developersupport avatar image
0 Likes"
sagar_developersupport answered ·

Hi @geoffrey59,

Please retry the createOrReplaceInventoryItem call in sandbox and then execute getInventoryItem to retrieve the inventory item record for a given SKU.

https://developer.ebay.com/api-docs/sell/inventory/resources/inventory_item/methods/getInventoryItem

Note: HTTP Status Code 204 indicates that the server has successfully fulfilled the request and there is no additional content to send in the response payload body.

Best Regards ,
eBay Developer Support

· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.