Endpoint
POST
/encomienda/calcularPrecioDescription
Calculate the shipping price for a package based on multiple factors including weight, customer type, destination district, service plan, shipping type, and delivery type. The calculation includes base price, additional services, and mobility charges.Request Body
Package weight in kilograms
Customer ID (affects pricing based on customer plan/type)
Destination district ID (affects pricing based on coverage zone)
Pricing plan ID
Shipping type (e.g., “Express”, “Regular”)
Delivery type (e.g., “Domicilio” for home delivery, “Agencia” for pickup at branch)
Response
Base shipping price
Additional service charge
Mobility/transportation service charge
Minimum weight threshold for pricing
Minimum price charged regardless of weight
Indicates if a valid price configuration exists for the given parameters
Request Example
Response Example
Successful Calculation
No Price Configuration Found
Pricing Components
Base Price (precio)
The fundamental shipping cost calculated based on:- Package weight (
kilos) - Destination district coverage zone
- Customer’s pricing plan
- Shipping type (Express vs Regular)
Additional Service (servicio_adicional)
Extra charges for special services such as:- Insurance coverage
- Packaging materials
- Handling of fragile items
- Priority processing
Mobility Service (servicio_movilidad)
Transportation and logistics charges including:- Home pickup (if
tipo_entrega= “Domicilio” at origin) - Home delivery (if
tipo_entrega= “Domicilio” at destination) - Distance-based surcharges
- Urban/rural zone differentiation
Minimum Thresholds
Usage Notes
- Always check
existe_precioin the response. Iffalse, there is no price configuration for the requested parameters - The final total cost should be calculated as:
precio + servicio_adicional + servicio_movilidad - If the package weight is less than
peso_minimo, the pricing will be based onpeso_minimo - The final calculated price will never be less than
precio_minimo - Home delivery (
tipo_entrega= “Domicilio”) typically incurs higherservicio_movilidadcharges - Express shipping (
tipo_envio= “Express”) usually has a premium added to the base price
Error Handling
If the endpoint returnsexiste_precio: false, this indicates:
- The destination district may not be in the coverage area
- No pricing configuration exists for the selected plan
- The shipping type or delivery type combination is not supported
- Verify the district is within the service coverage area
- Check if alternative plans are available
- Consider different shipping/delivery type combinations
- Contact customer service for custom pricing