List menus (prices)
Changed onCómo funcionan los menús y precios
Un menú es una lista de precios: dice qué productos se venden y a qué precio. En el administrador se llama menú y en la API precio: cada menú es un registro de GET /ecommerce/prices, y su _id es el menuId que aparece en menus de cada producto. Una marca puede tener varios menús, por ejemplo uno general, uno para un local y uno de almuerzo.
1. Cada pedido usa un solo menú. Los menús no se mezclan: el cliente ve el precio y la disponibilidad que el producto tiene en el menú que se está usando.
2. Cómo se elige el menú en la tienda online. Se revisan los menús habilitados de mayor a menor priority y se usa el primero que cumple todas estas condiciones:
- storesIds está vacío o incluye el local del pedido. Mientras no se sepa el local, los menús con locales no aplican.
- channels está vacío o incluye el canal del pedido. Si el cliente aún no elige cómo recibir el pedido, se considera delivery.
- schedule está abierto a la hora de entrega menos el tiempo de preparación del local, o ahora si el pedido no es programado. El horario solo restringe si availableAtPeriods es true; si no, el menú aplica a toda hora, salvo los días cerrados (closedDays).
- Faltan al menos daysBefore días de calendario para esa fecha.
- segmentIds está vacío, o el cliente inició sesión y pertenece a alguna de esas audiencias.
Si ningún menú cumple, se usa el menú por defecto (isDefault), aunque no cumpla sus condiciones. Si la marca no tiene menú por defecto, se usa el de mayor priority. Si la marca tiene un solo menú habilitado, se usa siempre.
3. Productos no disponibles. Si el producto no está disponible en el menú que se usa, no aparece en la tienda. Si en el administrador tiene un mensaje de no disponible, aparece con ese mensaje, pero no se puede comprar. Un producto tampoco aparece si tiene un modificador obligatorio sin opciones disponibles en ese menú. Agotado (out-of-stock) es otra cosa: se marca por local, y el producto aparece como agotado, salvo que la marca active Ocultar productos no disponibles o sin stock: entonces los agotados no aparecen.
4. Cada menú tiene su propio precio. Cambiar el precio en un menú no cambia los demás. Para cambiarlo en toda la marca, cámbialo en cada menú donde el producto está disponible. Para cambiarlo solo en un local, canal u horario, usa el punto 2 para saber qué menú se usa ahí.
5. Descuentos. discountPrice es el precio final que paga el cliente, no un monto ni un porcentaje, y no puede ser mayor que el precio: si bajas price por debajo del descuento guardado, envía también discountPrice. Si es menor que el precio, la tienda muestra el precio normal tachado. En las respuestas viene como discount. Enviar discountPrice deja un solo descuento, y null lo quita. En el administrador se pueden guardar varios descuentos seguidos: en ese caso discount es el primero, pero el cliente paga el último.
6. Los cambios no son instantáneos. La tienda se actualiza en segundo plano, y el menú elegido para cada cliente se guarda hasta 15 minutos, así que un cambio en las condiciones de un menú puede tardar ese tiempo en verse.
Request
- Base URLhttps://api.service.getjusto.com/v3
- Authnone declared
Response
The OpenAPI spec
Example response
{
"success": true
}Changes
- warning
added the new
app-deliveryenum value to the///response property for the response status - warning
added the new
app-goenum value to the///response property for the response status - warning
added the new
app-serveenum value to the///response property for the response status - warning
added the new
commander-deliveryenum value to the///response property for the response status - warning
added the new
commander-goenum value to the///response property for the response status - warning
added the new
commander-serveenum value to the///response property for the response status - warning
added the new
orion-deliveryenum value to the///response property for the response status - warning
added the new
orion-goenum value to the///response property for the response status - warning
added the new
orion-serveenum value to the///response property for the response status - warning
added the new
pos-deliveryenum value to the///response property for the response status - warning
added the new
pos-goenum value to the///response property for the response status - warning
added the new
pos-serveenum value to the///response property for the response status - warning
added the new
web-deliveryenum value to the///response property for the response status - warning
added the new
web-goenum value to the///response property for the response status - warning
added the new
web-serveenum value to the///response property for the response status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- warning
- info
endpoint added
- info