Overview
The branch APIs provide information about physical branch locations, including full details and simplified views filtered by coverage area.
Get All Branches
Origin Coverage
Destination Coverage
Get Sucursales GET /sucursales/getSucursales
Response Returns an array of complete branch objects with all details. Unique identifier for the branch
Branch mobile/cell phone number
District ID where the branch is located
Name of the district where the branch is located
Name of the associated plan
Document series for remito (delivery receipt)
Document series for boleta (invoice)
Document series for factura (bill)
Document series for credit note on factura
Document series for credit note on boleta
Document series for cash register
Document series for carrier/transporter
{
"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.
Get Branches - Origin Coverage GET /sucursales/getSucursalesSimpleCoberturaOrigen
Description Retrieves branches that can serve as origin points for shipments. This endpoint returns a simplified list of branches that have origin coverage capability. Response Returns an array of branch objects filtered for origin coverage. Array of Sucursal objects (see “Get All Branches” tab for complete structure)
{
"data" : [
{
"id" : 1 ,
"nombre" : "Lima Centro" ,
"direccion" : "Av. Central 456" ,
"telefono" : "01-7654321"
},
{
"id" : 3 ,
"nombre" : "Arequipa Norte" ,
"direccion" : "Calle Principal 789" ,
"telefono" : "054-123456"
}
]
}
Get Branches - Destination Coverage GET /sucursales/getSucursalesSimpleCoberturaDestino
Description Retrieves branches that can serve as destination points for shipments. This endpoint returns a simplified list of branches that have destination coverage capability. Response Returns an array of branch objects filtered for destination coverage. Array of Sucursal objects (see “Get All Branches” tab for complete structure)
{
"data" : [
{
"id" : 2 ,
"nombre" : "Cusco Plaza" ,
"direccion" : "Plaza Principal 321" ,
"telefono" : "084-987654"
},
{
"id" : 4 ,
"nombre" : "Trujillo Este" ,
"direccion" : "Av. Este 555" ,
"telefono" : "044-555666"
}
]
}
Usage Patterns
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.