Eshta.Express API

Getting Started

Version

This version is 0.8.6.1

Updated on December 10th, 2016.

What's new

  • Pricing request was added, now you can request a breakdown of charges of a certain shipment.
  • File a complaint was added, now you can submit a complaint to Eshta.Express using your account number and shipment serial number.

License

Copyright @2016 Eshta. All Rights Reserved.


Base URL https://eshta.com/api

Client Registration

Registers a new client using POST method:
POST /client
Accepts: Application/JSON
Parameters
  1. name - String, represents the client name [required]
  2. email - String, represents the client email address [required]
  3. phone - String, represents the client phone number [required]
Produces: Application/JSON
Example request
{"name": "Kids World Shop", "email" : "contact@kidsworld.com", "phone" :"+2012345678901"}
Response 200
{"id" : "1" ,"name": "Kids World Shop", "email" : "contact@kidsworld.com", "phone" :"+2012345678901", "accountNumber" : "123char"}
Response 400
{"code" : "400" ,"message": "Required parameter missing or mal-formatted: [email]"}

Service List

Gets a service list using GET method:
GET /service
Produces: text/xml

Sends a shipment using POST method:
POST /shipment
Accepts: Application/JSON
Parameters
  1. clientId - Long, represents the client unique identifier [required]
  2. fromAddress - String, represents the pick-up address [required]
  3. toAddress - String, represents the destination address [required]
  4. phone - String, represents the phone number of the person recieving the package [required]
Produces: Application/JSON
Example request
{"clientId": "1", "fromAddress" : "Deeb Mall, Roushdy, Alexandria", "toAddress" :"Green Plaza, Semouha, Alexandria", "recieverPhone" : "+2010000000000"}
Response 200
{"shipmentSerial": "222002", "clientId": "1", "fromAddress" : "Deeb Mall, Roushdy, Alexandria", "toAddress" :"Green Plaza, Semouha, Alexandria", "recieverPhone" : "+2010000000000", "price" : "10", "currency" : "EGP","delivery_date" : "12-12-2016 09:00:29 AM", "qrCode" : byte[]}
Response 400
{"code" : "400" ,"message": "Required parameter missing or mal-formatted: [clientId]"}

QR Code Rendering

Gets the QR code associated with a certain shipment, using GET method:
GET /qrCode
Accepts: Application/JSON
Parameters
  1. shipmentSerial - Long, represents the shipment unique identifier [required]
  2. clientId - Long, represents the client unique identifier [required]
  3. fromAddress - String, represents the pick-up address [required]
  4. toAddress - String, represents the destination address [required]
  5. recieverPhone - String, represents the phone number of the person recieving the package [required]
Produces: Application/JSON
Example request
{"shipmentSerial": "222002", "clientId": "1", "fromAddress" : "Deeb Mall, Roushdy, Alexandria", "toAddress" :"Green Plaza, Semouha, Alexandria", "recieverPhone" : "+2010000000000"}
Response 200
{"qrCode" : byte[]}
Response 400
{"code" : "400" ,"message": "Required parameter missing or mal-formatted: [shipmentSerial]"}

Shipment Status

Gets the shipment status using GET method:
GET /shipment/status
Accepts: Application JSON
Parameters
  1. shipmentSerial - Long, represents the shipment unique identifier [required]
  2. clientId - Long, represents the client unique identifier [required]
  3. fromAddress - String, represents the pick-up address [required]
  4. toAddress - String, represents the destination address [required]
  5. recieverPhone - String, represents the phone number of the person recieving the package [required]
Produces: Application JSON
Example request
{"shipmentSerial": "222002", "clientId": "1", "fromAddress" : "Deeb Mall, Roushdy, Alexandria", "toAddress" :"Green Plaza, Semouha, Alexandria", "recieverPhone" : "+2010000000000"}
Response 200
{"shipmentSerial": "222002", "status": "shipped"}
Response 400
{"code" : "400" ,"message": "Required parameter missing or mal-formatted: [email]"}

Shipment Details

Gets shipment details using GET method:
GET /shipment
Accepts: Application JSON
Parameters
  1. shipmentSerial - Long, represents the shipment unique identifier [required]
Produces: Application JSON
Example request
{"shipmentSerial": "222002"}
Response 200
{"shipmentSerial": "222002", "clientId": "1", "fromAddress" : "Deeb Mall, Roushdy, Alexandria", "toAddress" :"Green Plaza, Semouha, Alexandria", "recieverPhone" : "+2010000000000"}
Response 400
{"code" : "400" ,"message": "Required parameter missing or mal-formatted: [shipmentSerial]"}

Cancel Shipment

Sends a cancel Shipment request using PUT method:
PUT /shipment
Accepts: Application JSON
Produces: Application JSON
Example request
{"shipmentSerial": "222002"}
Response 200
{"shipmentSerial": "222002", "status": "canceled"}
Response 400
{"code" : "400" ,"message": "The shipment you are trying to cancel is already shipped"}

Pricing

Gets an estimate pricing using GET method:
GET /price
Accepts: Application/JSON
Parameters
  1. clientId - Long, represents the complaint author identifier [required]
  2. fromAddress - String, represents the pick-up address [required]
  3. toAddress - String, represents the destination [required]
Produces: Application/JSON
Example request
{"clientId": "1", "fromAddress" : "Deeb Mall, Roushdy, Alexandria", "toAddress" :"Green Plaza, Semouha, Alexandria"}
Response 200
{"clientId": "1", "fromAddress" : "Deeb Mall, Roushdy, Alexandria", "toAddress" :"Green Plaza, Semouha, Alexandria", "price" : "10", "currency" : "EGP"}
Response 400
{"code" : "400" ,"message": "Required parameter missing or mal-formatted: [fromAddress]"}

File a Complaint

Sends a complaint using POST method:
POST /complaint
Accepts: Application/JSON
Parameters
  1. clientId - Long, represents the complaint author identifier [required]
  2. message - String, represents complaint text [required]
  3. shipmentSerial - Long, represents the shipment serial number [required]
Produces: Application/JSON
Example request
{"clientId": "1", "message" : "Shipment was late", "shipmentSerial" :"2332233"}
Response 200
{"clientId": "1", "message" : "Shipment was late", "shipmentSerial" :"2332233", "complaintStatus" : "sent"}
Response 400
{"code" : "400" ,"message": "Required parameter missing or mal-formatted: [clientId]"}