Skip to main content

Overview

The branch APIs provide information about physical branch locations, including full details and simplified views filtered by coverage area.

Get Sucursales

GET /sucursales/getSucursales

Response

Returns an array of complete branch objects with all details.
data
array
{
  "data": [
    {
      "id": 1,
      "nombre": "Sucursal Central Lima",
      "direccion": "Av. Principal 123",
      "telefono": "01-1234567",
      "celular": "987654321",
      "tipo": 1,
      "id_distrito": 15,
      "distrito_nombre": "Miraflores",
      "id_plan": 2,
      "plan_nombre": "Plan Premium",
      "serie_remito": "R001",
      "serie_boleta": "B001",
      "serie_factura": "F001",
      "serie_nc_factura": "NCF001",
      "serie_nc_boleta": "NCB001",
      "serie_caja": "C001",
      "serie_transportista": "T001"
    }
  ]
}
Source: lib/models/sucursal.dart:42 - Complete model definition with all branch fields.

Usage Patterns

Full Branch Information

Use getSucursales when you need complete branch details including document series, plan information, and district data.

Shipment Creation

  • Use getSucursalesSimpleCoberturaOrigen to populate origin branch dropdowns
  • Use getSucursalesSimpleCoberturaDestino to populate destination branch dropdowns
This separation ensures users can only select valid branches based on their coverage capabilities.
All branch endpoints are defined in lib/core/api/api_endpoints.dart:20-24 and implemented in lib/services/sucursal_service.dart.

Build docs developers (and LLMs) love