POST /api/quote-shipping
Calculates shipping cost estimates based on destination and package details. Uses the LogisticsManager to get the best quote from available carriers.Request Body
DANE destination city code (e.g., “11001” for Bogotá)
DANE destination department code (e.g., “11” for Cundinamarca)
Array of items to ship
Weight in kilograms (default: 0.5)
Weight unit (default: “KG”)
Height in centimeters (default: 10)
Width in centimeters (default: 10)
Length in centimeters (default: 10)
Dimensions unit (default: “CM”)
Item unit price
Item quantity
Payment method: “COD” or “EXTERNAL_PAYMENT” (default: “EXTERNAL_PAYMENT”)
Response
Indicates if quote was successful
Shipping cost in Colombian pesos
Selected carrier name (e.g., “Coordinadora”, “Servientrega”)
Estimated delivery days
Additional quote details for debugging
Example Request
Example Response
DANE Codes
Common DANE City Codes
| City | City Code | Department Code |
|---|---|---|
| Bogotá | 11001 | 11 |
| Medellín | 05001 | 05 |
| Cali | 76001 | 76 |
| Barranquilla | 08001 | 08 |
| Cartagena | 13001 | 13 |
Origin Configuration
The origin warehouse is automatically configured from environment variables:VENNDELO_PICKUP_NAMEVENNDELO_PICKUP_ADDRESSVENNDELO_PICKUP_CITY_CODEVENNDELO_PICKUP_SUBDIVISION_CODE
Carrier Selection
The LogisticsManager automatically selects the best carrier based on:- Lowest cost
- Service availability for destination
- Payment method compatibility (some carriers don’t support COD)
Supported Carriers
Currently integrated with:- Venndelo (aggregator for multiple carriers)
- Coordinadora
- Servientrega
- Other carriers via Venndelo API
Default Dimensions
If dimensions are not provided for line items, the following defaults are used:Volumetric Weight
Carriers may apply volumetric weight calculation:Error Responses
400 Bad Request - Invalid Data
405 Method Not Allowed
500 Internal Server Error - Logistics Error
Performance
Shipping quotes are calculated in real-time by querying the logistics provider’s API. Response times typically range from 500ms to 2 seconds depending on carrier API availability.
Caching Recommendations
For production implementations, consider:- Caching quotes by destination + weight combination for 5-10 minutes
- Implementing client-side debouncing for quote requests
- Showing loading states during API calls