Publicaciones con hasta 12 cuotas sin interés
Contenidos
→Conocer si el usuario está habilitado para sumarse a la campaña
→Conocer qué productos pueden sumarse a la campaña
→Conocer si una publicación está en la campaña
→Ver cargos por venta filtrando campañas
→Habilitar la campaña en una publicación
→Deshabilitar la campaña en una publicación
Conocer si el usuario está habilitado para sumarse a la campaña
Realiza un GET al recurso /special_installments/ahora-12 (campaña Ahora 12) o /special_installments/ahora-6 (campaña Ahora 6) según corresponda, con el $SELLER_ID. En caso que el usuario pueda participar, mostrará la fecha en la que fue habilitado.
En caso que el usuario pueda participar, se mostrará la fecha en la que fue habilitado.
Llamada:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/special_installments/ahora-12/sellers/$SELLER_ID
Ejemplo:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/special_installments/ahora-12/sellers/1234
Respuesta:
{
"date_created":"2019-08-30T16:09:10.941-04:00",
"seller_id":1234
}
Si el usuario no tiene permitido ofrecer hasta 12 cuotas, la respuesta será:
{
"message": "seller does not exist",
"error": "seller.not_found",
"status": 404,
"cause": []
}
Conocer qué productos pueden sumarse a la campaña
Revisa si el producto es de fabricación nacional realizando un POST a:
- /special_installments/ahora-12/categories/$CATEGORY_ID/enabled
- /special_installments/ahora-6/categories/$CATEGORY_ID/enabled
y en el body un JSON con la marca ($brand) y el modelo ($model) según corresponda.
Llamada:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/special_installments/ahora-12/categories/$CATEGORY_ID/enabled
Response Body: Se devolverá como respuesta el campo “enabled” con valor true o false, según corresponda.
Response Status: 200
Cacheable: Sí. Se devolverá el header “Cache-Control” con value “max-age=$max-age” indicando el tiempo recomendado en segundos para cachear la información que responde el recurso.
Ejemplo:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/special_installments/ahora-12/categories/MLA1055/enabled
{
"brand":"Motorola",
"model":"Z1",
"alphanumeric_model":"Z1 - 312 fD4"
}
Respuesta:
{
"enabled":true
}
Este caso indica que un ítem con marca Motorola, modelo Z1 y modelo alfanumérico “Z1-312fD4” participa del programa.
Conocer si una publicación está en la campaña
Para consultar si un producto tiene habilitado 6 o 12 cuotas sin interés, realiza un GET al recurso /ítems con su item_id y verifica que tenga el tag “ahora-12” o "ahora-6" dentro de los campos.
Llamada:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/$ITEM_ID
Ejemplo:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/MLA608007087
Respuesta:
{
"id": "MLA810693730",
"site_id": "MLA",
"title": "Item De Test - No Ofertar",
"subtitle": null,
"seller_id": 443024908,
"category_id": "MLA3530",
"official_store_id": null,
"price": 100,
"base_price": 100,
"original_price": null,
"inventory_id": null,
"currency_id": "ARS",
"initial_quantity": 1,
"available_quantity": 1,
"sold_quantity": 0,
"sale_terms": [],
"buying_mode": "buy_it_now",
"listing_type_id": "gold_special",
"start_time": "2019-08-22T17:33:51.000Z",
"stop_time": "2039-08-17T04:00:00.000Z",
"end_time": "2039-08-17T04:00:00.000Z",
"expiration_time": "2019-11-10T17:33:51.000Z",
"condition": "new",
"descriptions": [],
"accepts_mercadopago": true,
"non_mercado_pago_payment_methods": [],
"international_delivery_mode": "none",
"seller_contact": null,
"location": {},
"geolocation": {
"latitude": -34.5780655,
"longitude": -58.4265317
},
"coverage_areas": [],
"warnings": [],
"listing_source": "",
"variations": [],
"status": "active",
"sub_status": [],
"tags": [
"ahora-12",
"immediate_payment",
"test_item"
],
"warranty": null,
"catalog_product_id": null,
"domain_id": "MLA-UNCLASSIFIED_PRODUCTS",
"seller_custom_field": null,
"parent_item_id": null,
"differential_pricing": null,
"deal_ids": [],
"automatic_relist": false,
"date_created": "2019-08-22T17:33:51.000Z",
"last_updated": "2019-08-22T18:37:41.468Z",
"health": null,
"catalog_listing": false,
"item_relations": []
}
Ver cargos por venta filtrando campañas
A continuación, puedes consultar los costos de vender filtrando por precio, listing type y tag (ahora-6; ahora-12) y dominio.
Ejemplo del dominio Notebooks:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/MLA/listing_prices?price=10000&listing_type_id=gold_pro&tags=ahora-12&domain_id=MLA-NOTEBOOKS
Respuesta:
{
"listing_type_id": "gold_pro",
"listing_type_name": "Premium",
"listing_exposure": "highest",
"requires_picture": true,
"currency_id": "ARS",
"listing_fee_amount": 0,
"sale_fee_amount": 3800,
"average_sale_fee_detail": [],
"sale_pricing_id": 21000641936,
"listing_pricing_id": null,
"sale_fee_details": {
"pricing_ids": [
21000641936,
21000637281,
21000637266,
21000637284
],
"discount_ids": [],
"gross_amount": 3800,
"fixed_fee": 0,
"percentage_fee": 33,5,
"split_fee_detail": null
},
"listing_fee_details": {
"pricing_ids": [],
"discount_ids": [],
"gross_amount": 0,
"fixed_fee": 0
},
"free_relist": false,
"stop_time": "2041-08-18T00:00:00.000-04:00",
"mapping": "gold_pro"
}
Es decir, el dominio Notebooks con el tag ahora-12 el cargo por venta será de 33,5%. Para más información, puedes consultar recursos para obtener los costos por vender.
Habilitar la campaña en una publicación
Para habilitar la campaña en un ítem, debes realizar un PUT al recurso /items incluyendo el tag “ahora-12” o el tag "ahora-6". Ten en cuenta si el ítem contiene otros tags, también deberán ser enviados en la modificación.
Los ítems habilitados para ofrecer hasta 12 cuotas con la participación del programa Ahora 12 deben ser productos nuevos y su publicación ser "Premium", es decir, solo aquellas con listing_type_id = gold_pro. Además, recuerda que el ítem debe estar dentro de las marcas y modelos habilitados que confirman que sea un producto nacional. Reconoce qué productos pueden sumarse a la campaña.
Llamada:
curl -X PUT -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -H "Accept: application/json" -d
{
"tags":[
"ahora-12",
"immediate_payment",
"test_item"
]
}
https://api.mercadolibre.com/items/$ITEM_ID
Ejemplo:
curl -X PUT -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -H "Accept: application/json" -d
{
"tags":[
"ahora-12"
]
}
https://api.mercadolibre.com/items/MLA810693730
Respuesta:
{
"id": "MLA810693730",
"site_id": "MLA",
"title": "Item De Test - No Ofertar",
"subtitle": null,
"seller_id": 443024908,
"category_id": "MLA3530",
"official_store_id": null,
"price": 100,
"base_price": 100,
"original_price": null,
"inventory_id": null,
"currency_id": "ARS",
"initial_quantity": 1,
"available_quantity": 1,
"sold_quantity": 0,
"sale_terms": [],
"buying_mode": "buy_it_now",
"listing_type_id": "gold_pro",
"start_time": "2019-08-22T17:33:51.000Z",
"stop_time": "2039-08-17T04:00:00.000Z",
"end_time": "2039-08-17T04:00:00.000Z",
"expiration_time": "2019-11-10T17:33:51.000Z",
"condition": "new",
"descriptions": [],
"accepts_mercadopago": true,
"non_mercado_pago_payment_methods": [],
"international_delivery_mode": "none",
"seller_contact": null,
"location": {},
"geolocation": {
"latitude": -34.5780655,
"longitude": -58.4265317
},
"coverage_areas": [],
"warnings": [],
"listing_source": "",
"variations": [],
"status": "active",
"sub_status": [],
"tags": [
"ahora-12",
"immediate_payment",
"test_item"
],
"warranty": null,
"catalog_product_id": null,
"domain_id": "MLA-UNCLASSIFIED_PRODUCTS",
"seller_custom_field": null,
"parent_item_id": null,
"differential_pricing": null,
"deal_ids": [],
"automatic_relist": false,
"date_created": "2019-08-22T17:33:51.000Z",
"last_updated": "2019-08-22T18:37:41.468Z",
"health": null,
"catalog_listing": false,
"item_relations": []
}
Recuerda que retornaremos un http error 400 siempre que no cumplas los requisitos o en los casos que:
- La categoría no esté habilitada para ofrecer más cuotas.
- El vendedor no esté habilitado para participar de la campaña.
- El ítem sea usado o reacondicionado.
- La exposición de la publicación sea distinta a Premium.
- La marca o el modelo del producto no participa de la campaña.
Deshabilitar la campaña en una publicación
Para deshabilitar la campaña en un ítem, debes realizar un PUT al recurso /ítems incluyendo todos los tags que tenía anteriormente excepto el tag “ahora-12” o “ahora-6” según corresponda:
Llamada:
curl -X PUT -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -H "Accept: application/json" -d
{
"tags": [
"immediate_payment",
"test_item"
],
}
https://api.mercadolibre.com/items/$ITEM_ID
Ejemplo:
curl -X PUT -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -H "Accept: application/json" -d
{
"tags": [
"immediate_payment",
"test_item"
],
}
https://api.mercadolibre.com/items/MLA810693730
Respuesta:
{
"id": "MLA810693730",
"site_id": "MLA",
"title": "Item De Test - No Ofertar",
"subtitle": null,
"seller_id": 443024908,
"category_id": "MLA3530",
"official_store_id": null,
"price": 100,
"base_price": 100,
"original_price": null,
"inventory_id": null,
"currency_id": "ARS",
"initial_quantity": 1,
"available_quantity": 1,
"sold_quantity": 0,
"sale_terms": [],
"buying_mode": "buy_it_now",
"listing_type_id": "gold_special",
"start_time": "2019-08-22T17:33:51.000Z",
"stop_time": "2039-08-17T04:00:00.000Z",
"end_time": "2039-08-17T04:00:00.000Z",
"expiration_time": "2019-11-10T17:33:51.000Z",
"condition": "new",
"descriptions": [],
"accepts_mercadopago": true,
"non_mercado_pago_payment_methods": [],
"international_delivery_mode": "none",
"seller_contact": null,
"location": {},
"geolocation": {
"latitude": -34.5780655,
"longitude": -58.4265317
},
"coverage_areas": [],
"warnings": [],
"listing_source": "",
"variations": [],
"status": "active",
"sub_status": [],
"tags": [
"immediate_payment",
"test_item"
],
"warranty": null,
"catalog_product_id": null,
"domain_id": "MLA-UNCLASSIFIED_PRODUCTS",
"seller_custom_field": null,
"parent_item_id": null,
"differential_pricing": null,
"deal_ids": [],
"automatic_relist": false,
"date_created": "2019-08-22T17:33:51.000Z",
"last_updated": "2019-08-22T18:37:41.468Z",
"health": null,
"catalog_listing": false,
"item_relations": []
}
