Publicaciones con 3 cuotas
Conocer si el usuario está habilitado para sumarse a la campaña
Para conocer qué usuario tiene la posibilidad de sumarse a la campaña, deberás realizar un GET al recurso /special_installments/3x_campaign con el $SELLER_ID.
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/3x_campaign/sellers/$SELLER_ID
Ejemplo:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/special_installments/3x_campaign/sellers/1234
Respuesta:
{
"date_created": "2019-08-30T16:09:10.941-04:00",
"seller_id": 1234
}
Si el usuario NO tiene permitido ofrecer 3 cuotas al mismo precio que publiques en esta campaña, la respuesta será:
{
"message": "seller does not exist",
"error": "seller.not_found",
"status": 404,
"cause": []
}
Conocer qué productos pueden sumarse a la campaña
Llamada:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/special_installments/3x_campaign/categories/$CATEGORY_ID/enabled
Response Body: 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/3x_campaign/categories/MLA1055/enabled
Respuesta:
{
"enabled": true
}
Habilitar la campaña en una publicación
Ten en cuenta que si el ítem contiene otros tags, también deberán ser enviados en la modificación. Los ítems habilitados para ofrecer 3 al mismo precio que publiques en la campaña deben ser productos nuevos y su publicación ser "Premium" (listing_type_id = gold_pro).
Llamada:
curl -X PUT -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -H "Accept: application/json" -d
{
"tags": [
"3x_campaign",
"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": [
"3x_campaign",
"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_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": [
"3x_campaign",
"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 participar de la campaña
- El ítem sea usado o reacondicionado
- La exposición de la publicación sea distinta a Premium
Deshabilitar la campaña en una publicación
Para deshabilitar la campaña en un ítem, debes realizar un PUT al recurso /items incluyendo todos los tags que tenía anteriormente excepto el tag “3x_campaign”:
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_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": [
"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": []
}
Crear una publicación en una campaña
Para crear un ítem dentro de una campaña, debes realizar el POST al recurso /items incluyendo el tag “3x_campaign”. Ten en cuenta de siempre enviar el atributo buying_mode ya que es requerido en el POST para crear un ítem.
Llamada:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/itmes
{
"title": "Item de testeo por favor no ofertar kc:off",
"pictures": [
..
],
"price": 53936,
"variations": [],
"shipping": {
..
},
"currency_id": "ARS",
"location": {},
"attributes": [
...
],
"listing_type_id": "gold_pro",
"available_quantity": 543,
"category_id": "MLA1611",
"condition": "new",
"buying_mode": "buy_it_now",
"tags": [
"3x_campaign"
]
...
}
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": [
"3x_campaign",
"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": []
}
Conocer si una publicación está en la campaña
Para consultar si un producto tiene habilitado 3 cuotas al mismo precio que publiques, verifica que tenga el tag “3x_campaign” 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_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": [
"3x_campaign",
"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": []
}