Search the Community

Showing results for tags 'Classifieds'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Português
    • Autenticação e Autorização
    • Gerenciamento de perguntas e respostas
    • Gerenciamento de produtos
    • Gerenciamento de vendas
    • Gerenciamento de envios
    • Gerenciamento de usuário
    • Controle de notificações
    • Gerenciamento de mensagens pós-venda
  • Español
    • Autenticación y Autorización
    • Gestión de preguntas y respuestas
    • Gestión de productos
    • Gestión de ventas
    • Gestión de envíos
    • Gestión de usuario
    • Control de notificaciones
    • Gestión de mensajes post-venta
  • English
    • Authentication and Authorization
    • Question & Answer Management
    • Product Management
    • Sales Management
    • Shipment Management
    • User Management
    • Notification control
    • Post Sale Message Management
  • Off Topic
    • Events
    • Off Topic
    • Documentation improvements
    • Jobs

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 17 results

  1. Hola Tenemos un problema complicado. Estamos publicando correctamente, las publicaciones se visualizan bien pero las imagenes quedan "procesando". Hemos probado de todas formas y el mismo resultado. Lo que hicimos ahora fue "ir para atras" y utilizamos la "mercadolibre rest console" y tenemos el mismo resultado. Alguien sabe que puede ser ? El post { "title":"Anteojos Ray Ban Wayfare", "category_id":"MLA127033", "price":10, "currency_id":"ARS", "available_quantity":1, "buying_mode":"buy_it_now", "listing_type_id":"bronze", "condition":"new", "description": "Item:, <strong> Ray-Ban WAYFARER Gloss Black RB2140 901 </strong> 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 months by Ray Ban", "pictures":[ {"source":"http://upload.wikimedia.org/wikipedia/commons/f/fd/Ray_Ban_Original_Wayfarer.jpg"}, {"source":"http://en.wikipedia.org/wiki/File:Teashades.gif"} ] } La respuesta { "id": "MLA608210139", "site_id": "MLA", "title": "Anteojos Ray Ban Wayfare", "subtitle": null, "seller_id": 199490659, "category_id": "MLA127033", "official_store_id": null, "price": 10, "base_price": 10, "original_price": null, "currency_id": "ARS", "initial_quantity": 1, "available_quantity": 1, "sold_quantity": 0, "buying_mode": "buy_it_now", "listing_type_id": "gold_special", "start_time": "2016-02-27T21:13:54.532Z", "stop_time": "2036-02-22T21:13:54.532Z", "end_time": "2036-02-22T21:13:54.532Z", "condition": "new", "permalink": "http://articulo.mercadolibre.com.ar/MLA-608210139-anteojos-ray-ban-wayfare-_JM", "thumbnail": "http://www.mercadolibre.com/jm/img?s=STC&v=I&f=proccesing_image_es.jpg", "secure_thumbnail": "https://www.mercadolibre.com/jm/img?s=STC&v=I&f=proccesing_image_es.jpg", "pictures": [{ "id": "713711-MLA20606062726_022016", "url": "http://www.mercadolibre.com/jm/img?s=STC&v=O&f=proccesing_image_es.jpg", "secure_url": "https://www.mercadolibre.com/jm/img?s=STC&v=O&f=proccesing_image_es.jpg", "size": "500x500", "max_size": "500x500", "quality": "" }, { "id": "767711-MLA20606062727_022016", "url": "http://www.mercadolibre.com/jm/img?s=STC&v=O&f=proccesing_image_es.jpg", "secure_url": "https://www.mercadolibre.com/jm/img?s=STC&v=O&f=proccesing_image_es.jpg", "size": "500x500", "max_size": "500x500", "quality": "" }], "video_id": "YOUTUBE_ID_HERE", "descriptions": [{ "id": "MLA608210139-1041268320" }], "accepts_mercadopago": true, "non_mercado_pago_payment_methods": [], "shipping": { "mode": "not_specified", "local_pick_up": false, "free_shipping": false, "methods": [], "dimensions": null, "tags": [] }, "international_delivery_mode": "none", "seller_address": { "id": 174199283, "comment": "", "address_line": "Test Address 123", "zip_code": "1414", "city": { "id": "", "name": "Palermo" }, "state": { "id": "AR-C", "name": "Capital Federal" }, "country": { "id": "AR", "name": "Argentina" }, "latitude": -34.5711496, "longitude": -58.4232966, "search_location": { "neighborhood": { "id": "", "name": "" }, "city": { "id": "TUxBQ0NBUGZlZG1sYQ", "name": "Capital Federal" }, "state": { "id": "TUxBUENBUGw3M2E1", "name": "Capital Federal" } } }, "seller_contact": null, "location": {}, "geolocation": { "latitude": -34.5711496, "longitude": -58.4232966 }, "coverage_areas": [], "attributes": [], "warnings": [], "listing_source": "", "variations": [], "status": "not_yet_active", "sub_status": [], "tags": [], "warranty": "12 months by Ray Ban", "catalog_product_id": null, "seller_custom_field": null, "parent_item_id": null, "differential_pricing": null, "deal_ids": [], "automatic_relist": false, "date_created": "2016-02-27T21:13:54.937Z", "last_updated": "2016-02-27T21:13:54.937Z" }
  2. Hola, estoy armando una función para obtener todas las propiedades en venta/alquiler en un determinado radio. El problema es que no sé como funciona realmente el endpoint search con el parámetro item_location. https://api.mercadolibre.com/sites/MLA/search?item_location=lat:{latitude1_latitude2},lon:{longitude1_longitude2}&category={Category_Id} Esto es lo que dice en la documentación: Lo que no entiendo es como se arma el rango. El primer par (lat,lon) representa el centro y el segundo el radio? Además de eso, para probar usé pares lat,lon de prueba dentro de la Capital Federal de Argentina y no obtengo ningún resultado, no sé que estoy haciendo mal. Por ejemplo para San Telmo tengo dos punto cercanos: (-34.617369,-58.375897) ; (-34.617228,-58.371692), por lo que el request sería (según entiendo yo): https://api.mercadolibre.com/sites/MLA/search?item_location=lat:-34.617369_-34.617228,lon:{-58.375897_-58.371692}&category=MLA1459 Si prueban ese request verán que no devuelve resultados, pero no sé que está mal.
  3. Autenticacion con .NET

    Problemas para autenticar con .NET

    Hola buenas tardes, he creado una aplicacion en mercadolibre para .NET, pero tengo dudas en el Redirect URI: segun los ejemplos ponen localhost, mi pregunta es tengo que crear una pagina para autenticar a los usuarios y esa ponerla en Redirect URI?
  4. He desarrollado una clase modificada del SDK para PHP y con ella, una webapp para importar y publicar masivamente (básicamente es para migrar desde un perfil a otro). Demo: https://www.rumat.com.ar/newapi/ Repository: https://github.com/yosietserga/MELI-Importer-and-Publisher He colocado los mensajs del log que se envíen por email, para que les llegue el reporte con el log, deben ingresar el email en el campo de abajo. EL PROBLEMA El problema es el siguiente, tengo 4 semanas intentando que se publiquen las imágenes al crear el producto dentro de una cuenta ML, pero no logro que se vean o que las agarre. Al principio solo ubicaba el link de la misma imagen del producto proveniente de ML y la colocaba tal cual para ahorrar ancho de banda, tanto de ML como del importador, pero nada que funcionó. Cambiando la lógica, modifiqué el código para descargar la imagen al servidor, renombrarla y luego colcoar el link de la imagen descargada, pero el problema persiste. Ya en medidas desesperadas, coloqué la URL de una imagen X en internet para descartar cualquier error con el archivo en sí, y aún así, nada que funciona. Eso por un lado, por otra parte, a los productos que tienen variaciones o atributos (como los zapatos), al publicarlos usando la estructura sugerida por developers.mercadolibre.com, genera un error indicando que faltaron unos atributos que son obligatorios, al comparar el Array generado por la app, veo que se genera exactamente igual a la documentación de ML. No tengo idea de cuales son los errores ni en dónde se encuentran. Por favor, si lguien tiene mayor conocimiento sobre el asunto, por favor ayúdame. NOTA: Los mensajes de logs legan serializados, para leerlo con comodidad, deben usar alguna herramienta online que los estructure de manera más legible. ARCHIVOS La clase principal versionada de MELI es esta: <?php require_once(__DIR__.'/../../vendor/xhttp/xhttp.php'); require_once(__DIR__.'/../../vendor/meli/meli.php'); class Necoyoad_Meli { public $app_id; public $app_secret; public $token; public $refresh_token; public $expire; public $code; public $meli_id; private $handler; private $meli; private $redirectTo; private $request; private $session; private $oauth_url; public function __construct($app_id, $app_secret) { if (class_exists('xhttp')) { $this->handler = new xhttp; } else { $this->handler = new thisHandler; } $this->app_id = $app_id; $this->app_secret = $app_secret; $this->meli = new Meli($this->app_id, $this->app_secret); $this->request = new Necoyoad_Request; $this->session = new Necoyoad_Session; } public function initialize() { $this->oauth_url = $this->meli->getAuthUrl($this->getRedirectUrl()); } public function setRedirectUrl($url) { $this->redirectTo = $url; } public function getRedirectUrl() { return $this->redirectTo; } public function index() { $mlactions = array( 'import_products', 'publish_products', 'add_profile' ); $this->initialize(); if ($this->request->hasQuery('action')) { $_SESSION['mlaction'] = $this->request->getQuery('action'); } if ($this->request->getQuery('action') == 'add_profile') { $this->clear_code(); $this->clear_token(); $this->clear_refresh_token(); $this->clear_expire(); $this->redirect(); } if ($this->request->hasQuery('code') && !$this->get_code()) { $response = $this->authorize($this->request->getQuery('code'), $this->getRedirectUrl()); $this->set_code( $this->request->getQuery('code') ); $response['body'] = (object)json_decode($response['body']); if (isset($response['body']->access_token)) $this->set_token( $response['body']->access_token ); if (isset($response['body']->expires_in)) $this->set_expire( time() + $response['body']->expires_in ); if (isset($response['body']->refresh_token)) $this->set_refresh_token( $response['body']->refresh_token ); unset($_GET['code']); } if (!$this->get_code() && $this->request->hasQuery('meli')) { $this->clear_code(); $this->clear_token(); $this->clear_refresh_token(); $this->clear_expire(); $this->redirect(); } $this->check_expire( $this->get_expire() ); if ($this->get_token()) { if (isset($_SESSION['mlaction']) && in_array($_SESSION['mlaction'], $mlactions)) { $result = $this->{$_SESSION['mlaction']}(); } else { $this->clear_code(); $this->clear_token(); $this->clear_refresh_token(); $this->clear_expire(); } } else { $this->clear_code(); $this->clear_token(); if ($this->request->hasQuery('meli')) { $this->redirect(); } } if (isset($_REQUEST['logout'])) { $this->clear_code(); $this->clear_token(); $this->clear_refresh_token(); $this->clear_expire(); } if ($this->request->hasQuery('error')) { return array( 'error'=>$this->request->getQuery('error'), 'error_description'=>$this->request->getQuery('error_description') ); } elseif (isset($result)) { return $result; } } public function clear_code() { unset($this->code); unset($_SESSION['mlcode']); } public function clear_token() { unset($this->token); unset($_SESSION['mltoken']); } public function clear_meli_id() { unset($this->meli_id); unset($_SESSION['mlmeli_id']); } public function clear_refresh_token() { unset($this->refresh_token); unset($_SESSION['mlrefresh_token']); } public function clear_expire() { unset($this->expire); unset($_SESSION['mlexpire']); } public function get_code() { return isset($this->code) ? $this->code : $_SESSION['mlcode']; } public function set_code($code) { $this->code = $_SESSION['mlcode'] = $code; } public function get_token() { return isset($this->token) ? $this->token : $_SESSION['mltoken']; } public function set_token($token) { $this->token = $_SESSION['mltoken'] = $token; } public function get_refresh_token() { return isset($this->refresh_token) ? $this->refresh_token : $_SESSION['mlrefresh_token']; } public function set_refresh_token($refresh_token) { $this->refresh_token = $_SESSION['mlrefresh_token'] = $refresh_token; } public function get_expire() { return isset($this->expire) ? $this->expire : $_SESSION['mlexpire']; } public function set_expire($time) { $this->expire = $_SESSION['mlexpire'] = $time; } public function get_meli_id() { return isset($this->meli_id) ? $this->meli_id : $_SESSION['mlmeli_id']; } public function set_meli_id($meli_id) { $this->meli_id = $_SESSION['mlmeli_id'] = $meli_id; } public function check_expire($time) { if(isset($time) && $time < time()) { // Make the refresh proccess $refresh = $this->refreshToken(); if (isset($refresh->error)) { return array( 'error'=>$refresh->error, 'status'=>$refresh->status, 'message'=>$refresh->message ); } else { // Now we create the sessions with the new parameters $this->set_token( $refresh->access_token ); $this->set_refresh_token( $refresh->refresh_token ); $this->set_expire( time() + $refresh->expires_in ); } } } public function add_profile() { if ($this->get_token()) { $response = $this->fetch('/users/me'); return $this->addCustomerFromMeli(array( 'company' => $response['body']->nickname, 'firstname' => $response['body']->first_name, 'lastname' => $response['body']->last_name, 'email' => $response['body']->email, 'meli_id' => $response['body']->id, 'meli_token' => $_SESSION['mltoken'], 'meli_refresh'=> $_SESSION['mlrefresh_token'], 'meli_expire' => $_SESSION['mlexpire'], 'meli_code' => $_SESSION['mlcode'] )); } else { $this->redirect(); } } public function delete_profile($id) { $this->deleteCustomerFromMeli($id); } public function get_profiles($data = null) { return $this->getProfiles($data); } public function get_products($data = null) { return $this->getProducts($data); } public function get_activities($data = null) { return $this->getActivities($data); } public function import_products() { if ($this->get_token() && $this->get_meli_id()) { if (!$db || !($db instanceof Necoyoad_Db)) { $db = new Necoyoad_Db(DB_DRIVE, DB_HOST, DB_USER, DB_PWD, DB_NAME); } $response = $this->fetch("/users/{$this->get_meli_id()}/items/search"); $existente = 0; $nuevo = 0; $total = count($response['body']->results); foreach ($response['body']->results as $k => $v) { $resp = $this->fetch("/items/{$v}"); $desc = $this->fetch("/items/{$v}/description"); if ($resp['body']) { $meli_product_id = $resp['body']->id; $query = $db->query("SELECT * AS total FROM ". DB_PREFIX ."product WHERE `meli_product_id` = '" . $db->escape($meli_product_id) . "'"); if (empty($query->rows)) { $data = array(); $c = 0; $folder = __DIR__.'/../../../../images/data'; foreach ($resp['body']->pictures as $j => $img) { if (!$img->url) continue; $fc = file_get_contents($img->url); if (!is_dir($folder)) { mkdir($folder,0777); } if (!is_dir($folder .'/'. date('m-y'))) { mkdir($folder .'/'. date('m-y'), 0777); } $img_name = 'meli-'. $this->get_meli_id() .'-'. time().mt_rand(100000,9999999) . (substr($img->url, strrpos($img->url, '.'))); $img_file = $folder .'/'. date('m-y') .'/'. $img_name; $f = fopen($img_file, 'w+'); fwrite($f, $fc); fclose($f); $data['Images'][$c]['source'] = 'http://rumat.com.ar/newapi/images/data/'. date('m-y') .'/'. $img_name; $c++; } $varis = array(); foreach ($resp['body']->variations as $i => $variation) { foreach ($variation->attribute_combinations as $j => $combination) { $varis[$i]['attribute_combinations'][$j] = array( 'id'=>$combination->id, 'value_id'=>$combination->value_id ); } $varis[$i]['available_quantity'] = $variation->available_quantity; $varis[$i]['price'] = $variation->price; $varis[$i]['picture_ids'] = $variation->picture_ids; } $db->query("INSERT INTO ". DB_PREFIX ."product SET ". "`meli_id` = '". $db->escape($this->get_meli_id()) ."',". "`meli_product_id` = '". $db->escape($meli_product_id) ."',". "`meli_category_id` = '". $db->escape($resp['body']->category_id) ."',". "`name` = '". $db->escape($resp['body']->title) ."',". "`currency_id` = '". $db->escape($resp['body']->currency_id) ."',". "`available_quantity` = '". $db->escape($resp['body']->available_quantity) ."',". "`buying_mode` = '". $db->escape($resp['body']->buying_mode) ."',". "`listing_type_id` = '". $db->escape($resp['body']->listing_type_id) ."',". "`condition` = '". $db->escape($resp['body']->condition) ."',". "`description` = '". $db->escape($desc['body']->text) ."',". "`price` = '". $db->escape($resp['body']->price) ."',". "`image` = '". str_replace("'","\'",serialize($data['Images'])) ."'". (!$varis) ? '' : ",`variations` = '". str_replace("'","\'",serialize($varis)) ."'" ); $id = $db->getLastId(); $db->query("INSERT INTO `". DB_PREFIX ."property` SET ". "`object_id` = '". $id ."',". "`object_type` = 'product',". "`group` = 'meli',". "`key` = 'product_data',". "`value` = '". serialize($resp['body']) ."'" ); $this->addActivity(array( 'description'=>'Se importó con éxito el producto '. $resp['body']->title .' del perfil '. $this->get_meli_id(), 'type'=>'import', 'object_id'=>$this->get_meli_id(), 'object_type'=>'customer' )); $nuevo++; } else { $existente++; $this->addActivity(array( 'description'=>'Intento de importar el producto '. $resp['body']->title .' del perfil '. $this->get_meli_id() .', ya existe!', 'type'=>'import', 'object_id'=>$this->get_meli_id(), 'object_type'=>'customer' )); } if (!empty($_SESSION['reportToEmail'])) { mail($_SESSION['reportToEmail'], "ML Importer", 'Importancion de producto ' . '. MESSAGE: ' . "\n\r-------------------- PRODUCT IMPORTED -----------------------\n\r". serialize($varis). "\n\r-------------------- /PRODUCT IMPORTED ----------------------\n\r"); } } } $this->addActivity(array( 'description'=>'Se importaron '. $total .' productos del perfil '. $this->get_meli_id() .'. '. $nuevo .' productos nuevos y '. $existente .' productos existentes', 'type'=>'import', 'object_id'=>$this->get_meli_id(), 'object_type'=>'customer' )); if (!empty($_SESSION['reportToEmail'])) { mail($_SESSION['reportToEmail'], "ML Importer", 'Se importaron ' . $total . ' productos del perfil ' . $this->get_meli_id() . '. ' . $nuevo . ' productos nuevos y ' . $existente . ' productos existentes a las ' . date('d-m-Y h:s:i')); } } else { $this->redirect(); } } public function publish_products($data) { if ($this->get_token() && $this->get_meli_id()) { $requestData['method'] = 'post'; $requestData['headers']['Content-Type'] = 'application/json'; $requestData['post'] = str_replace('\\','',$data); $response = $this->fetch("/items", $requestData); if (isset($response['json']['error'])) { $this->addActivity(array( 'description'=>'No se pudo publicar el producto '. $data['title'] .' en el perfil '. $this->meli_id .'. Error: '. $response['json']['error'] .' - '. $response['json']['message'] .' - '. $response['json']['status'], 'type'=>'publish', 'object_id'=>$this->get_meli_id(), 'object_type'=>'customer' )); if (!empty($_SESSION['reportToEmail'])) { mail($_SESSION['reportToEmail'], "ML Importer", 'No se pudo publicar el producto ' . $data['title'] . ' en el perfil ' . $this->meli_id . '. Error: ' . $response['json']['error'] . ' - ' . $response['json']['message'] . ' - ' . $response['json']['status'] . ' - ' . serialize($response['json']['cause']) ); } return $response['json']; } else { $this->addActivity(array( 'description'=>'Se publicó con éxito el producto '. $data['tile'] .' en el perfil '. $this->meli_id, 'type'=>'publish', 'object_id'=>$this->get_meli_id(), 'object_type'=>'customer' )); if (!empty($_SESSION['reportToEmail'])) { mail($_SESSION['reportToEmail'], "ML Importer", 'Se publicó con éxito el producto ' . $data['tile'] . ' en el perfil ' . $this->meli_id); } } } else { $this->redirect($this->oauth_url); } } public function escape($str) { if (isset($str)) { if ($str !== mb_convert_encoding(mb_convert_encoding($str, 'UTF-32', 'UTF-8'), 'UTF-8', 'UTF-32')) $str = mb_convert_encoding($str, 'UTF-8', mb_detect_encoding($str)); $str = htmlentities($str, ENT_NOQUOTES, 'UTF-8'); $str = preg_replace('`&([a-z]{1,2})(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig);`i', '\1', $str); $str = html_entity_decode($str, ENT_NOQUOTES, 'UTF-8'); $str = preg_replace(array('`[^a-z0-9]`i', '`[-]+`'), '-', $str); $str = strtolower(trim($str, '-')); return $str; } else { return false; } } private function addCustomerFromMeli($data, $db = null) { if (!$db || !($db instanceof Necoyoad_Db)) { $db = new Necoyoad_Db(DB_DRIVE, DB_HOST, DB_USER, DB_PWD, DB_NAME); } if (!$this->getCustomerByMeli($data, $db)) { $sql = "INSERT INTO " . DB_PREFIX . "customer SET " . "`firstname` = '" . $db->escape($data['firstname']) . "'," . "`lastname` = '" . $db->escape($data['lastname']) . "'," . "`company` = '" . $db->escape($data['company']) . "'," . "`email` = '" . $db->escape($data['email']) . "'," . "`meli_id` = '" . $db->escape($data['meli_id']) . "'," . "`meli_token` = '" . $db->escape($data['meli_token']) . "'," . "`meli_refresh_token` = '" . $db->escape($data['meli_refresh']) . "'," . "`meli_expire` = '" . $db->escape($data['meli_expire']) . "'," . "`meli_code` = '" . $db->escape($data['meli_code']) . "'"; $query = $db->query($sql); $id = $db->getLastId(); $this->addActivity(array( 'description'=>'Se agregó con éxito un nuevo perfil '. $data['meli_id'] .' '. $data['company'], 'type'=>'new_profile', 'object_id'=>$data['meli_id'], 'object_type'=>'customer' )); if (!empty($_SESSION['reportToEmail'])) { mail($_SESSION['reportToEmail'], "ML Importer", 'Se agregó con éxito un nuevo perfil ' . $data['meli_id'] . ' ' . $data['company']); } return $id; } else { return false; } } private function deleteCustomerFromMeli($id, $db = null) { if (!$db || !($db instanceof Necoyoad_Db)) { $db = new Necoyoad_Db(DB_DRIVE, DB_HOST, DB_USER, DB_PWD, DB_NAME); } $db->query("DELETE FROM " . DB_PREFIX . "property WHERE ". "`object_id` IN ". "(SELECT meli_id FROM " . DB_PREFIX . "customer WHERE `id` = '" . $db->escape($id) . "') ". "AND object_type = 'customer'"); $db->query("DELETE FROM " . DB_PREFIX . "property WHERE ". "`object_id` IN ". "(SELECT meli_id FROM " . DB_PREFIX . "customer WHERE `meli_id` = '" . $db->escape($id) . "') ". "AND object_type = 'customer'"); $db->query("DELETE FROM " . DB_PREFIX . "property WHERE ". "`object_id` NOT IN (SELECT id FROM " . DB_PREFIX . "product) ". "AND object_type = 'product'"); $db->query("DELETE FROM " . DB_PREFIX . "customer WHERE `meli_id` = '" . $db->escape($id) . "'"); $db->query("DELETE FROM " . DB_PREFIX . "product WHERE `meli_id` = '" . $db->escape($id) . "'"); $this->addActivity(array( 'description'=>'Se eliminó con éxito perfil '. $id, 'type'=>'delete_profile', 'object_id'=>$id, 'object_type'=>'customer' )); if (!empty($_SESSION['reportToEmail'])) { mail($_SESSION['reportToEmail'], "ML Importer", 'Se eliminó con éxito perfil ' . $id); } } private function getProfiles($data = null, $db = null) { if (!$db || !($db instanceof Necoyoad_Db)) { $db = new Necoyoad_Db(DB_DRIVE, DB_HOST, DB_USER, DB_PWD, DB_NAME); } $sql = "SELECT * FROM `". DB_PREFIX ."customer` "; if (!empty($data['meli_id'])) { $criteria[] = " LCASE(`meli_id`) LIKE '%". $db->escape(strtolower($data['meli_id'])) ."%'"; } if (!empty($data['email'])) { $criteria[] = " LCASE(`email`) LIKE '%". $db->escape(strtolower($data['email'])) ."%'"; } if (!empty($data['company'])) { $criteria[] = " LCASE(`company`) LIKE '%". $db->escape(strtolower($data['company'])) ."%'"; } if (!empty($criteria)) { $sql .= " WHERE ". implode(" AND ", $criteria); } $query = $db->query($sql); return $query->rows; } private function getProducts($data = null, $db = null) { if (!$db || !($db instanceof Necoyoad_Db)) { $db = new Necoyoad_Db(DB_DRIVE, DB_HOST, DB_USER, DB_PWD, DB_NAME); } $sql = "SELECT * FROM `". DB_PREFIX ."product` "; if (!empty($data['meli_id'])) { $criteria[] = " LCASE(`meli_id`) LIKE '%". $db->escape(strtolower($data['meli_id'])) ."%'"; } if (!empty($data['meli_product_id'])) { $criteria[] = " LCASE(`meli_product_id`) LIKE '%". $db->escape(strtolower($data['meli_product_id'])) ."%'"; } if (!empty($data['name'])) { $criteria[] = " LCASE(`name`) LIKE '%". $db->escape(strtolower($data['name'])) ."%'"; } if (!empty($criteria)) { $sql .= " WHERE ". implode(" AND ", $criteria); } $query = $db->query($sql); return $query->rows; } private function getActivities($data = null, $db = null) { if (!$db || !($db instanceof Necoyoad_Db)) { $db = new Necoyoad_Db(DB_DRIVE, DB_HOST, DB_USER, DB_PWD, DB_NAME); } $sql = "SELECT * FROM `". DB_PREFIX ."activity` "; if (!empty($data['type'])) { $criteria[] = " LCASE(`type`) = '". $db->escape(strtolower($data['meli_id'])) ."'"; } if (!empty($data['object_type'])) { $criteria[] = " LCASE(`object_type`) = '". $db->escape(strtolower($data['object_type'])) ."'"; } if (!empty($criteria)) { $sql .= " WHERE ". implode(" AND ", $criteria); } if (isset($data['sort'])) { $sql .= " ORDER BY `". $data['sort'] ."` "; } else { $sql .= " ORDER BY `date_added` "; } if (isset($data['order'])) { $sql .= $data['order']; } else { $sql .= " DESC "; } if (isset($data['start']) && isset($data['limit'])) { $sql .= " LIMIT ". (int)$data['start'] .",". (int)$data['limit']; } elseif (isset($data['limit'])) { $sql .= " LIMIT ". (int)$data['limit']; } $query = $db->query($sql); return $query->rows; } private function getCustomerByMeli($data, $db = null) { if (!$db || !($db instanceof Necoyoad_Db)) { $db = new Necoyoad_Db(DB_DRIVE, DB_HOST, DB_USER, DB_PWD, DB_NAME); } $sql = "SELECT * FROM ". DB_PREFIX ."customer WHERE ". "`email` = '". $db->escape($data['email']) ."' ". "OR `meli_id` = '". $db->escape($data['meli_id']) ."'"; $query = $db->query($sql); return $query->num_rows; } private function redirect() { echo "<script>location.href = '{$this->oauth_url}'</script>"; } private function fetch($uri, $data=null) { $url = 'https://api.mercadolibre.com'; $response = $this->handler->fetch($url . $uri . '?access_token=' . $_SESSION['mltoken'], $data); $response['body'] = (object)json_decode($response['body']); return $response; } private function authorize($code, $redirect_uri) { $requestData['method'] = 'post'; $requestData['post'] = 'code=' . $code . '&client_id=' . $this->app_id . '&client_secret=' . $this->app_secret . '&redirect_uri=' . urlencode($redirect_uri) . '&grant_type=authorization_code'; $this->addActivity(array( 'description'=>'Se solicitó acceso a un perfil con el ML Code '. $code .'', 'type'=>'authorization_code', 'object_id'=>$this->get_meli_id(), 'object_type'=>'customer' )); return $this->handler->fetch('https://api.mercadolibre.com/oauth/token', $requestData); } private function refreshToken() { $requestData['method'] = 'post'; $requestData['post'] = 'refresh_token=' . $this->refresh_token . '&client_id=' . $this->app_id . '&client_secret=' . $this->app_secret . '&grant_type=refresh_token'; $response = $this->handler->fetch('https://api.mercadolibre.com/oauth/token', $requestData); if (isset($response['json']['error'])) { $this->addActivity(array( 'description'=>'No se pudo renovar el token para el perfil '. $this->meli_id .'. No existe o es incorrecto. Error: '. $response['json']['error'] .' - '. $response['json']['message'] .' - '. $response['json']['status'], 'type'=>'refresh_token', 'object_id'=>$this->get_meli_id(), 'object_type'=>'customer' )); return (object)$response['json']; } else { $this->addActivity(array( 'description'=>'Se renovó con éxito el token para el perfil '. $this->meli_id, 'type'=>'refresh_token', 'object_id'=>$this->get_meli_id(), 'object_type'=>'customer' )); return (object)json_decode($response['body']); } } private function addActivity($data, $db = null) { if (!$db || !($db instanceof Necoyoad_Db)) { $db = new Necoyoad_Db(DB_DRIVE, DB_HOST, DB_USER, DB_PWD, DB_NAME); } $sql = "INSERT INTO `". DB_PREFIX ."activity` SET ". "`object_id` = '". $db->escape($data['object_id']) ."',". "`object_type` = '". $db->escape($data['object_type']) ."',". "`description` = '". $db->escape($data['description']) ."',". "`icon` = '". $db->escape($data['icon']) ."'"; $query = $db->query($sql); } } class thisHandler { public function fetch($url, $options = null) { return $this->request($url, $options); } private function request($url, $options = null) { if (!isset($options['method']) || !in_array($options['method'], array('GET','POST','PUT','DELETE'))) { $options['method'] = 'GET'; } if (isset($options['content']) && !empty($options['content'])) { if (is_array($options['content'])) { $options['content'] = http_build_query($options['content']); } else { $options['content'] = urlencode($options['content']); } } $context = stream_context_create($options); $resp['url'] = $url; $resp['request'] = $context; $resp['body'] = file_get_contents($url, false, $context); return $resp; } } El archivo donde se instancia el proceso de la información, es este: <?php error_reporting(0); require_once('config.php'); require_once('src/Necoyoad/autoload.php'); $session = new Necoyoad_Session; $request = new Necoyoad_Request; $meli = new Necoyoad_Meli(MELI_APP_ID, MELI_APP_SECRET); $meli->setRedirectUrl(MELI_REDIRECT_URL); $result = $meli->initialize(); if ($request->hasPost('reportToEmail')) { $_SESSION['reportToEmail'] = $request->getPost('reportToEmail'); } $importer = $meli->get_profiles(array('meli_id'=>$request->getPost('profileToImport'))); if (isset($importer[0]['meli_id']) && $request->hasQuery('import_products')) { $meli->set_refresh_token( $importer[0]['meli_refresh_token'] ); $meli->set_token( $importer[0]['meli_token'] ); $meli->set_expire( $importer[0]['meli_expire'] ); $meli->set_code( $importer[0]['meli_code'] ); $meli->set_meli_id( $importer[0]['meli_id'] ); $meli->check_expire( $meli->get_expire() ); $meli->import_products(); } $exporter = $meli->get_profiles(array('meli_id'=>$request->getPost('profileToExport'))); if (isset($exporter[0]['meli_id']) && $request->hasQuery('publish_products')) { $meli->clear_refresh_token(); $meli->clear_token(); $meli->clear_expire(); $meli->clear_code(); $meli->clear_meli_id(); $meli->set_refresh_token( $exporter[0]['meli_refresh_token'] ); $meli->set_token( $exporter[0]['meli_token'] ); $meli->set_expire( $exporter[0]['meli_expire'] ); $meli->set_code( $exporter[0]['meli_code'] ); $meli->set_meli_id( $exporter[0]['meli_id'] ); $meli->check_expire( $meli->get_expire() ); $total = $published = $error = 0; foreach ($meli->get_products(array('meli_id'=>$importer[0]['meli_id'])) as $product) { $data['title'] = $product['name']; $data['category_id'] = $product['meli_category_id']; $data['price'] = ((int)$product['price'] <= 0) ? 100 : (float)$product['price']; $data['currency_id'] = (is_null($product['currency_id'])) ? 'ARS' : $product['currency_id']; $data['available_quantity'] = ($product['available_quantity'] <= 0) ? 1 : $product['available_quantity']; $data['buying_mode'] = $product['buying_mode']; $data['listing_type_id'] = ($product['listing_type_id'] == 'free') ? 'bronze' : $product['listing_type_id']; $data['condition'] = $product['condition']; $data['description'] = $product['description']; if ($product['variations']) $data['variations'] = str_replace("\'","'",unserialize($product['variations'])); $data['pictures'] = array( array('source'=>'http://rumat.com.ar/newapi/images/data/07-16/meli-118503685-14677759556325976.jpg') ); $data['pictures'] = str_replace("\'","'",unserialize($product['image'])); $result = $meli->publish_products($data); if ($result['error']) { $error_log .= "\n\r-------------------- SUCCESS -----------------------\n\r"; $error_log .= serialize($result); $error_log .= "\n\r-------------------- /SUCCESS ----------------------\n\r"; $error++; } else { $error_log = ""; $published++; } $total++; } if (!empty($_SESSION['reportToEmail'])) { mail($_SESSION['reportToEmail'], "ML Importer", 'Se intentaron publicar ' . $total . ' productos en el perfil ' . $meli->get_meli_id() . '. Se publicaron: ' . $published . ' y dieron error: ' . $error . '. MESSAGE: ' . $error_log); } } if ($request->hasQuery('getActivities')) { header('Cache-Control: no-cache, must-revalidate'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Content-Type: application/json'); echo json_encode($meli->get_activities(array( 'order'=>'DESC', 'sort'=>'date_added', 'limit'=>20 ))); } if ($request->hasQuery('deleteProfile') && $request->hasPost('id')) { $meli->delete_profile($request->getPost('id')); } y el archivo HTML que integra todo: <?php error_reporting(0); require_once('config.php'); require_once('src/Necoyoad/autoload.php'); $session = new Necoyoad_Session; $request = new Necoyoad_Request; $meli = new Necoyoad_Meli(MELI_APP_ID, MELI_APP_SECRET); $meli->setRedirectUrl(MELI_REDIRECT_URL); $result = $meli->index(); ?> <!doctype html> <html class="no-js" lang="en" dir="ltr"> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Necoyoad Meli Manager</title> <link rel="stylesheet" href="css/foundation.css"> <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.0-rc.2/themes/smoothness/jquery-ui.css"> <link rel="stylesheet" href="css/app.css"> </head> <body> <div class="row"> <div class="large-12 columns"> <h1 style="text-align:center"><img src="https://upload.wikimedia.org/wikipedia/commons/d/d4/MercadoLibre_logo.PNG" alt="MercadoLibre Manager" width="300" /></h1> </div> </div> <div class="row"> <div class="large-12 columns"> <div class="callout"> <p>INSTRUCCIONES: Para importar y exportar productos autom[aticamente, los usuarios deben estar registrados en la aplicación previamente. Para agregar nuevos usuarios haga click en el botón <i>Agregar Usuario</i></p> <div class="row"> <div class="large-4 medium-4 columns"> <p> <a href="index.php?action=add_profile&meli=1" class="button">Agregar Usuario</a> </p> <p> <ul id="profilesWrapper"> <?php foreach ($meli->get_profiles() as $profile) { ?> <?php if (empty($profile['meli_id'])) continue; ?> <li data-meli_id="<?php echo $profile['meli_id']; ?>"> <button class="button" aria-label="Dismiss alert" type="button" onclick="deleteProfile('<?php echo $profile['meli_id']; ?>');" style="padding:0.5em" data-close> <span aria-hidden="true">×</span> Eliminar </button> <br /> <?php echo $profile['company']; ?><br /> <?php echo $profile['email']; ?> </li> <?php } ?> </ul> </p> </div> <div class="large-8 medium-8 columns"> <div class="large-6 medium-6 columns"> <p> Arrastre hasta aquí el perfil de donde desea <b>Descargar</b> productos </p> <div id="importerWrapper"> <ul> <li class="placeholder"><img src="images/avatar01.jpg" alt="Download" /></li> </ul> </div> </div> <div class="large-6 medium-6 columns"> <p> Arrastre hasta aquí el perfil donde desea <b>Publicar</b> productos </p> <div id="exporterWrapper"> <ul> <li class="placeholder"><img src="images/avatar02.jpg" alt="Upload" /></li> </ul> </div> </div> <div class="large-12 medium-12 columns"> <a class="button" style="width:100%" href="#" onclick="downloadUploadProfile();return false;">Importar / Exportar</a> <br /> <input type="email" id="reportToEmail" name="reportToEmail" value="" placeholder="Ingresa el email a reportar" /> </div> </div> </div> <input type="hidden" value="" id="profileToImport" name="profileToImport" /> <input type="hidden" value="" id="profileToExport" name="profileToExport" /> <div class="row"> <div class="large-12 medium-12 columns"> <div id="activitiesWrapper"> <ul> <li></li> </ul> </div> </div> </div> </div> </div> </div> <script src="js/vendor/jquery.js"></script> <script src="js/vendor/what-input.js"></script> <script src="js/vendor/foundation.js"></script> <script src="https://code.jquery.com/ui/1.12.0-rc.2/jquery-ui.min.js"></script> <script src="js/app.js"></script> </body> </html>
  5. fede

    SKU

    Buenas noches, Desde la web de ML cuando se crea una publicacion se ve el campo "SKU" ... ahora desde la api donde lo puedo consultar ? Si utilizo https://api.mercadolibre.com/items/ el campo SKU no se encuentra gracias
  6. Bom dia, Estava revisando uns códigos e me deparei com a seguinte duvida. Quando realizo um POST do item tenho o seguinte campo. 'description' => $descricao. Que pelo meu entendimento se refere ao "text" da descrição. Quando vou atualizar uma descrição de um produto tenho : 'text' => $row['descricao'], "plain_text"=> $row['descricao_text'], Enfim, quando vou cadastrar um novo item, eu não tenho a possibilidade de enviar os dois tipos de descrição?? Obrigado, Josinei.
  7. Buenos dias: Estamos cargando publicaciones directamente desde la API y sin problemas, El problema es cuando queremos modificar una descripcion, estamos usando la siguiente llamada PUT /items/:id/descriptions/:description_id en donde "completamos" el id con el "id de la publicacion" y "descripcion_id" con el id de la descripcion correspondiente. Cuando ejecutamos la llamada la respuesta es {""message"":""Either text OR plain_text should be sent."",""error"":""bad_request"",""status"":400,""cause"":[]} Lo que enviamos en el body de la llamada es en la propiedad "text" el codigo HTML de la descripcion de la publicacion Gracias
  8. Pedro Queluz

    Como colocar variações

    Olá, como faço para colocar uma variação de cor em um item?
  9. Hola, cuando hago un post para el listing de un automóvil, utilizando la api para C# (y también en la REST console) me da un error de fields are invalid. Acá les paso mi Json: {"MLU1744-DOOR": "4", "MLU1744-KMTS":"89000", "title":"Audi A1", "category_id":"MLU91018", "price":"90000", "currency_id":"USD", "available_quantity": "1", "buying_mode": "classified", "listing_type_id": "free", "condition": "used", "description": "Audi A1", "video_id": null, "warranty": null, "pictures": null} y la respuesta { 2. "message": "body.invalid_fields", 3. "error": "The fields [MLU1744-DOOR, MLU1744-KMTS] are invalid for requested call.", 4. "status": 400, 5. "cause": [] 6.} Sin embargo, si quito MLU1744-DOOR y el MLU1744-KMTS, en la respuesta me dice que son datos requeridos: {"title":"Audi A1", "category_id":"MLU91018", "price":"90000", "currency_id":"USD", "available_quantity": "1", "buying_mode": "classified", "listing_type_id": "free", "condition": "used", "description": "Audi A1", "video_id": null, "warranty": null, "pictures": null} respuesta: { 2. "message": "Validation error", 3. "error": "validation_error", 4. "status": 400, 5. "cause": [{ 6. "code": "item.attributes.missing_required", 7. "message": "The attributes [MLU1744-COMBUS, MLU1744-DOOR, MLU1744-KMTS, MLU1744-VERS, MLU1744-YEAR] are required for category MLU91018. Check the attribute is present in the attributes list or in all variation attributes combination." 8. }, { 9. "code": "item.location.invalid", 10. "message": "Field 'location' requires up to city level. [country.name: null, state.name: null, city.name: null]" 11. }] 12.} ¿Alguien tiene una idea de porqué pasa esto y alguna idea de cómo solucionarlo? Gracias
  10. Hola, Estoy comenzando con la API de MERCADO LIBRE, y quiero obtener los resultados de forma ordenada. Ejemplo: $meli = new Meli('APP_ID', 'SECRET_CODE'); $params = array( 'q' => 'dvd' ); $result = $meli->get('/sites/MLV/search', $params); echo "<pre>"; echo print_r($result); echo "</pre>"; Quiero imprimir en pantalla solo la id, el titulo, la descripcion, la imagen, y el precio. Pero me devuelve: un objeto o un array, y no se como acceder a el. Array ( [body] => stdClass Object ( [site_id] => MLV [query] => dvd [paging] => stdClass Object ( [total] => 11805 [offset] => 0 [limit] => 50 ) [results] => Array ( [0] => stdClass Object ( [id] => MLV450288224 [site_id] => MLV [title] => Control Remoto Para Dvd Lg [subtitle] => [seller] => stdClass Object ( [id] => 170867709 [power_seller_status] => [car_dealer] => [real_estate_agency] => [tags] => Array ( ) ) [price] => 1200 [currency_id] => VEF [available_quantity] => 1 [sold_quantity] => 1 [buying_mode] => buy_it_now [listing_type_id] => silver [stop_time] => 2015-12-27T13:39:48.000Z [condition] => new [permalink] => http://articulo.mercadolibre.com.ve/MLV-450288224-control-remoto-para-dvd-lg-_JM [thumbnail] => http://mlv-s2-p.mlstatic.com/658601-MLV20378435149_082015-I.jpg [accepts_mercadopago] => 1 [installments] => stdClass Object ( [quantity] => 1 [amount] => 1200 [currency_id] => VEF ) 1. como accedo a title? $result[title], $result->title? ninguna me funciona 2. como hago para que solo me traiga 20 items, intente poniendo 'limit' => 20, pero no funciono Ayuda (( Gracias..
  11. Olá. Anuncios com ME2, eu consigo alterar / informar as dimensões reais do produto e o peso no campo dimensions ? Isso para que o calculo do frete seja correto de acordo com o peso e tamanho do produto e não peso e medidas da categoria default do ML. Alguem sabe se dá pra fazer isso e como faz, pois não consegui encontrar na documentação em ingles.. Obrigado.
  12. Viene de https://github.com/mercadolibre/api/issues/100 Hola , estamos tratando de publicar en esas categorías. Según la documentación en https://api.mercadolibre.com/categories/MLU1467/attributes Para MLU1467-ANTIGUE toma valores como por ejemplo 24a36bb (cinco años), cuando en otras es algo del estilo MLA1466-ANTIG-HASTA_10_ANOS. Aparte, ese valor depende de la categoría, no son lo mismo para MLU1467 que para MLU1473. En los anuncios, por ejemplo, http://apartamento.mercadolibre.com.uy/MLU-430467451-alquiler-departamento-3-dormitorios-punta-del-este-_JM , la antiguedad aparece listada como id en lugar de un texto mas humano. Para poder publicar este atributo es mandatorio. Estamos haciendo algo mal ?
  13. Estimados: Buenas, tengo un problema para realizar las calificaciones de las ventas recibidas, espero que alguien me pueda dar una mano, ya revise contra la documentación y otros topic del foro y no logro hacerlo funcionar. El error que genera el Response es: {"message":"'fulfilled' parameter must be true or false","error":"bad_request","status":400,"cause":[]} El JSon que estoy enviando por el body es:{"fulfilled":true, "rating": "positive", "message": "Todo según lo acordado excelente comprador" } El llamado al post es:result As IRestResponse = service.Post(resource, mps, JsonConvert.DeserializeObject(mBody)) Donde "resource" es: "orders/#NroVenta/feedback" Donde "mps" es: "version=3.0" y "access_token" Si alguno ya paso por este error y lo pudo solucionar le agradezco su ayuda. Slds,
  14. Boa tarde estou tentando criar um novo item através do REST CONSOLE e estou recendo a mensagem abaixo, minha aplicação esta habilitada para leitura, escrita e dados offiline, por favor vocês poderiam me auxiliar. https://api.mercadolibre.com/items?access_token=APP_USR-6092-071713-**************__G_C__-135370176 { "message": "Unauthorized scopes", "error": "unauthorized_scopes", "status": 401, "cause": [] } O Body da mo Json segue abaixo { "title":"TONY SEIXAS", "subtitle":"TONY SEIXAS", "category_id":"MLB1071", "price":10, "currency_id":"BRL", "available_quantity":1, "buying_mode":"buy_it_now", "listing_type_id":"free", "condition":"new", "description": "Item:, <strong> Ray-Ban WAYFARER Gloss Black RB2140 901 </strong> 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 months by Ray Ban", "pictures":[ {"source":"http://upload.wikime...Wayfarer.jpg"}, {"source":"http://en.wikipedia....Teashades.gif"} ] }
  15. Olá, Estou tentando enviar a minha 1ª carga de um item para o mercado livre via API. Problema: Assim que envio, me é retornado o seguinte erro: code: "item.category_id.invalid" message: "Is not allowed to post in category MLB5519. Make sure you're posting in a leaf category" Fiz uma busca em muitas categorias, todas elas aparecem para mim com o item listing_allowed=false; Alguém sabe me dizer um motivo provável? Muito obrigado...
  16. Edito completamente porque con prueba y el /item/validate y el error que tira pude descifrar la mayoria. Ahora bien estoy intentando setear envios gratuitos y no estoy pudiendo. Les muestro Que estoy enviando Array ( [title] => Prueba [category_id] => MLA12666 [price] => 123 [currency_id] => ARS [available_quantity] => 1 [buying_mode] => buy_it_now [listing_type_id] => silver [condition] => new [description] => [warranty] => [pictures] => Array ( ) [accepts_mercadopago] => 1 [non_mercado_pago_payment_methods] => Array ( [0] => Array ( [id] => MLAMO ) ) [shipping] => Array ( [mode] => me2 [local_pick_up] => [free_shipping] => 1 [costs] => [methods] => Array ( [0] => Array ( [id] => 800 ) [1] => Array ( [id] => 73328 ) [2] => Array ( [id] => 73330 ) ) [free_methods] => Array ( [0] => Array ( [id] => 73328 [rule] => Array ( [free_mode] => country [value] => ) ) ) ) ) Y estio es lo que me devuelve Array ( [body] => stdClass Object ( [message] => Validation error [error] => validation_error [status] => 400 [cause] => Array ( [0] => stdClass Object ( [code] => item.shipping.methods.invalid [message] => Shipping method ids [73328] are not allowed for shipping mode [me2] ) ) ) [httpCode] => 400 ) El error solamente me sale cuando agrego el 73328 en free_methods, si no le pongo envio gratuito me da 204 el /item/validate. Porque me da ese error si me lo da en los free Si busco los shipping de la categoria MLA12666 [ { "mode" : "me2", "shipping_attributes" : { "costs" : "not_allowed", "dimensions" : "clear", "free" : { "accepted_methods" : [ 73328, 73330, 800, 501045 ], "methods" : "optional", "rules" : [ { "default" : true, "free_mode" : "country", "free_shipping_flag" : true, "value" : null } ] } } }, { "mode" : "not_specified", "shipping_attributes" : { "costs" : "not_allowed", "dimensions" : "optional", "free" : { "accepted_methods" : [ ], "methods" : "not_allowed", "rules" : [ ] } } } ] Gracias de Antemano
  17. fsolari

    Changes on relistings

    We are making changes on the relistings behavior. To date, relistings inherit the parent_item bids. From September 8th on, relistings will inherit historic bids, wich means they will get bids from all the previous items they came from. IMPORTANT: Please note that items which have already been relisted before September 8th will not be updated to reflect their historical bids so this new behavior will take effect gradually as items are relisted. How do I know how many bids my item has had? Make a GET call to the Items API and check the attribute sold_quantity curl https://api.mercadolibre.com/items/MLA516387765 EXAMPLE: "initial_quantity": 3, "available_quantity": 3, "sold_quantity": 1, If you need more information about relisting, please check Relist Your Items tutorial.