Skip to main content
GET
/
api
/
v1
/
sucursales
/
{id}
Get Branch Office by ID
curl --request GET \
  --url https://api.example.com/api/v1/sucursales/{id}
{
  "id": 123,
  "codigoSucursal": "<string>",
  "nombreSucursal": "<string>",
  "direccion": "<string>",
  "ciudad": "<string>"
}

Endpoint

GET /api/v1/sucursales/{id}
Retrieve detailed information about a specific branch office using its unique identifier.

Path Parameters

id
number
required
The unique identifier of the branch office

Response

Returns a branch office object:
id
number
Unique branch identifier
codigoSucursal
string
Branch code (e.g., “LIM-001”, “CUS-001”)
nombreSucursal
string
Branch office name
direccion
string
Physical address of the branch
ciudad
string
City where the branch is located

Example Request

curl -X GET http://localhost:8080/api/v1/sucursales/1

Example Response

{
  "id": 1,
  "codigoSucursal": "LIM-001",
  "nombreSucursal": "Lima Centro",
  "direccion": "Av. Abancay 123",
  "ciudad": "Lima"
}

Error Handling

If the branch office is not found, the endpoint may return an error response. Always handle potential errors in your client application.

Use Cases

  • Display branch details in shipment creation forms
  • Branch office management interfaces
  • Route planning and logistics
  • Customer-facing branch locator tools
  • Integration with mapping services

Build docs developers (and LLMs) love