Skip to main content

Overview

The system settings APIs provide configuration data used throughout the application, including payment methods, delivery options, shipping types, and pricing plans.

Get Payment Types

GET /configuraciones/getTiposPago

Response

Returns an array of available payment type strings.
data
array<string>
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.

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.

Build docs developers (and LLMs) love