Xameel

Xameel

  • Agent App
  • User Portal
  • Developer

›Developer

Agent App

  • Start
  • Register at Xameel
  • Resetting your Password
  • Managing a Delivery
  • Cancelling a Delivery
  • Completing a Delivery

User Portal

  • Start
  • Create Delivery Request
  • Manage Delivery Request
  • Cancel Delivery Request
  • Create API
  • Enable / Disable API
  • Remove API
  • View Report
  • Export Report
  • View invoice
  • Pay Invoice

Developer

  • Start
  • Get Delivery Cost Estimate
  • Submit a Delivery Request
  • Get a Collection of Delivery Requests
  • Get a Delivery Request
  • Update a Delivery Request
  • Cancel a Delivery Request
  • Add an Item to a Delivery
  • Update an Item in a Delivery
  • Delete and Item from a Delivery
  • Get Chat Messages
  • Submit Chat Message

Get Delivery Cost Estimate

This API helps get an estimation of the delivery request. The estimation includes the cost, distance, and time. If you are planning to use custom delivery cost for your request, you do not need to use this API to know your cost as it will be automatically calculated when you submit a new delivery request.

Note: The provided data are just an estimate. The exact cost of the delivery, the distance and time, may be different.

Request

Method : POST
URI : https://core.xameel.com/api/v1/call/estimate

Header

{
    "Content-Type": "application/json",
    "Accept": "application/json",
    "api_key": "your-api-key",
    "api_aceess": "your-api-access",
    "api_pass": "your-api-password"
}
KeyRequiredDetails
api_keyYesStringYour API key generated from the user portal
api_accessYesStringYour API access generated from the user portal
api_passwordYesStringYour API password generated from the user portal

Body

{
    "originLocation": {
        "lat": 24.48316739335232,
        "long": 39.62342909511722
    },
    "destinationLocation": {
        "lat": 24.425913138738597,
        "long": 39.60282972988284
    }
}
KeyRequiredTypeDefaultDetails
originLocationYesObject-Object of both latitude and longitude of the pickup location
latYesDouble-The location latitude
longYesDouble-The location longitude
destinationLocationYesObject-Object of both latitude and longitude of the drop off location

Expected Response

Success

{
    "code": 200,
    "status": "success",
    "message": "Estimation completed",
    "data": {
        "cost": 17,
        "distance": "12.9 km",
        "time": "20 mins"
    }
}
PropertyTypeDetails
dataArrayAll the related messages found ordered by new to old
costFloatThe estimated cost of the requested delivery. The cost doesn't include the subscription fees
distanceStringThe estimated distance in string format
timeStringThe esitmated travel time between the origin and the destination in string format

Failure

{
    "code": 400,
    "err_code": "1x00022-022",
    "status": "fail",
    "message": "Bad request",
    "errors": [
        "Cannot calculate the distance - check origin and destination"
    ]
}
CodeErrorDetails
4001x00025-021Error with the data provided
4001x00025-002Error with the data provided
4011x00025-015Couldn't validate the API
4031x00025-157Unauthorized to preform the request
← StartSubmit a Delivery Request →
  • Request
  • Header
  • Body
  • Expected Response
    • Success
    • Failure
Xameel
Docs
Web Portal for BusinessAgent AppAPI Integration "Hello World!"
Community
User ShowcaseStack OverflowContact us
More
DGEra3WebBox
3WebBox and DGEra family
Copyright © 2018 DGEra - Xameel Logistic Services