Price
1 API call in this section.
Get Delivery Price
/delivery/price?delivery_service_id=uuid&pickup_lat=23.780&pickup_lng=90.410&dropoff_lat=23.810&dropoff_lng=90.430&units=1&language=enCalculate delivery price based on pickup and dropoff coordinates and delivery service. Required Query Parameters: - delivery_service_id: UUID of the delivery service - pickup_lat: Pickup latitude - pickup_lng: Pickup longitude - dropoff_lat: Dropoff latitude - dropoff_lng: Dropoff longitude - units: Positive number of units for pricing Business Rules: - Price is calculated based on zones where pickup and dropoff coordinates fall - If pickup and dropoff are in the same zone, default price from delivery service may be used when zone pricing not found - If pickup and dropoff are in different zones, zone pricing rules are applied - Delivery service must exist and be active; units must be within service range
1curl --request GET "$ONDI_BASE_URL/delivery/price?delivery_service_id=uuid&pickup_lat=23.780&pickup_lng=90.410&dropoff_lat=23.810&dropoff_lng=90.430&units=1&language=en" \2 --header "Authorization: Bearer {{access_token}}"Query parameters
delivery_service_idOptionaluuid
UUID of the delivery service
pickup_latOptional23.780
Pickup latitude
pickup_lngOptional90.410
Pickup longitude
dropoff_latOptional23.810
Dropoff latitude
dropoff_lngOptional90.430
Dropoff longitude
unitsOptional1
Positive units for pricing
languageOptionalen
Preferred language for response messages
Headers
AuthorizationOptionalBearer {{access_token}}
Responses
1{2 "price": 25.993}1{2 "error": "Delivery location not found"3}1{2 "error": "Delivery service not found"3}1{2 "success": false,3 "message": "Internal server error"4}