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

Submit a Delivery Request

Create a new delivery request to Xameel. Once the request is submitted it iwll be sent to dispatch for processing. After submitting the request you can use Get Delivery Request to track the request status.

Request

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

Header

{
    "Content-Type": "application/json",
    "Accept": "application/json",
    "api_key": "your-api-key",
    "api_aceess": "your-api-access",
    "api_pass": "your-api-password"
}
KeyRequiredTypeDetails
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

{
    "reference": "custom-id",
    "origin": "Chipotle",
    "originLocation": {
        "lat": 24.2154784,
        "long": 21.4877958
    },
    "originPhone" "+1234587",
    "destination": "Sam Smith",
    "destinationLocation": {
        "lat": 24.2154784,
        "long": 21.4877958
    },
    "destinationPhone" "+1234587",
    "customDeliveryCost": 45.00,
    "tax": 5.0,
    "collectCash": true,
    "amountToCollect": 85.00,
    "paymentMethod": "cash",
    "items": [
        {
            "item": "Apple Pie",
            "description": "Original apple pie",
            "price": 10.99,
            "quantity": 1
        },
        {
            "item": "Vanilla Pie",
            "description": "Vanilla cream pie with banana slices",
            "price": 8.99,
            "quantity": 1,
            "notes": "Extra banana slices"
        }
    ]
}
KeyRequiredTypeDefaultDetails
referenceNoString-A reference id that can be set to identify a delivery request
originYesString-A title to describe or label the pickup locattion
originLocationYesObject-Object of both latitude and longitude of the pickup location
originPhoneYesString-Contact phone for the pick up location
latYesDouble-The location latitude
longYesDouble-The location longitude
destinationYesString-A title to describe or label the drop off locattion
destinationLocationYesObject-Object of both latitude and longitude of the drop off location
destinationPhoneYesString-Contact phone for the drop off location
customerDeliveryCostNoFloat-A custom delivery charge to apply to the delivery as the actual charge. Value must be >= 0.00
taxNoFloat-The delivery tax 0.00 - 100.00 (%). If left empty the account set location will be used to determine the tax value. The value is entered in % format and must be >= 0
collectCashNoBooleanFalseSet to true if you want the agent to collect money on delivery
amountToCollectNoFloat0.00Speciy the amount to be collected. Value must be >= 0.00
paymentMethodNoStringcashThe payment method for this request. this can be "cash" or "credit card"
itemsYesArray-An array of objects of items to be added to the delivery request. Visit add item to delivery for object properties and formatting

Note: Only requests with payment type set to "cash" can be modified by the agent. Modifications will be reflected on the delivery total and the amount to collect.

Expected Response

Success

{
    "code": 200,
    "status": "success",
    "message": "Delivery created successfully"
}

Failure

This response is just a sample, the content may differ based on the type of error

{
    "code": 400,
    "err_code": "1x00022-010",
    "status": "fail",
    "message": "Bad request",
    "errors": [
        "No client assocciated with the API found"
    ]
}
CodeErrorDetails
4001x00022-022Error with the provided data
4011x00022-015Couldn't validate the provided API data
4031x00022-155No authorization was provided
4031x00022-013Unauthorized to use the API
5001x00022-024Server was not able to process the request
← Get Delivery Cost EstimateGet a Collection of Delivery Requests →
  • 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