KKatch Developers

Estimate a delivery

POST
/tasks/estimate

Returns the driving distance, travel time and delivery price between two points, without creating a task.

Authorization

apiKeyAuth
headerAuthorization<token>

Required on every request. Send apikey <your-api-key>, together with the x-seller-id header.

Header Parameters

x-seller-id*string

Your seller id.

Request Body

application/json
  1. body
from*
to*

Response Body

Delivery estimate

application/json
  1. response
travelDetail?
price?|

Delivery price in KWD.

curl -X POST "https://example.com/tasks/estimate" \  -H "x-seller-id: YOUR_SELLER_ID" \  -H "Content-Type: application/json" \  -d '{    "from": {      "latitude": 29.37,      "longitude": 47.98    },    "to": {      "latitude": 29.3375,      "longitude": 48.0758    }  }'
{  "travelDetail": {    "totalDistance": 7420,    "duration": 840,    "durationInTraffic": 900,    "hasTraffic": true,    "estimatedDelayByTraffic": 60  },  "price": 1.5}