Skip to main content

Price

1 API call in this section.

Get Price

Customer Portal / Delivery Management / Price
POST/customer/delivery/price

Calculates delivery price for given coordinates and service. Unit size is automatically derived from package items.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/customer/delivery/price" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "delivery_service_id": "uuid",7  "pickup_lat": 40.7128,8  "pickup_lng": -74.006,9  "dropoff_lat": 40.7589,10  "dropoff_lng": -73.9851,11  "package": {12    "items": [13      {14        "quantity": 1,15        "weight": 1.5,16        "length": 30,17        "width": 20,18        "height": 1519      }20    ]21  }22}'
Request body
json
1{2  "delivery_service_id": "uuid",3  "pickup_lat": 40.7128,4  "pickup_lng": -74.006,5  "dropoff_lat": 40.7589,6  "dropoff_lng": -73.9851,7  "package": {8    "items": [9      {10        "quantity": 1,11        "weight": 1.5,12        "length": 30,13        "width": 20,14        "height": 1515      }16    ]17  }18}

Request body fields

delivery_service_idExample
string

Example field from the request body.

pickup_latExample
number

Example field from the request body.

pickup_lngExample
number

Example field from the request body.

dropoff_latExample
number

Example field from the request body.

dropoff_lngExample
number

Example field from the request body.

packageExample
object

Example field from the request body.

package.itemsExample
array<object>

Example field from the request body.

package.items.quantityExample
number

Example field from the request body.

package.items.weightExample
number

Example field from the request body.

package.items.lengthExample
number

Example field from the request body.

package.items.widthExample
number

Example field from the request body.

package.items.heightExample
number

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success200OK
Response body
json
1{2  "success": true,3  "data": {4    "price": 25.55  }6}