Delivery
1 API call in this section.
Calculate Delivery Fee
Public APIs / Storefront / Delivery
POST
/public/storefront/:storeSlug/delivery/priceCalculate delivery fee for a cart before placing an order.
Does not create any order or booking.
No auth required.
Path parameters
| Parameter | Type | Description |
|---|---|---|
storeSlugRequired | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
delivery_service_idRequired | string | UUID of the delivery service |
dropoff | object | — |
dropoff.latitudeRequired | number | / |
dropoff.longitude | number | — |
itemsRequired | array<object> | array of |
items.variant_id | string | — |
items.quantity | number | — |
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/public/storefront/${STORESLUG}/delivery/price" \2 --header "Content-Type: application/json" \3 --data-raw '{4 "delivery_service_id": "service-uuid",5 "dropoff": {6 "latitude": 33.3152,7 "longitude": 44.36618 },9 "items": [10 {11 "variant_id": "variant-uuid-1",12 "quantity": 213 },14 {15 "variant_id": "variant-uuid-2",16 "quantity": 117 }18 ]19}'Response examples
200OK
Response body
json
1{2 "success": true,3 "data": {4 "delivery_fee": 3.5,5 "currency": "USD",6 "breakdown": {7 "base_fee": 2,8 "distance_fee": 1.59 }10 }11}