Manage via (transit) locations for shipments. Vias are filtered from the unified locations table where location_type = "via".
GET - List Via Locations
Retrieves all via locations.
Response
Unique identifier for the location
Always “via” for this endpoint
Whether the location is active
Request Example
curl -X GET https://api.iclcotizaciones.com/api/vias \
-H "Cookie: session=your_session_token"
Response Example
[
{
"id": 10,
"name": "Buenos Aires",
"country": "Argentina",
"region": "Buenos Aires",
"location_type": "via",
"is_active": true
},
{
"id": 11,
"name": "Montevideo",
"country": "Uruguay",
"region": "Montevideo",
"location_type": "via",
"is_active": true
}
]
{
"error": "No autorizado"
}
POST - Create Via Location
Creates a new via location. This endpoint requires admin permissions.
Admin Only: Only users with admin roles (DIRECTOR, GERENTE) can create via locations.
Request Body
Whether the location is active
Request Example
curl -X POST https://api.iclcotizaciones.com/api/vias \
-H "Cookie: session=your_session_token" \
-H "Content-Type: application/json" \
-d '{
"name": "Santos",
"country": "Brazil",
"region": "São Paulo",
"is_active": true
}'
Response Example
{
"id": 25,
"name": "Santos",
"country": "Brazil",
"region": "São Paulo",
"location_type": "via",
"is_active": true
}
{
"error": "No autorizado"
}
PUT - Update Via Location
Updates an existing via location by ID. This endpoint requires admin permissions.
Admin Only: Only users with admin roles (DIRECTOR, GERENTE, ADMINISTRACION) can update via locations.
Path Parameters
The unique identifier of the via location to update
Request Body
Whether the location is active
Request Example
curl -X PUT https://api.iclcotizaciones.com/api/vias/25 \
-H "Cookie: session=your_session_token" \
-H "Content-Type: application/json" \
-d '{
"name": "Santos Port",
"country": "Brazil",
"region": "São Paulo",
"is_active": true
}'
Response Example
{
"id": 25,
"name": "Santos Port",
"country": "Brazil",
"region": "São Paulo",
"location_type": "via",
"is_active": true
}
{
"error": "No autorizado"
}
DELETE - Delete Via Location
Deletes a via location by ID. This endpoint requires admin permissions.
Admin Only: Only users with admin roles (DIRECTOR, GERENTE, ADMINISTRACION) can delete via locations. This is a hard delete and cannot be undone.
Path Parameters
The unique identifier of the via location to delete
Request Example
curl -X DELETE https://api.iclcotizaciones.com/api/vias/25 \
-H "Cookie: session=your_session_token"
Response Example
{
"error": "No autorizado"
}