PHP: Publish item mercadolibre API

1

I have been working with the api of mercadolibre, now I wanted to publish an item (I managed to do it from Advance REST client) from my application PHP , but I have no idea how to pass the parameters in Advance REST client. step writing the json but it does not work like this:

$detallesART = array(
'title' => 'item numero 2', 
'category_id'=> 'MLA3530',
'price'=> 10,
'currency_id'=> 'ARS',
'available_quantity'=> 1,
'buying_mode'=> 'buy_it_now',
'listing_type_id'=> 'gold_special',
'condition'=> 'new',
'description'=>  'Item de test - No Ofertar',
'video_id'=> 'YOUTUBE_ID_HERE',
'warranty'=> '12 months',
'pictures' => array('source' => 'http://mla-s2-p.mlstatic.com/968521-MLA20805195516_072016-O.jpg')
);

$crear= $meli->postWithAccessToken('/items', $detallesART);

echo "<hr>".$crear['json']['permalink'];

I think the conflict is in the array where you sent the data, I do not know how to send it.

    
asked by Jonathan Pradi 20.01.2017 в 22:29
source

0 answers