• 0
Sign in to follow this  
Dashius

Relisting produces error

Question

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. 
 
Edit: 
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this