Platform configuration for the back office: payment-method commissions, the
solidarity percentages, the surplus and orders coverage radii, and support
contact details.
Paths are relative to the /api/v1 prefix; these are back-office endpoints that
require an admin token.
Requires an admin bearer token (see Admin auth). Admin only, except
/admin/config/surplusand/admin/config/orders-coverage, which are super-admin only.
See Common errors and the commission & solidarity rules.
| Method | URI | Access | Description |
|---|---|---|---|
GET |
/admin/config/payment-methods |
Admin | List payment methods and their commission split |
PATCH |
/admin/config/payment-methods/{method} |
Admin | Toggle a method or set its AgΓΌita percentage |
GET |
/admin/config/solidary |
Admin | Current solidarity percentages |
PATCH |
/admin/config/solidary |
Admin | Update solidarity percentages |
GET |
/admin/config/orders |
Admin | Current order & payment expiration windows |
PATCH |
/admin/config/orders |
Admin | Update order & payment expiration windows |
GET |
/admin/config/surplus |
Super admin | Current surplus coverage radius |
PATCH |
/admin/config/surplus |
Super admin | Update surplus coverage radius |
GET |
/admin/config/orders-coverage |
Super admin | Current orders coverage radius cap |
PATCH |
/admin/config/orders-coverage |
Super admin | Update orders coverage radius cap |
GET |
/admin/config/support |
Admin | Current support contact config |
PATCH |
/admin/config/support |
Admin | Update support contact config |
Lists the payment-method catalogue (ordered by sort order, then code) with the
commission split. driver_gross_pct is the driver's share of the payment.
Response 200
{
"methods": [
{
"method": "CASH_USD",
"active": true,
"label": "Efectivo (USD)",
"aguita_pct": 18.0,
"driver_gross_pct": 82.0,
"commission_tiers": [
{ "min_amount": 0, "max_amount": 20, "aguita_prc": 15 }
]
}
]
}
commission_tiers is null when the method has no tiers. When present, it is a
list of { min_amount, max_amount|null, aguita_prc } (amounts in USD).
Updates a single method by code (case-insensitive β the panel sends slugs like
cash_usd). You cannot disable the last remaining active method.
Request body
| Field | Type | Required | Rules |
|---|---|---|---|
active |
boolean | no | enable/disable the method |
aguita_pct |
number | no | 0β50 (the platform's commission percentage) |
commission_tiers |
array|null | no | optional commission tiers; null clears them |
commission_tiers[].min_amount |
number | yes (per item) | β₯ 0 (USD) |
commission_tiers[].max_amount |
number|null | yes (per item) | β₯ 0 and > min_amount; null = open-ended |
commission_tiers[].aguita_prc |
number | yes (per item) | 0β50 |
Response 200 β { "methods": [ β¦ ] } (the full updated list).
Errors
| Status | Body | When |
|---|---|---|
404 |
{ "error": "InvalidPaymentMethod" } |
Unknown method code |
422 |
{ "error": "AtLeastOneMethodRequired", "message": "β¦" } |
Disabling the last active method |
422 |
{ "error": "ValidationError", "details": { "fieldErrors": { β¦ } } } |
A tier is malformed, out of range, or tiers overlap |
Returns the solidarity percentages.
Response 200
{
"solidary": {
"client_solidary_pct": 1.0,
"driver_solidary_pct": 1.0,
"aguita_solidary_pct": 1.0
}
}
| Field | Type | Description |
|---|---|---|
client_solidary_pct |
number | The client's slice |
driver_solidary_pct |
number | The driver's slice |
aguita_solidary_pct |
number | AgΓΌita's own slice. Derived and read-only: it always equals driver_solidary_pct and is not stored |
Updates the solidarity percentages (merge β only the fields you send change).
Request body
| Field | Type | Required | Rules |
|---|---|---|---|
client_solidary_pct |
number | no | 0β20 |
driver_solidary_pct |
number | no | 0β20 |
aguita_solidary_pct |
β | β | Prohibited β it is derived from driver_solidary_pct |
Response 200
{
"solidary": {
"client_solidary_pct": 1.5,
"driver_solidary_pct": 1.0,
"aguita_solidary_pct": 1.0
}
}
Errors
| Status | When |
|---|---|
422 |
A percentage is outside 0β20, or the body carries aguita_solidary_pct |
Returns the expiration windows, in minutes, for the order acceptance phase and the payment phase, whether billing data is required to create an order, and how many broadcast orders a driver may hold at once.
Response 200
{
"orders": {
"order_expiry_minutes": 5,
"payment_expiry_minutes": 15,
"billing_required": false,
"max_active_broadcast_orders": 1
}
}
Updates the order settings (merge β only the fields you send change).
Request body
| Field | Type | Required | Rules |
|---|---|---|---|
order_expiry_minutes |
integer | no | 1β120 |
payment_expiry_minutes |
integer | no | 1β120 |
billing_required |
boolean | no | when true, POST /orders is rejected with 422 unless the customer has billing data |
max_active_broadcast_orders |
integer | no | 1β5. Orders a driver may hold at once from the broadcast; orders born from a surplus listing do not count |
Response 200
{
"orders": {
"order_expiry_minutes": 5,
"payment_expiry_minutes": 20,
"billing_required": true,
"max_active_broadcast_orders": 2
}
}
Errors
| Status | Body | When |
|---|---|---|
422 |
{ "error": "ValidationError", "details": { "fieldErrors": { β¦ } } } |
A minutes value is not an integer, < 1, or > 120; billing_required is not a boolean; or max_active_broadcast_orders is not an integer between 1 and 5 |
Returns the surplus (remate) coverage radius, in kilometres. Super-admin only.
Response 200
{ "surplus": { "notify_radius_km": 15 } }
Updates the surplus coverage radius (merge β only the fields you send change). Super-admin only.
Request body
| Field | Type | Required | Rules |
|---|---|---|---|
notify_radius_km |
integer | no | 1β100 |
Response 200
{
"surplus": { "notify_radius_km": 10 },
"audit_entry": {
"key": "surplus_notify_radius_km",
"old_values": { "notify_radius_km": 15 },
"new_values": { "notify_radius_km": 10 },
"created_at": "2026-10-20T14:03:11+00:00"
}
}
audit_entry is null when the request changes nothing.
Errors
| Status | Body | When |
|---|---|---|
403 |
{ "error": "Forbidden", "message": "Se requiere Admin Principal." } |
The admin is not a super admin |
422 |
{ "error": "ValidationError", "details": { "fieldErrors": { β¦ } } } |
notify_radius_km is not an integer, < 1, or > 100 |
Returns the orders coverage radius cap, in kilometres. Super-admin only.
Response 200
{ "orders_coverage": { "max_radius_km": 15 } }
Updates the orders coverage radius cap (merge β only the fields you send change). Super-admin only.
It is a cap, not a replacement. Every driver declares their own radius on their vehicle (
PATCH /driver/vehicle, 1β100 km) and keeps it; the effective radius isLEAST(COALESCE(declared, cap), cap). So lowering this value trims the fleet, raising it widens nothing for a driver who already declared a radius, and a vehicle that declared none operates at the cap. It governs the realtime fan-out when an order is created, the wake-up push to dormant drivers, and the radius ofGET /driver/available-orders.Orders already broadcasting are not re-announced: the realtime fan-out runs once, at creation. The dormant-driver push and the driver's own list pick the new value up immediately, and no in-flight order breaks β a driver who was already notified can still apply.
Request body
| Field | Type | Required | Rules |
|---|---|---|---|
max_radius_km |
integer | no | 1β100 (100 trims nobody) |
Response 200
{
"orders_coverage": { "max_radius_km": 10 },
"audit_entry": {
"key": "orders_max_radius_km",
"old_values": { "max_radius_km": 15 },
"new_values": { "max_radius_km": 10 },
"created_at": "2026-11-13T14:03:11+00:00"
}
}
audit_entry is null when the request changes nothing.
Errors
| Status | Body | When |
|---|---|---|
403 |
{ "error": "Forbidden", "message": "Se requiere Admin Principal." } |
The admin is not a super admin |
422 |
{ "error": "ValidationError", "details": { "fieldErrors": { β¦ } } } |
max_radius_km is not an integer, < 1, or > 100 |
Returns the support contact configuration.
Response 200
{
"support": {
"phone": "+584121234567",
"schedule": "Lunes a Viernes 8amβ6pm",
"off_hours_message": "Estamos fuera de horario, te atenderemos pronto."
}
}
Updates the support contact config (merge β only the non-null fields you send change).
Request body
| Field | Type | Required | Rules |
|---|---|---|---|
phone |
string | no | β€ 20 chars, matches ^\+?[0-9\s\-]{7,20}$ |
schedule |
string | no | β€ 200 chars |
off_hours_message |
string | no | β€ 500 chars |
Response 200 β { "support": { β¦ } } (the merged config).