Skip to main content
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

id
integer
Unique identifier for the location
name
string
Location name
country
string
Country name
region
string
Region or state
location_type
string
Always “via” for this endpoint
is_active
boolean
Whether the location is active

Request Example

cURL
curl -X GET https://api.iclcotizaciones.com/api/vias \
  -H "Cookie: session=your_session_token"

Response Example

200
[
  {
    "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
  }
]
401
{
  "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

name
string
required
Location name
country
string
required
Country name
region
string
Region or state
is_active
boolean
default:true
Whether the location is active

Request Example

cURL
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

201
{
  "id": 25,
  "name": "Santos",
  "country": "Brazil",
  "region": "São Paulo",
  "location_type": "via",
  "is_active": true
}
403
{
  "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

id
integer
required
The unique identifier of the via location to update

Request Body

name
string
required
Location name
country
string
required
Country name
region
string
Region or state
is_active
boolean
Whether the location is active

Request Example

cURL
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

200
{
  "id": 25,
  "name": "Santos Port",
  "country": "Brazil",
  "region": "São Paulo",
  "location_type": "via",
  "is_active": true
}
403
{
  "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

id
integer
required
The unique identifier of the via location to delete

Request Example

cURL
curl -X DELETE https://api.iclcotizaciones.com/api/vias/25 \
  -H "Cookie: session=your_session_token"

Response Example

200
{
  "ok": true
}
403
{
  "error": "No autorizado"
}

Build docs developers (and LLMs) love