• 0
Sign in to follow this  

Relisting produces error


I get the following error when attempting to re-list an item just like it says in the API documentation (by supplying price, quantity and listing type):


{'status': 400, 'message': 'body.invalid', 'cause': [], 'error': 'A body is expected. (B)'}
Now, my question is: When it says body, does it mean description or something else? In the case of the latter, what specifically does it mean by body? I did not find this error in the documentation. 
Source of request attempted:
I simply supplied by own data for the fields involved as well as the item id. 

Share this post

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Você deve por as informações básicas de quantidade, preço e tipo de anúncio como array. pelo visto não fez isto, ele está dizendo que o body, o array citado, está vazio

Boas, o problema foi com python requests e foi resolvido com o parametro "json". Assim:
requests.post( URL, json={ 'price': myprice, blablabla } )
Com requests.post(), é preciso especificar o parametro como "json".
Obrigado pela ajuda.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this