Precios de producto
POST
Listar precios de un producto
POST /api/product-prices/list-product-prices
Descripción
Retorna los precios activos asociados a un producto, paginados, con la lista de menús donde están expuestos.
Detalles
Lista los precios activos de un producto identificado por su uuid, con paginación y filtro opcional por el nombre del precio. Cada precio incluye su tipo, valor, cantidad de opciones disponibles y el listado de menús donde se ofrece. La respuesta también incluye los datos resumidos del producto y todos los menús activos del restaurante disponibles para asociarlos a un precio.
Permisos requeridos
catalog.module
Request
| Nombre | Tipo | Requerido | Reglas |
|---|---|---|---|
| productUuid | string | Sí |
min:36
max:36
|
| query | string | No |
max:100
|
Paginación
| defaultLimit | 25 |
| maxLimit | 100 |
| allowedSorts | name, createdAt |
| defaultSort | createdAt |
| defaultDir | desc |
| withTotal | true |
Ejemplo de request
curl -X POST https://restofy.pro/api/product-prices/list-product-prices \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <accessToken>" \
-H "X-Tenant-Key: <tenantKey>" \
-d '{
"productUuid": "string"
}'
Los valores son demo: reemplázalos por datos reales del negocio.
Ejemplo de respuesta
Actualizado: 2026-09-08T16:35:34Z
HTTP 200
Request
{
"productUuid": "3661f2f0-18be-11f1-9da2-b627060a1ebe"
}
Response
{
"success": true,
"message": "Operación realizada correctamente",
"data": {
"product": {
"uuid": "3661f2f0-18be-11f1-9da2-b627060a1ebe",
"name": "Ajiaco Bogotano",
"basePriceCents": 1100000
},
"productPrices": [
{
"id": 53,
"productId": 5,
"name": "Ahora porcentaje",
"priceType": "percentage",
"priceValueCents": null,
"priceBasisPoints": -2000,
"isSelfOrderPrice": 0,
"isActive": 1,
"createdAt": "2026-09-08T16:34:33.000Z",
"optionsCount": 0,
"options": [],
"menuIds": []
},
{
"id": 54,
"productId": 5,
"name": "Tamaños 6aa039194996f",
"priceType": "price_list",
"priceValueCents": null,
"priceBasisPoints": null,
"isSelfOrderPrice": 0,
"isActive": 1,
"createdAt": "2026-09-08T16:34:33.000Z",
"optionsCount": 2,
"options": [
{
"id": 17,
"description": "Chico",
"priceCents": 1000,
"sortOrder": 0
},
{
"id": 18,
"description": "Mediano",
"priceCents": 1500,
"sortOrder": 1
}
],
"menuIds": []
},
{
"id": 52,
"productId": 5,
"name": "Actualizado 6aa03918aeab5",
"priceType": "fixed",
"priceValueCents": 3000,
"priceBasisPoints": null,
"isSelfOrderPrice": 0,
"isActive": 1,
"createdAt": "2026-09-08T16:34:32.000Z",
"optionsCount": 0,
"options": [],
"menuIds": []
},
{
"id": 46,
"productId": 5,
"name": "Precio normal",
"priceType": "inherit",
"priceValueCents": 0,
"priceBasisPoints": null,
"isSelfOrderPrice": 0,
"isActive": 1,
"createdAt": "2026-04-20T19:54:58.000Z",
"optionsCount": 0,
"options": [],
"menuIds": [
1
]
},
{
"id": 47,
"productId": 5,
"name": "Happy hour",
"priceType": "fixed",
"priceValueCents": 850000,
"priceBasisPoints": null,
"isSelfOrderPrice": 0,
"isActive": 1,
"createdAt": "2026-04-20T19:54:58.000Z",
"optionsCount": 0,
"options": [],
"menuIds": [
1
]
},
{
"id": 48,
"productId": 5,
"name": "50% OFF",
"priceType": "percentage",
"priceValueCents": null,
"priceBasisPoints": 5000,
"isSelfOrderPrice": 0,
"isActive": 1,
"createdAt": "2026-04-20T19:54:58.000Z",
"optionsCount": 0,
"options": [],
"menuIds": [
1
]
},
{
"id": 49,
"productId": 5,
"name": "Cortesía",
"priceType": "free",
"priceValueCents": 0,
"priceBasisPoints": null,
"isSelfOrderPrice": 0,
"isActive": 1,
"createdAt": "2026-04-20T19:54:58.000Z",
"optionsCount": 0,
"options": [],
"menuIds": [
1
]
},
{
"id": 50,
"productId": 5,
"name": "Por tamaño",
"priceType": "price_list",
"priceValueCents": 0,
"priceBasisPoints": null,
"isSelfOrderPrice": 0,
"isActive": 1,
"createdAt": "2026-04-20T19:54:58.000Z",
"optionsCount": 3,
"options": [
{
"id": 14,
"description": "Pequeño",
"priceCents": 800000,
"sortOrder": 1
},
{
"id": 15,
"description": "Mediano",
"priceCents": 1100000,
"sortOrder": 2
},
{
"id": 16,
"description": "Grande",
"priceCents": 1400000,
"sortOrder": 3
}
],
"menuIds": [
1
]
},
{
"id": 51,
"productId": 5,
"name": "Precio manual",
"priceType": "open_price",
"priceValueCents": 0,
"priceBasisPoints": null,
"isSelfOrderPrice": 0,
"isActive": 1,
"createdAt": "2026-04-20T19:54:58.000Z",
"optionsCount": 0,
"options": [],
"menuIds": [
1
]
}
],
"menus": [
{
"id": 1,
"uuid": "ddbb95ab-4e3a-11f1-97bb-5a94900d81f5",
"name": "Carta Principal",
"isActive": 1,
"isAvailable": 1
}
],
"pagination": {
"page": 1,
"limit": 25,
"total": 9,
"totalPages": 1,
"hasNext": false,
"hasPrev": false
}
}
}