• 0
ebravo

Error al carga nuevo items

Question

Hola, necesito ayuda, estoy tratando de usar la api de mercadolibre con php, y me da el siguiente error al tratar de agregar un nuevo items:

 

array(2) { ["body"]=> object(stdClass)#3 (4) { ["message"]=> string(172) "No signature of method: java.util.LinkedHashMap$Entry.remove() is applicable for argument types: (java.lang.String) values: [id] Possible solutions: getAt(java.lang.String)" ["error"]=> string(14) "internal_error" ["status"]=> int(500) ["cause"]=> array(0) { } } ["httpCode"]=> int(500) }

 

y el código php es el siguiente:

 

$item = array(

 "title" => "Anteojos Ray Ban Wayfare",
 "category_id" => "MLA5529", 
 "price" => 10,
 "currency_id" => "ARS",
 "available_quantity" => 1,
 "buying_mode" => "buy_it_now",
 "listing_type_id" => "bronze",
 "condition" => "new",
 "attributes" => array("id"=>"83000","value_id"=>array("id" => "91993", "name" => "Rojo")), 
 "description" => "Item:,  Ray-Ban WAYFARER Gloss Black RB2140 901  Model: RB2140. Size: 50mm. Name: WAYFARER. Color: Gloss Black. Includes Ray-Ban Carrying Case and Cleaning Cloth. New in Box",
 //"video_id" => "YOUTUBE_ID_HERE",
 "warranty" => "12 month by Ray Ban", 
 "pictures" => array(array("source" => ""http://en.wikipedia.org/wiki/File:Teashades.gif")));
 
$eee = $meli->post("/items", $item, array('access_token' => $_SESSION['access_token'])); 
 
Alguien puede ayudarme? gracias

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

caro Bravo,

 

já houve um tópico deste: http://developers-forum.mercadolibre.com/index.php?/topic/722-listando-itens-com-variation/?hl=attributes

 

se não estou enganado não existe mais o listing_type_id "bronze", tente "free" ou "silver". E aqui no Brasil não existe a combinação "new" and "free"

Sem o Attributes dá certo?

também tente:

"attributes" => array("id"=>83000,"value_id"=>array("id" => 91993)), 

 

nunca usei o attributes, não seria variations? http://developers.mercadolibre.com/list-with-variation/

 

Até mais

Rodrigo

Share this post


Link to post
Share on other sites
  • 0

Hola Youngling:

 

Tu error esta en el array de attributes. Prueba enviando los datos pero quitando esa parte

 

$item = array(

 "title" => "Anteojos Ray Ban Wayfare",
 "category_id" => "MLA5529", 
 "price" => 10,
 "currency_id" => "ARS",
 "available_quantity" => 1,
 "buying_mode" => "buy_it_now",
 "listing_type_id" => "bronze",
 "condition" => "new",
"variations" => array(
array(
"attribute_combinations" => array(
array(
"id" => "63000",
"value_id" => "71995",
),
array(
"id" => "33000",
"value_id" => "51993",
),
array(
"id" => "43000",
"value_id" => "52065",
),
),
 "description" => "Item:,  Ray-Ban WAYFARER Gloss Black RB2140 901  Model: RB2140. Size: 50mm. Name: WAYFARER. Color: Gloss Black. Includes Ray-Ban Carrying Case and Cleaning Cloth. New in Box",
 //"video_id" => "YOUTUBE_ID_HERE",
 "warranty" => "12 month by Ray Ban", 
 
EL problema es que no es possible utilizar atributos directamente. debes usar variations: http://developers.mercadolibre.com/list-with-variation/
 
Espero te sirva.

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