Canales de entrega
POST
Configurar las propinas de un canal de entrega
POST /api/fulfillments/set-tips-config
Descripción
Define cómo se sugieren las propinas en un canal de entrega: deshabilitadas, voluntarias u obligatorias.
Detalles
Guarda la configuración de propinas de un canal de entrega. Según el tipo de valor se sugiere un porcentaje, un monto fijo o un rango de porcentajes, calculado sobre el precio o el total base. Permite redondear la sugerencia y exigir un monto mínimo de orden para ofrecerla.
Permisos requeridos
admin.module
Request
| Nombre | Tipo | Requerido | Reglas |
|---|---|---|---|
| fulfillmentUuid | string | Sí |
min:36
max:36
|
| channelId | int | Sí |
min_value:1
|
| mode | string | Sí |
enum:disabled,voluntary,mandatory
|
| valueType | string | Sí |
enum:percentage,fixed,range
|
| calculationBase | string | Sí |
enum:price,total_base
|
| roundingOption | string | Sí |
enum:none,nearest_10,nearest_100,nearest_1000,nearest_10000
|
| minOrderCents | int | No |
min_value:0
default:0
|
| defaultRateBasisPoints | int | No |
min_value:0
|
| defaultAmountCents | int | No |
min_value:0
|
| minRateBasisPoints | int | No |
min_value:0
|
| maxRateBasisPoints | int | No |
min_value:0
|
Ejemplo de request
curl -X POST https://app.restofy.co/api/fulfillments/set-tips-config \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <accessToken>" \
-d '{
"fulfillmentUuid": "string",
"channelId": 1,
"mode": "string",
"valueType": "string",
"calculationBase": "string",
"roundingOption": "string"
}'
Los valores son demo: reemplázalos por datos reales del negocio.
Ejemplo de respuesta
Actualizado: 2026-07-15T13:20:48Z
HTTP 200
Request
{
"fulfillmentUuid": "f77ed0f2-d359-4c3c-b77f-30101a6ff387",
"channelId": 1,
"mode": "voluntary",
"valueType": "percentage",
"calculationBase": "price",
"roundingOption": "nearest_100",
"defaultRateBasisPoints": 1000,
"minOrderCents": 0
}
Response
{
"success": true,
"message": "Propinas actualizadas",
"data": {
"tips": {
"mode": "voluntary",
"valueType": "percentage",
"calculationBase": "price",
"defaultRateBasisPoints": 1000,
"defaultAmountCents": null,
"roundingOption": "nearest_100",
"minOrderCents": 0,
"minRateBasisPoints": null,
"maxRateBasisPoints": null
}
}
}