Skip to main content
Manage net pricing rates for different container types and destinations.

GET - List Net Pricing

Retrieves all net pricing records with computed fields.

Response

id
integer
Unique identifier for the pricing record
region
string
Geographic region
country
string
Country name
port
string
Port name
tipo
string
Container type: LCL, 20’, 40’, or 40’HQ
currency
string
Currency (USD or EUR)
freight_net
number
Base freight net rate
first_leg
number
First leg cost (optional)
net_container
number
Computed: freight_net + (first_leg ?? 0) * 50
net_m3
number
Computed per m³ rate based on container type
rebate
number
Rebate amount (optional)
net_total
number
Computed: net_m3 + (rebate ?? 0)
valid_from
string
Start date of validity
valid_until
string
End date of validity
created_at
string
Creation timestamp
updated_at
string
Last update timestamp

Request Example

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

Response Example

200
[
  {
    "id": 1,
    "region": "Asia",
    "country": "China",
    "port": "Shanghai",
    "tipo": "20'",
    "currency": "USD",
    "freight_net": 1200.0,
    "first_leg": 10.0,
    "net_container": 1700.0,
    "net_m3": 32.0,
    "rebate": -5.0,
    "net_total": 27.0,
    "valid_from": "2024-01-01",
    "valid_until": "2024-06-30",
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:00:00Z"
  },
  {
    "id": 2,
    "region": "Asia",
    "country": "China",
    "port": "Shanghai",
    "tipo": "40'",
    "currency": "USD",
    "freight_net": 2100.0,
    "first_leg": 15.0,
    "net_container": 2850.0,
    "net_m3": 53.0,
    "rebate": -8.0,
    "net_total": 45.0,
    "valid_from": "2024-01-01",
    "valid_until": "2024-06-30",
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:00:00Z"
  }
]
401
{
  "error": "No autorizado"
}

POST - Create Net Pricing

Creates a new net pricing record. This endpoint requires admin permissions. The server automatically computes net_container, net_m3, and net_total based on the provided values.
Admin Only: Only users with admin roles (DIRECTOR, GERENTE) can create pricing records.

Computation Logic

The server automatically computes derived fields:
  • net_container = freight_net + (first_leg ?? 0) * 50
  • net_m3 depends on container type:
    • For 20’: net_container / 50 - 2
    • For 40’: net_container / 50 - 4
    • For other types: net_container / 50
  • net_total = net_m3 + (rebate ?? 0)

Request Body

region
string
required
Geographic region
country
string
required
Country name
port
string
required
Port name
tipo
string
required
Container type: LCL, 20’, 40’, or 40’HQ
currency
string
default:"USD"
Currency (USD or EUR)
freight_net
number
required
Base freight net rate
first_leg
number
First leg cost
rebate
number
Rebate amount
valid_from
string
required
Start date of validity (YYYY-MM-DD)
valid_until
string
required
End date of validity (YYYY-MM-DD)

Request Example

cURL
curl -X POST https://api.iclcotizaciones.com/api/pricing-netos \
  -H "Cookie: session=your_session_token" \
  -H "Content-Type: application/json" \
  -d '{
    "region": "Asia",
    "country": "China",
    "port": "Ningbo",
    "tipo": "20'",
    "currency": "USD",
    "freight_net": 1250.0,
    "first_leg": 12.0,
    "rebate": -6.0,
    "valid_from": "2024-03-01",
    "valid_until": "2024-08-31"
  }'

Response Example

201
{
  "id": 45,
  "region": "Asia",
  "country": "China",
  "port": "Ningbo",
  "tipo": "20'",
  "currency": "USD",
  "freight_net": 1250.0,
  "first_leg": 12.0,
  "net_container": 1850.0,
  "net_m3": 35.0,
  "rebate": -6.0,
  "net_total": 29.0,
  "valid_from": "2024-03-01",
  "valid_until": "2024-08-31",
  "created_at": "2024-03-04T16:30:00Z",
  "updated_at": "2024-03-04T16:30:00Z"
}
403
{
  "error": "No autorizado"
}

PUT - Update Pricing Neto

Updates an existing pricing neto record by ID. Automatically recalculates derived fields (net_container, net_m3, net_total). This endpoint requires admin permissions.
Admin Only: Only users with admin roles (DIRECTOR, GERENTE, ADMINISTRACION) can update pricing records.

Path Parameters

id
integer
required
The unique identifier of the pricing neto record to update

Request Body

All fields from POST are supported. The updated_at timestamp is automatically set to the current time.
region
string
required
Geographic region
country
string
required
Country name
port
string
required
Port name
tipo
string
required
Container type: LCL, 20’, 40’, or 40’HQ
currency
string
default:"USD"
Currency (USD or EUR)
freight_net
number
required
Base freight net rate
first_leg
number
First leg cost
rebate
number
Rebate amount
valid_from
string
required
Start date of validity (YYYY-MM-DD)
valid_until
string
required
End date of validity (YYYY-MM-DD)

Request Example

cURL
curl -X PUT https://api.iclcotizaciones.com/api/pricing-netos/45 \
  -H "Cookie: session=your_session_token" \
  -H "Content-Type: application/json" \
  -d '{
    "region": "Asia",
    "country": "China",
    "port": "Ningbo",
    "tipo": "20'",
    "currency": "USD",
    "freight_net": 1300.0,
    "first_leg": 12.0,
    "rebate": -6.0,
    "valid_from": "2024-03-01",
    "valid_until": "2024-09-30"
  }'

Response Example

200
{
  "id": 45,
  "region": "Asia",
  "country": "China",
  "port": "Ningbo",
  "tipo": "20'",
  "currency": "USD",
  "freight_net": 1300.0,
  "first_leg": 12.0,
  "net_container": 1900.0,
  "net_m3": 36.0,
  "rebate": -6.0,
  "net_total": 30.0,
  "valid_from": "2024-03-01",
  "valid_until": "2024-09-30",
  "created_at": "2024-03-04T16:30:00Z",
  "updated_at": "2024-03-04T18:45:00Z"
}
403
{
  "error": "No autorizado"
}

DELETE - Delete Pricing Neto

Deletes a pricing neto record by ID. This endpoint requires admin permissions.
Admin Only: Only users with admin roles (DIRECTOR, GERENTE, ADMINISTRACION) can delete pricing records. This is a hard delete and cannot be undone.

Path Parameters

id
integer
required
The unique identifier of the pricing neto record to delete

Request Example

cURL
curl -X DELETE https://api.iclcotizaciones.com/api/pricing-netos/45 \
  -H "Cookie: session=your_session_token"

Response Example

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

Build docs developers (and LLMs) love