Overview
The system settings APIs provide configuration data used throughout the application, including payment methods, delivery options, shipping types, and pricing plans.
Payment Types
Shipping Types
Delivery Types
Plans
Get Payment Types GET /configuraciones/getTiposPago
Response Returns an array of available payment type strings. List of payment type names
{
"data" : [
"Efectivo" ,
"Tarjeta de Crédito" ,
"Tarjeta de Débito" ,
"Transferencia Bancaria" ,
"Yape" ,
"Plin"
]
}
Source: lib/models/tipoPago.dart:8 - Payment types are returned as strings and converted to TipoPago objects.
Get Shipping Types GET /configuraciones/getTiposEnvio
Response Returns an array of available shipping type strings. List of shipping type names
{
"data" : [
"Estándar" ,
"Express" ,
"Terrestre" ,
"Aéreo"
]
}
Source: lib/models/tipoEnvio.dart:8 - Shipping types are returned as strings and converted to TipoEnvio objects.
Get Delivery Types GET /configuraciones/getTiposEntrega
Response Returns an array of available delivery type strings. List of delivery type labels
{
"data" : [
"Agencia - Domicilio" ,
"Domicilio - Agencia" ,
"Agencia - Agencia" ,
"Domicilio - Domicilio"
]
}
Delivery Type Values Each delivery type has associated properties: Label Value Requires Sender Address Requires Recipient Address Agencia - Domicilio 1 No Yes Domicilio - Agencia 2 Yes No Agencia - Agencia 3 No No Domicilio - Domicilio 4 Yes Yes
Source: lib/models/tipoEntrega.dart:56 - Delivery types include enum with labels, values, and address requirement flags.
Get Plans GET /configuraciones/getPlanes
Response Returns an array of pricing plan objects with tariff details. Unique identifier for the plan
Base weight in kilograms included in the tariff
Price per kilogram for excess weight
Price for envelope/small package
Plan status (1 = active, 0 = inactive)
Creation or last update date
Associated location ID (optional)
{
"data" : [
{
"id" : 1 ,
"nombre" : "Plan Básico" ,
"tarifa_base" : "15.00" ,
"peso_base" : 5 ,
"precio_exceso" : "2.50" ,
"precio_sobre" : "8.00" ,
"estado" : 1 ,
"fecha" : "2024-01-15" ,
"id_ubicacion" : null
},
{
"id" : 2 ,
"nombre" : "Plan Premium" ,
"tarifa_base" : "25.00" ,
"peso_base" : 10 ,
"precio_exceso" : "2.00" ,
"precio_sobre" : "12.00" ,
"estado" : 1 ,
"fecha" : "2024-01-15" ,
"id_ubicacion" : 5
}
]
}
Source: lib/models/plan.dart:24 - Plan model includes pricing structure for weight-based tariffs.
Usage Patterns
Configuration Dropdowns
These endpoints are typically called once during app initialization and cached for use in dropdown menus and form selectors throughout the application.
Price Calculation
The plans endpoint is particularly important for calculating shipment costs:
Base tariff applies up to the base weight
Excess weight is charged at the precio_exceso rate
Small packages/envelopes use the precio_sobre flat rate
Delivery Type Logic
When selecting a delivery type, the application uses the address requirement flags to determine which address fields to show:
bool requiereDireccionRemitente = tipo.requiereDireccionRemitente;
bool requiereDireccionDestinatario = tipo.requiereDireccionDestinatario;
All settings endpoints are defined in lib/core/api/api_endpoints.dart:54-61 and implemented in lib/services/configuraciones_service.dart.