DE-POR y ATACAREJO deben ser configuradas por el módulo Item.?reset=true. Vea Actualización de promociones.curl -X POST "https://merchant-api.ifood.com.br/promotion/v1.0/merchants/{{merchantId}}/promotions" \
-H "Authorization: Bearer {{token}}" \
-H "Content-Type: application/json" \
-d '{
"aggregationTag": "123456",
"promotions": [
{
"promotionName": "Promoción prueba",
"channels": ["IFOOD-APP"],
"items": [
{
"ean": "3213434343",
"discountValue": 20.0,
"initialDate": "2024-10-23",
"finalDate": "2024-10-30",
"promotionType": "PERCENTAGE"
}
]
}
]
}'{
"aggregationTag": "123456",
"promotions": [
{
"promotionName": "Promoción prueba",
"channels": ["IFOOD-APP"],
"items": [
{
"ean": "3213434343",
"discountValue": 20.0,
"initialDate": "2024-10-23",
"finalDate": "2024-10-30",
"promotionType": "PERCENTAGE"
}
]
}
]
}{
"aggregationTag": "123456",
"promotions": [
{
"promotionName": "Promoción prueba del tipo LXPY",
"channels": ["IFOOD-APP"],
"items": [
{
"ean": "3213434343",
"discountValue": null,
"initialDate": "2024-10-23",
"finalDate": "2024-10-30",
"promotionType": "LXPY",
"progressiveDiscount": {
"quantityToBuy": 3,
"quantityToPay": 2
}
}
]
}
]
}{
"aggregationTag": "123456",
"promotions": [
{
"promotionName": "Promoción prueba - 50% en la 3ª unidad",
"channels": ["IFOOD-APP"],
"items": [
{
"ean": "3213434343",
"discountValue": 50.0,
"initialDate": "2024-10-23",
"finalDate": "2024-10-30",
"promotionType": "PERCENTAGE_PER_X_UNITS",
"progressiveDiscount": {
"quantityToBuy": 3
}
}
]
}
]
}| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| aggregationTag | String | No | Identificador personalizado de la solicitud |
| promotions[].promotionName | String | No | Nombre de la promoción |
| promotions[].channels | Array | Sí | Canales de venta (ej: IFOOD-APP) |
| promotions[].items[].ean | String | Sí | Código EAN del producto |
| promotions[].items[].discountValue | Double | Condicional | Valor del descuento en % |
| promotions[].items[].initialDate | Date | Sí | Fecha de inicio (formato: YYYY-MM-DD) |
| promotions[].items[].finalDate | Date | Sí | Fecha de término (formato: YYYY-MM-DD) |
| promotions[].items[].promotionType | String | Sí | Tipo: PERCENTAGE, LXPY o PERCENTAGE_PER_X_UNITS |
| progressiveDiscount.quantityToBuy | Integer | Condicional | Cantidad a comprar (LXPY y PERCENTAGE_PER_X_UNITS) |
| progressiveDiscount.quantityToPay | Integer | Condicional | Cantidad a pagar (solo LXPY) |
| Tipo | Campos obligatorios |
|---|---|
| PERCENTAGE | discountValue |
| LXPY | quantityToBuy, quantityToPay |
| PERCENTAGE_PER_X_UNITS | discountValue, quantityToBuy |
aggregationId (string): ID único para rastreo de la solicitud de creación de promocionesmessage (string): Mensaje de confirmación{
"aggregationId": "abc123",
"message": "We have successfully received your request to create promotions"
}aggregationId para consultar el estado real vía GET.Recomendación: Valide el estado en el endpoint GET y verifique en la App de iFood antes de considerar la promoción activa.{
"type": "Business Exception",
"title": "Business Exception",
"status": 400,
"detail": "Detail error",
"instance": "07228dab-644c-4bec-b8a3-073397a839a0"
}{
"type": "Invalid Argument",
"title": "Invalid Request Body",
"status": 412,
"detail": "Detail error",
"instance": "07228dab-644c-4bec-b8a3-073397a839a0"
}?reset=true:POST /merchants/{merchantId}/promotions?reset=truecurl -X GET "https://merchant-api.ifood.com.br/promotion/v1.0/merchants/{{merchantId}}/promotions/{{aggregationId}}/items?offset=0&limit=10&status=ACTIVE" \
-H "Authorization: Bearer {{token}}" \
-H "Content-Type: application/json"| Parámetro | Tipo | Descripción |
|---|---|---|
| ean | String | Código EAN del producto |
| promotionName | String | Nombre de la promoción |
| promotionType | String | Tipo de la promoción |
| status | String | Estado actual (vea tabla abajo) |
| offset | Integer | Posición inicial del listado |
| limit | Integer | Ítems por página (máximo: 1000) |
| Estado | Descripción |
|---|---|
| PROCESSING | Recibido y en validación |
| SCHEDULED | Validado, aguardando fecha de inicio |
| ACTIVE | Validado y en operación |
| DUPLICATE | Ítem promocional duplicado (ya enviado anteriormente) |
| FINISHING | Remoción solicitada, aguardando efectivización |
| FINISHED | Removido con éxito |
| ERROR | Error detectado (vea campo error para detalles) |
promotions (array): Lista de ítems de promociónpromotionItemId (string, UUID): Identificador único del ítem de promociónean (string): Código EAN del productostatus (string): Estado actual (PROCESSING, ACTIVE, FINISHED, SCHEDULED, FINISHING, ERROR)initialDate (string, date): Fecha de inicio de la promociónfinalDate (string, date): Fecha de término de la promociónpromotionType (string): Tipo de promoción (PERCENTAGE, LXPY, PERCENTAGE_PER_X_UNITS)discountValue (string): Valor del descuento (en %)promotionName (string): Nombre de la promociónprogressiveDiscount (object, opcional): Descuento progresivoquantityToBuy (number): Cantidad a comprarquantityToPay (number): Cantidad a pagarerror (string, opcional): Detalle del error (retornado solo cuando status = ERROR)pagination (object): Información de paginaciónnextOffset (integer): Valor del próximo offsetcurrentOffset (integer): Valor del offset actual{
"promotions": [
{
"promotionItemId": "005f5ea0-1ff4-4c9b-9f48-76d94bfe4694",
"ean": "3213434343",
"status": "ACTIVE",
"initialDate": "2024-10-10",
"finalDate": "2024-10-11",
"promotionType": "LXPY",
"promotionName": "Promoción prueba del tipo LXPY",
"progressiveDiscount": {
"quantityToBuy": 3,
"quantityToPay": 2
}
}
],
"pagination": {
"nextOffset": 99,
"currentOffset": 0
}
}| Código | Detalle |
|---|---|
| DATE_INVALID | Verifique formato de las fechas (YYYY-MM-DD) y si finalDate > initialDate |
| PROMOTION_TYPE_INVALID | Valores válidos: PERCENTAGE, LXPY, PERCENTAGE_PER_X_UNITS |
| DISCOUNT_INVALID | Verifique campos obligatorios para cada tipo y límite de 70% de descuento |
| ITEM_NOT_FOUND | EAN incorrecto o producto inactivo/sin stock |
| INTERNAL_ERROR | Entre en contacto con el soporte iFood |
benefit.benefitstarget = ITEMsponsorships con 1 elemento donde liability = PARTNER o CHAINtargetId del beneficiobag.items[].uniqueIdsponsorships.amount.value de prices.grossValue.value