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 o un monto fijo, 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
|
| 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
|
Ejemplo de request
curl -X POST https://restofy.pro/api/fulfillments/set-tips-config \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <accessToken>" \
-H "X-Tenant-Key: <tenantKey>" \
-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-09-08T16:35:34Z
HTTP 200
Request
{
"fulfillmentUuid": "547e7442-a334-4476-886c-e2bc1b40f7d6",
"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
}
}
}