Manage packages vehicles

To list an item in vehicles, the seller must have contracted a publication package with Mercado Libre. It is done directly through the commercial team. Once the package is assigned, the seller and the developer certified are ready to publish through the API or our platform. The type of package is represented in the listing_type field of the publication.

Nota:
For testing purposes, you should send the test user to the support channel to activate it as car dealer and assign to a publishing package.

Contents

→Package types
→Query packages by category
→Query listing packages engaged by a user
→Query stand-out packages engaged by a user
→Resource description
→Verify if a user has a specific listing_type available
→Item stand out


Package types

There are 2 types of packages:
Publication package: mandatory for the seller to make publications. This is the Silver package, that is, listing_type = silver.
Featured package: this package is optional; The seller uses it to increase the exposure of their publications. It can be Gold (listing_type = gold) or Premium Gold (listing_type = gold_premium).
These two packages offer fees that are consumed with each advertisement published (in the case of a publication package) and each time an update / highlight is made (in the case of an featured package).
Currently, each user must contract the publications and featured packages through a Mercado Libre account executive. This action is not possible through the API.
The listing_type used to publish an ad will always be the lowest: "Silver", and, in case you want to highlight the publication, it will be necessary to update it with the desired listing_type (which consumes a quota in the featured package).
Remember that in GET calls to the classifieds_promotion_packs API resource, you can use the package_content parameter to know which package you want to check:

Parameter: package_content
Mandatory: No
Default: publications
Type: String
Values: package type:

  • publications - publication packages
  • upgrades - featured packages
  • developments - vehicle entrepreneurship packages
  • ALL - returns all available packages

A customer must necessarily have a listing package to advertise,but featured packages are optional. The customer can also have more than one active package simultaneously. Each active package has its own fees, due dates, etc.
To know how to send a publication, learn our List vehicles, and remember: the advertisement must first be sent and published with a listing package, and then updated as a featured package.


Query packages by category

To query the packages available for the classified categories, it is first necessary to know which category will be used and from which site. For example, in Brazil, the category of vehicles is MLB1743.

Call:

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

Example:

curl -X GET https://api.mercadolibre.com/categories/MLB1743/classifieds_promotion_packs

Response:

[
  {
    "id": "PUS30FREE",
    "category_id": "MLB1459",
    "brand": "MLREALESTATE",
    "description": "Todo o seu estoque",
    "price": 0,
    "package_type": "unlimited",
    "package_content": "publications",
    "duration": 30,
    "status": "active",
    "charge_type_id": "free",
    "max_upgrades": 0,
    "quota_type": "reusable",
    "listing_details": [
      {
        "listing_type_id": "silver",
        "available_listings": 100000
      }
    ]
  }
]

Consultar paquetes de publicaciones contratados por un usuario

Esta consulta es importante, pues a través de ella es posible saber qué paquetes tiene un cliente y cuál es la cantidad de anuncios disponibles en cada uno, ingresando el id del usuario (cliente), el tipo de paquete (package content) y el token. A continuación, presentamos un ejemplo de llamada.

Call:

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

Example:

curl -X GET https://api.mercadolibre.com/users/135146148/classifieds_promotion_packs?package_content=ALL&access_token=$ACCESS_TOKEN;

Response:

[
    {
     "id": 754985,
     "user_id": "135146148",
     "promotion_pack_id": "MPAB",
     "category_id": "MLU1743",
     "description": "Paquete 15 Básico",
     "package_type": "rotary",
     "package_content": "publications",
     "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
        }
     ]
    }
]

Look at the status = active field; through it, it is only possible to verify the plans that are still active. Through the package_content, it is possible to verify if the package is published (publications) or highlighted (upgrades). Finally, through the remaining_listings field, it is possible to know how many publications the client still has available. This is important, you will see in your system how many packages the customer has and the number of ads he has left to publish and highlight, before sending a publication to Mercado Libre.


Resource description

Attribute Description
id Unique package identifier.
user_id Unique id of the user who engaged the package.
category_id Package category.
description Package name.
package_type Package detail.
status Package status possible values are: active: the user can use this package to list. An available_listing will be discounted when he does. pending: the package it’s not active yet. finished: expired package.
date_created Date the package was created.
date_start Date the package was activated.
date_expires Date the package expires.
date_stopped Date the package was finished.
last_updated Last time the package was updated.
engagement_type Possible values are: “none”: The package was engaged for one time. “re-engagement”: When the package expires, a similar package_type will be re engaged automatically.
charge_id Unique id of the charge generated over the engagement of the package.
listing_details Detailed information about listing types and availability.
listing_type_id listing_type associated to the package.
available_listings Amount of listings the user gets with the package.
used_listings Already spent listings.
remaining_listings Available listings left.

Verify if a user has a specific listing_type available

This is a faster way to know if the user has a specific listing_type.

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

Item stand-out

To stand out a listing you should make the following post. Bear in mind that in order to perform this action, the user should have previously engaged a stand-out package:

Call:

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

Example:

curl -X POST 'https://api.mercadolibre.com/items/MLA111111111/listing_type?access_token=$ACCESS_TOKEN' -d '{"id":"gold_premium"}'

In the previous example, the list is being updated to listing type = gold_premium (Premium Gold). Remember also that no charge is generated when making this call and that, in case the update is undone, the outstanding quota becomes available again. Also isn´t it possible to highlight a publication without at least one featured package being hired.


Next: List vehículos.