Gestiona Paquetes

Los Paquetes Promocionales son paquetes de publicaciones para publicaciones de Clasificados de Concesionarios de Autos e Inmobiliarias. En este tutorial aprenderás cómo obtener información sobre paquetes y también a contratar y activar un paquete.

Contenidos:

    Gestiona Paquetes

    Los valores posibles para las categorías classifieds_promotion_packs son diferentes en cada site. Los valores posibles son:
    {site_id}1743: Concesionario de autos.
    {site_id}1459: Inmobiliaria.
    Por ejemplo, en Argentina, la categoría de paquetes para Concesionarios de Autos es MLA1743, mientras que en Brasil es MLB1743.
    Realiza una solicitud GET para buscar paquetes en una categoría específica:

    curl -X GET https://api.mercadolibre.com/categories/{category_id}/classifieds_promotion_packs

    Respuesta:

    [
      {
    	"id": "IPAA",
    	"category_id": "MLA1459",
    	"brand": "MLREALESTATE",
    	"description": "Paquete 15 Básico",
    	"price": 350,
    	"package_type": "rotary",
    	"duration": 30,
    	"status": "active",
    	"charge_type_id": "CCAA",
    	"max_upgrades": 0,
    	"listing_details": [
      	{
        	"listing_type_id": "silver",
        	"available_listings": 15
      	}
    	]
      },
      {
    	"id": "IPAR",
    	"category_id": "MLA1459",
    	"brand": "MLREALESTATE",
    	"description": "Paquete 15 Premium",
    	"price": 600,
    	"package_type": "rotary",
    	"duration": 30,
    	"status": "active",
    	"charge_type_id": "CCAR",
    	"max_upgrades": 0,
    	"listing_details": [
      	{
        	"listing_type_id": "gold",
        	"available_listings": 6
      	},
      	{
        	"listing_type_id": "gold_premium",
        	"available_listings": 1
      	},
      	{
        	"listing_type_id": "silver",
        	"available_listings": 8
      	}
    	]
      },
      {
    	"id": "IPAS",
    	"category_id": "MLA1459",
    	"brand": "MLREALESTATE",
    	"description": "Paquete 15 Especial",
    	"price": 410,
    	"package_type": "rotary",
    	"duration": 30,
    	"status": "active",
    	"charge_type_id": "CCAS",
    	"max_upgrades": 0,
    	"listing_details": [
      	{
        	"listing_type_id": "silver",
    	    "available_listings": 10
      	},
      	{
        	"listing_type_id": "gold",
        	"available_listings": 5
      	}
    	]
      },
      {
    	"id": "IPBA",
    	"category_id": "MLA1459",
    	"brand": "MLREALESTATE",
    	"description": "Paquete 30 Básico",
        "price": 480,
    	"package_type": "rotary",
    	"duration": 30,
    	"status": "active",
    	"charge_type_id": "CCBA",
    	"max_upgrades": 0,
    	"listing_details": [
      	{
        	"listing_type_id": "silver",
        	"available_listings": 30
      	}
        ]
      },
      {
    	"id": "IPBR",
    	"category_id": "MLA1459",
    	"brand": "MLREALESTATE",
    	"description": "Paquete 30 Premium",
    	"price": 880,
    	"package_type": "rotary",
    	"duration": 30,
    	"status": "active",
    	"charge_type_id": "CCBR",
    	"max_upgrades": 0,
    	"listing_details": [
      	{
        	"listing_type_id": "silver",
        	"available_listings": 16
      	},
      	{
        	"listing_type_id": "gold_premium",
        	"available_listings": 2
      	},
      	{
        	"listing_type_id": "gold",
        	"available_listings": 12
      	}
    	]
      },
      {
    	"id": "IPBS",
    	"category_id": "MLA1459",
    	"brand": "MLREALESTATE",
    	"description": "Paquete 30 Especial",
    	"price": 560,
    	"package_type": "rotary",
    	"duration": 30,
        "status": "active",
    	"charge_type_id": "CCBS",
    	"max_upgrades": 0,
    	"listing_details": [
      	{
        	"listing_type_id": "silver",
        	"available_listings": 20
      	},
      	{
        	"listing_type_id": "gold",
        	"available_listings": 10
      	}
    	]
      },
      {
    	"id": "IPCA",
    	"category_id": "MLA1459",
    	"brand": "MLREALESTATE",
    	"description": "Paquete 60 Básico",
    	"price": 570,
    	"package_type": "rotary",
    	"duration": 30,
    	"status": "active",
    	"charge_type_id": "CCCA",
    	"max_upgrades": 0,
    	"listing_details": [
      	{
        	"listing_type_id": "silver",
        	"available_listings": 60
      	}
    	]
      },
      {
    	"id": "IPCR",
    	"category_id": "MLA1459",
    	"brand": "MLREALESTATE",
    	"description": "Paquete 60 Premium",
    	"price": 910,
    	"package_type": "rotary",
    	"duration": 30,
    	"status": "active",
    	"charge_type_id": "CCCR",
    	"max_upgrades": 0,
    	"listing_details": [
      	{
        	"listing_type_id": "silver",
        	"available_listings": 32
      	},
      	{
        	"listing_type_id": "gold",
        	"available_listings": 24
      	},
      	{
        	"listing_type_id": "gold_premium",
        	"available_listings": 4
      	}
    	]
      },
      {
    	"id": "IPCS",
    	"category_id": "MLA1459",
    	"brand": "MLREALESTATE",
    	"description": "Paquete 60 Especial",
    	"price": 650,
    	"package_type": "rotary",
    	"duration": 30,
    	"status": "active",
    	"charge_type_id": "CCCS",
    	"max_upgrades": 0,
    	"listing_details": [
      	{
        	"listing_type_id": "gold",
        	"available_listings": 20
      	},
      	{
        	"listing_type_id": "silver",
        	"available_listings": 40
      	}
    	]
      },
      {
    	"id": "IPDA",
    	"category_id": "MLA1459",
    	"brand": "MLREALESTATE",
        "description": "Paquete 100 Básico",
    	"price": 750,
    	"package_type": "rotary",
    	"duration": 30,
    	"status": "active",
    	"charge_type_id": "CCDA",
    	"max_upgrades": 0,
    	"listing_details": [
      	{
        	"listing_type_id": "silver",
            "available_listings": 100
      	}
    	]
      },
      {
    	"id": "IPDR",
    	"category_id": "MLA1459",
    	"brand": "MLREALESTATE",
    	"description": "Paquete 100 Premium",
    	"price": 1180,
    	"package_type": "rotary",
    	"duration": 30,
    	"status": "active",
    	"charge_type_id": "CCDR",
    	"max_upgrades": 0,
    	"listing_details": [
      	{
        	"listing_type_id": "gold_premium",
        	"available_listings": 5
      	},
      	{
        	"listing_type_id": "gold",
        	"available_listings": 35
      	},
      	{
        	"listing_type_id": "silver",
        	"available_listings": 60
      	}
    	]
      },
      {
    	"id": "IPDS",
    	"category_id": "MLA1459",
    	"brand": "MLREALESTATE",
    	"description": "Paquete 100 Especial",
    	"price": 820,
    	"package_type": "rotary",
    	"duration": 30,
    	"status": "active",
    	"charge_type_id": "CCDS",
    	"max_upgrades": 0,
    	"listing_details": [
      	{
        	"listing_type_id": "gold",
        	"available_listings": 25
      	},
      	{
        	"listing_type_id": "silver",
        	"available_listings": 75
      	}
    	]
      },
      {
    	"id": "IPEA",
    	"category_id": "MLA1459",
    	"brand": "MLREALESTATE",
    	"description": "Paquete 500 Básico",
    	"price": 850,
    	"package_type": "rotary",
    	"duration": 30,
    	"status": "active",
    	"charge_type_id": "CCEA",
    	"max_upgrades": 0,
    	"listing_details": [
      	{
        	"listing_type_id": "silver",
        	"available_listings": 500
      	}
    	]
      },
      {
    	"id": "IPER",
    	"category_id": "MLA1459",
    	"brand": "MLREALESTATE",
    	"description": "Paquete 500 Premium",
    	"price": 1900,
    	"package_type": "rotary",
    	"duration": 30,
    	"status": "active",
    	"charge_type_id": "CCER",
    	"max_upgrades": 0,
    	"listing_details": [
      	{
    	    "listing_type_id": "gold",
        	"available_listings": 100
      	},
      	{
        	"listing_type_id": "gold_premium",
        	"available_listings": 15
      	},
      	{
        	"listing_type_id": "silver",
        	"available_listings": 385
      	}
        ]
      },
      {
    	"id": "IPES",
    	"category_id": "MLA1459",
    	"brand": "MLREALESTATE",
    	"description": "Paquete 500 Especial",
    	"price": 1000,
    	"package_type": "rotary",
    	"duration": 30,
    	"status": "active",
    	"charge_type_id": "CCES",
    	"max_upgrades": 0,
    	"listing_details": [
      	{
        	"listing_type_id": "gold",
        	"available_listings": 70
      	},
      	{
        	"listing_type_id": "silver",
        	"available_listings": 430
      	}
    	]
      }
    ]

    Obtener paquetes contratados por un usuario

    curl -X GET https://api.mercadolibre.com/users/{user_id}/classifieds_promotion_packs?access_token=$ACCESS_TOKEN;

    Respuesta:

    [
       	{
    	   "id": 754985,
    	   "user_id": "135146148",
    	   "promotion_pack_id": "MPAB",
    	   "category_id": "MLU1743",
    	   "description": "Paquete 15 Básico",
    	   "package_type": "rotary",
    	   "status": "active",
    	   "date_created": "2013-05-23T15:34:48.498-04:00",
    	   "date_start": "2013-05-23T15:34:47.544-04:00",
    	   "date_expires": "2013-06-22T15:34:47.544-04:00",
    	   "date_stopped": null,
    	   "last_updated": "2013-05-23T15:35:48.211-04:00",
    	   "engagement_type": "none",
    	   "charge_id": 822129921,
    	   "remaining_listings": 15,
    	   "used_listings": 0,
    	   "listing_details": [
        	 	{
            	 "listing_type_id": "silver",
            	 "available_listings": 15,
            	 "used_listings": 0,
            	 "remaining_listings": 15
        	 	}
    	   ]
       	}
    ]

    Descripción de recursos

    atributodescripción
    idIdentificador único del paquete.
    user_idID único del usuario que contrató el paquete.
    category_idCategoría del paquete.
    descriptionnombre del paquete.
    package_type:detalle del paquete.
    statuslos valores posibles del estado del paquete son:
    activo: el usuario puede utilizar este paquete para publicar. Se descontará una available_listing cuando lo haga.
    pendiente: el paquete aún no está activo.
    finalizado: paquete expirado.
    date_createdfecha de creación del paquete.
    date_start:fecha de activación del paquete.
    date_expiresfecha de expiración del paquete.
    date_stoppedfecha de finalización del paquete.
    last_updatedúltima actualización del paquete.
    engagement_typeLos valores posibles son:
    “ninguno”: El paquete se contrató por única vez.
    “recontratación”: Cuando el paquete expira, se recontratará automáticamente un package_type similar.
    charge_idID único del cargo generado durante la contratación del paquete.
    listing_detailsinformación detallada sobre tipos y disponibilidad de publicaciones.
    listing_type_idlisting_type asociado con el paquete.
    available_listingscantidad de publicaciones que el usuario obtiene con el paquete.
    used_listingspublicaciones ya utilizadas.
    remaining_listingspublicaciones restantes disponibles.

    Verificar si un usuario tiene un listing_type específico disponible

    curl -X GET https://api.mercadolibre.com/users/{user_id}/classifieds_promotion_packs/silver?access_token=$ACCESS_TOKEN

    Contratar y activar un paquete

    Puedes contratar un paquete y activarlo al realizar una solicitud POST a la API como en el siguiente ejemplo:

    curl -X POST "Content-type:application/json" -d '{
    "categ_id":"MLA1459", "promotion_pack_id":"IPIN", "engagement_type":"none", "status":"active"
    }' https://api.mercadolibre.com/users/{user_id}/classifieds_promotion_packs&access_token=$ACCESS_TOKEN

    La documentación actual se concentra en la nueva lógica para paquetes de destaques que está en funcionamiento solo para inmobiliarias en Argentina, Brasil, México y Uruguay. La lógica de los paquetes de nuevas actualizaciones consiste en migrar el modelo real en el cual se generan cargos para actualizaciones individuales a una lógica analógica en paquetes de publicaciones donde el cliente contrata un paquete de actualizaciones y luego cada actualización realizada ocupa un lugar o cuota en el paquete.

    Actualizar el artículo

    POST https://api.mercadolibre.com/items/{item_id}/listing_type?access_token=$ACCESS_TOKEN

    Cuerpo:

    { “id”:”{listing_type}” }

    La respuesta es el artículo actualizado.
    Ejemplo:

    curl -X POST --header "Content-type:application/json" -d '{"id":"gold"}' 'https://api.mercadolibre.com/items/MLA563940625/listing_type?access_token=$ACCESS_TOKEN'
    {
    	"id": "MLA563940625",
    	"site_id": "MLA",
    	"title": "Test 10 No Ofertar",
    	"subtitle": null,
    	"seller_id": 184854440,
    	"category_id": "MLA50543",
        "official_store_id": null,
    	"price": 2928282,
    	"base_price": 2928282,
    	"original_price": null,
    	"currency_id": "ARS",
    	"initial_quantity": 1,
    	"available_quantity": 1,
    	"sold_quantity": 0,
    	"buying_mode": "classified",
    	"listing_type_id": "gold",
    	"start_time": "2015-06-09T20:25:50.000Z",
    	"stop_time": "2015-07-05T19:51:17.587Z",
    	"end_time": "2015-07-05T19:51:17.587Z",
    	"condition": "not_specified",
    	"permalink": "http://inmueble.mercadolibre.com.ar/MLA-563940625-test-10-no-ofertar-_JM",
    	"thumbnail": "http://mla-s1-p.mlstatic.com/302401-MLA20317818801_062015-I.jpg",
    	"secure_thumbnail": "https://mla-s1-p.mlstatic.com/302401-MLA20317818801_062015-I.jpg",
    	"pictures": [
        	{
            	"id": "302401-MLA20317818801_062015",
            	"url": "http://mla-s1-p.mlstatic.com/302401-MLA20317818801_062015-O.jpg",
            	"secure_url": "https://mla-s1-p.mlstatic.com/302401-MLA20317818801_062015-O.jpg",
            	"size": "500x281",
            	"max_size": "1200x675",
            	"quality": ""
        	}
    	],
    	"video_id": null,
    	"descriptions": [],
    	"accepts_mercadopago": false,
        "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": 163310864,
        	"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": "",
        	"longitude": "",
        	"search_location": {
            	"neighborhood": {
                	"id": "TUxBQlBBTDI1MTVa",
                	"name": "Palermo"
            	},
            	"city": {
                	"id": "TUxBQ0NBUGZlZG1sYQ",
                	"name": "Capital Federal"
            	},
            	"state": {
                	"id": "TUxBUENBUGw3M2E1",
                	"name": "Capital Federal"
            	}
        	}
        },
    	"seller_contact": {
        	"contact": "",
        	"other_info": "",
        	"area_code": "",
        	"phone": "",
        	"area_code2": "",
        	"phone2": "",
        	"email": "",
        	"webpage": ""
    	},
    	"location": {
        	"address_line": "falsa 123 123",
        	"zip_code": "",
        	"neighborhood": {
            	"id": "TUxBQkVTUDYyODRa",
            	"name": "Espartillar"
        	},
        	"city": {
            	"id": "TUxBQ0FETzQ2Nzc",
            	"name": "Adolfo Alsina"
        	},
        	"state": {
            	"id": "TUxBUFpPTmFpbnRl",
            	"name": "Buenos Aires Interior"
        	},
        	"country": {
            	"id": "AR",
            	"name": "Argentina"
        	},
        	"latitude": -34.6635266,
        	"longitude": -58.3654707,
        	"open_hours": ""
    	},
    	"geolocation": {
        	"latitude": -34.6635266,
        	"longitude": -58.3654707
    	},
    	"coverage_areas": [],
    	"attributes": [
        	{
            	"id": "MLA1459-HORPREF",
            	"name": "Horario de contacto",
            	"value_id": "",
            	"value_name": "",
                "attribute_group_id": "ADICIONALES",
                "attribute_group_name": "Adicionales"
        	},
        	{
            	"id": "MLA50541-ACCESO",
            	"name": "Acceso",
            	"value_id": "",
            	"value_name": "",
                "attribute_group_id": "ADICIONALES",
                "attribute_group_name": "Adicionales"
        	},
        	{
            	"id": "MLA50541-ANTIG",
            	"name": "Antigüedad",
            	"value_id": "",
            	"value_name": "",
                "attribute_group_id": "ADICIONALES",
                "attribute_group_name": "Adicionales"
        	},
        	{
            	"id": "MLA50541-EXPENCEM",
            	"name": "Expensas ($)",
                "value_id": "",
            	"value_name": "",
                "attribute_group_id": "ADICIONALES",
                "attribute_group_name": "Adicionales"
        	},
        	{
            	"id": "MLA50541-SEGUR",
            	"name": "Seguridad",
           	 "value_id": "",
            	"value_name": "",
                "attribute_group_id": "ADICIONALES",
                "attribute_group_name": "Adicionales"
        	},
        	{
            	"id": "MLA1459-INMUEBLE",
            	"name": "Inmueble",
            	"value_id": "MLA1459-INMUEBLE-COCHERA",
            	"value_name": "Cochera",
                "attribute_group_id": "FIND",
                "attribute_group_name": "Ficha técnica"
        	},
        	{
            	"id": "MLA1459-OPERACION",
            	"name": "Operación",
            	"value_id": "MLA1459-OPERACION-VENTA",
            	"value_name": "Venta",
                "attribute_group_id": "FIND",
                "attribute_group_name": "Ficha técnica"
        	},
        	{
            	"id": "MLA50541-MTRSTOTAL",
            	"name": "Superficie total (m²)",
            	"value_id": "",
            	"value_name": "24",
                "attribute_group_id": "FIND",
                "attribute_group_name": "Ficha técnica"
        	},
        	{
            	"id": "MLA50541-TIPCOB",
            	"name": "Tipo de cobertura",
            	"value_id": "MLA50541-TIPCOB-CUBIERTA",
            	"value_name": "Cubierta",
                "attribute_group_id": "FIND",
                "attribute_group_name": "Ficha técnica"
        	},
        	{
            	"id": "MLA50541-TIPOCOCH",
            	"name": "Tipo de cochera",
            	"value_id": "MLA50541-TIPOCOCH-FIJA",
            	"value_name": "Fija",
                "attribute_group_id": "FIND",
                "attribute_group_name": "Ficha técnica"
        	}
    	],
    	"listing_source": "",
    	"variations": [],
    	"status": "active",
    	"sub_status": [],
    	"tags": [],
    	"warranty": null,
    	"catalog_product_id": null,
    	"seller_custom_field": null,
    	"parent_item_id": null,
    	"differential_pricing": null,
        "deal_ids": [],
    	"automatic_relist": false,
    	"date_created": "2015-06-09T20:25:50.000Z",
    	"last_updated": "2015-06-10T12:20:32.418Z"
    }

    Finalizar paquetes

    Ejemplo:

    curl -X PUT -H "Content-Type: application/json" -d'{
    > "status":"finished"
    > }' https://api.mercadolibre.com/users/186704185/classifieds_promotion_packs/1047628?access_token=$ACCESS_TOKEN

    Siguiente:
    Categorías y atributos

    Por favor califica del 1 al 5