eurosoft tech web servicesshadowcars.co.uk/apidocument/eurosofttechapi... · location type i.e....

14
1 Eurosoft Tech Web Services

Upload: others

Post on 05-Oct-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Eurosoft Tech Web Servicesshadowcars.co.uk/APIDocument/EuroSofttechAPI... · location Type i.e. Airport - Heathrow Terminal 1 5 DropoffLocationType This is a Location Type like Airport,

1

Eurosoft Tech Web Services

Page 2: Eurosoft Tech Web Servicesshadowcars.co.uk/APIDocument/EuroSofttechAPI... · location Type i.e. Airport - Heathrow Terminal 1 5 DropoffLocationType This is a Location Type like Airport,

2

Introduction

This document describes how to integrate cab treasure booking and dispatch system with third party

application. whilst the documents drafted we supposed that the develop is familiar with web services.

Communicating API services

This will explain the process that how developer can make Data transmit in cab treasure system as well

as other system.

API Service Calling URL for SAVE Bookings

http://shadowcars.co.uk/api/jobs/SaveBooking

Method Name SaveBooking(object BookingJson)

BookingJson of type JSON Array

Test CompanyAccountCode : "12xxx-test"

Description: It will contain all required booking input parameters in JSON Array format.

Request JSON Format :

{

"BookingRefrenceID": "Your booking id for a trip",

"CompanyAccountCode": "12xxx-test",

"JourneyTypeID": 1,

"pickUpLocationType": "AirPort",

Page 3: Eurosoft Tech Web Servicesshadowcars.co.uk/APIDocument/EuroSofttechAPI... · location Type i.e. Airport - Heathrow Terminal 1 5 DropoffLocationType This is a Location Type like Airport,

3

"pickUpLocation": "Heathrow Terminal 1 TW6 1JS",

"DropoffLocationType": "Address",

"DropoffLocation": "South Hill Avenue HA2 0DU",

"PickupDate": "16/04/2016",

"PickupTimeHr": "16"

"PickupTimeMinute": "19",

"PassangerName": "David Jackson",

"PassangerEmail": "[email protected]",

"PassangermobileNumber": "07411257745",

"PassangerPhoneNumber": "020822244896",

"NoOfPassanger": 24,

"NoOfLuggages": "1",

"NoOfHandLuggages": "4",

"SpecialRequiretment": "XXXX",

"vehicleType": "Saloon",

"Fare": "20.00",

"PickupFlightNumber": "XXX",

"PickupComingFrom": "Canada",

"FromStreet": "XXX",

"DropoffDoorNumber": "XXX",

"DropoffStreet": "XXX",

"PickupDoorNumber": "XXX",

"ReturnFlightNumber": "XXX",

"ReturnDate": "05/10/2016",

"ReturnTimeHr": "12",

"ReturnTimeMinute": "00",

}

Page 4: Eurosoft Tech Web Servicesshadowcars.co.uk/APIDocument/EuroSofttechAPI... · location Type i.e. Airport - Heathrow Terminal 1 5 DropoffLocationType This is a Location Type like Airport,

4

Following is a list of parameters which will be required in JSON Array List Object

1

BookingRefrenceID Your system booking reference number

2 CompanyAccountCode An unique Account Company code which is

generated during signup process.

3 pickUpLocationType This is a Location Type like Airport, Station, and

Address etc.

4 pickUpLocation This is a complete address against selected pickup

location Type i.e. Airport - Heathrow Terminal 1

5 DropoffLocationType This is a Location Type like Airport, Station, and

Address etc.

6 DropoffLocation This is a complete address against selected Drop off

location Type i.e. Airport - Heathrow Terminal 1

7 PassangerName This is a passanger Name i.e. Mr. ABC

8 PassangerPhoneNumber It will contain only single phone number i.e. +44 182

111 111

9 PassangermobileNumber It will contain single mobile number +44 0752 111

11

10 NoOfLuggages It contain passenger luggage’s counter as Integer

value, for example 1, 2, 3…

11 NoOfHandLuggages It contain passenger hand luggage’s counter as

Integer value, for example 1, 2, 3…

12 NoOfPassanger It contains no of passenger counter as Integer value,

for example 1, 2, 3…

Page 5: Eurosoft Tech Web Servicesshadowcars.co.uk/APIDocument/EuroSofttechAPI... · location Type i.e. Airport - Heathrow Terminal 1 5 DropoffLocationType This is a Location Type like Airport,

5

13 SpecialRequiretment It contain string value

14 PickupDate

It is a traveling date. format “dd MM yy”

i.e.15 March 2016

15 PickupTimeHr

It is a traveling Time (in Hour) like 01,02…..23

16 PickupTimeMinute

It is a traveling Time (in minute) like 00,02…..59

17 ReturnDate

It is a return journey date in format “dd/MM/yyyy”

I.e.15 March 2016

18 ReturnTimeHr

It is a return journey time (in hour) like 01,02…..23

19 ReturnTimeMinute

It is a return journey time (in minute) like 00,

02…..59

20 JourneyTypeID

It will contain an ID of type Integer

If;

One way JourneyTypeID = 1

Return JourneyTypeID = 2

Wait And Return JourneyTypeID = 3

21 vehicleType

It is a type of vehicle passenger wants to travel on;

SALOON CAR

ESTATE CAR

5 Seater

6 Seater

7 SEATER

8 SEATER

Page 6: Eurosoft Tech Web Servicesshadowcars.co.uk/APIDocument/EuroSofttechAPI... · location Type i.e. Airport - Heathrow Terminal 1 5 DropoffLocationType This is a Location Type like Airport,

6

22 Fare (decimal)

It will contain total journey Fare. For example, total

Fare 50.00 (followed by currency sign)

Further explanation against above mentioned Parameters.

2. If PickupLocationType Airport then

Further parameters will expose

1-PickupComingFrom

2-PickupFlightNumber

2. IF PickupLocationType Station/Address then

Further parameters will expose

PickupDoorNumber

3. IF DropoffLocationType Address then

Further parameters will expose

DropoffDoorNumber

DropoffStreet

Response :

OK Status Code

Page 7: Eurosoft Tech Web Servicesshadowcars.co.uk/APIDocument/EuroSofttechAPI... · location Type i.e. Airport - Heathrow Terminal 1 5 DropoffLocationType This is a Location Type like Airport,

7

API Service Calling URL for Update a Booking

http://shadowcars.co.uk/api/jobs/UpdateBooking

Method Name UpdateBooking(object BookingJson)

BookingJson of type JSON Array

Description: It will contain all required booking input parameters in JSON Array format.

Following is a list of parameters which will be required in JSON Array List Object

1

BookingRefrenceID Your system booking reference number

2 CompanyAccountCode An unique Account Company code which is

generated during signup process.

3 pickUpLocationType This is a Location Type like Airport, Station, and

Address etc.

4 pickUpLocation This is a complete address against selected pickup

location Type i.e. Airport - Heathrow Terminal 1

5 DropoffLocationType This is a Location Type like Airport, Station, and

Address etc.

6 DropoffLocation This is a complete address against selected Drop off

location Type i.e. Airport - Heathrow Terminal 1

7 PassangerName This is a passanger Name i.e. Mr. ABC

8 PassangerPhoneNumber It will contain only single phone number i.e. +44 182

111 111

9 PassangermobileNumber It will contain single mobile number +44 0752 111

11

Page 8: Eurosoft Tech Web Servicesshadowcars.co.uk/APIDocument/EuroSofttechAPI... · location Type i.e. Airport - Heathrow Terminal 1 5 DropoffLocationType This is a Location Type like Airport,

8

10 NoOfLuggages It contain passenger luggage’s counter as Integer

value, for example 1, 2, 3…

11 NoOfHandLuggages It contain passenger hand luggage’s counter as

Integer value, for example 1, 2, 3…

12 NoOfPassanger It contains no of passenger counter as Integer value,

for example 1, 2, 3…

13 SpecialRequiretment It contain string value

14 PickupDate

It is a traveling date. format “dd MM yy”

i.e.15 March 2016

15 PickupTimeHr

It is a traveling Time (in Hour) like 01,02…..23

16 PickupTimeMinute

It is a traveling Time (in minute) like 00,02…..59

17 ReturnDate

It is a return journey date in format “dd/MM/yyyy”

I.e.15 March 2016

18 ReturnTimeHr

It is a return journey time (in hour) like 01,02…..23

19 ReturnTimeMinute

It is a return journey time (in minute) like 00,

02…..59

20 JourneyTypeID

It will contain an ID of type Integer

If;

One way JourneyTypeID = 1

Return JourneyTypeID = 2

Wait And Return JourneyTypeID = 3

21 vehicleType It is a type of vehicle passenger wants to travel on;

Page 9: Eurosoft Tech Web Servicesshadowcars.co.uk/APIDocument/EuroSofttechAPI... · location Type i.e. Airport - Heathrow Terminal 1 5 DropoffLocationType This is a Location Type like Airport,

9

SALOON CAR

ESTATE CAR

5 Seater

6 Seater

7 SEATER

8 SEATER

22 Fare (decimal)

It will contain total journey Fare. For example, total

Fare 50.00 (followed by currency sign)

Further explanation against above mentioned Parameters.

3. If PickupLocationType Airport then

Further parameters will expose

1-PickupComingFrom

2-PickupFlightNumber

4. IF PickupLocationType Station/Address then

Further parameters will expose

PickupDoorNumber

5. IF DropoffLocationType Address then

Further parameters will expose

Page 10: Eurosoft Tech Web Servicesshadowcars.co.uk/APIDocument/EuroSofttechAPI... · location Type i.e. Airport - Heathrow Terminal 1 5 DropoffLocationType This is a Location Type like Airport,

10

DropoffDoorNumber

DropoffStreet

Response :

OK Status Code

1. Check Valid or Invalid Data.

If any ‘Invalid data error’ occurred then service will give response in following format

Invalid-[ParameterName]

For instance:

i. Invalid-CompanyAccountCode (If company Accountcode does not exist or may have

invalid)

ii. Invalid-BookingID (If it contain empty or Null)

API Service Calling URL for GetQuote

http://shadowcars.co.uk/api/jobs/GetQuote

Method Name GetQuote(string jsonString)

Description: It will contain all required input parameters in JSON Array format.

Request JSON Format :

Page 11: Eurosoft Tech Web Servicesshadowcars.co.uk/APIDocument/EuroSofttechAPI... · location Type i.e. Airport - Heathrow Terminal 1 5 DropoffLocationType This is a Location Type like Airport,

11

{

"CompanyAccountCode": "12xxx-test",

"pickUpLocationType": "AirPort",

"pickUpLocation": "Heathrow Terminal 1 TW6 1JS",

"DropoffLocationType": "Address",

"DropoffLocation": "South Hill Avenue HA2 0DU",

}

Following is a list of parameters which will be required in JSON Array List Object

2 CompanyAccountCode An unique Account Company code which is

generated during signup process.

3 pickUpLocationType This is a Location Type like Airport, Station, and

Address etc.

4 pickUpLocation This is a complete address against selected pickup

location Type i.e. Airport - Heathrow Terminal 1

5 DropoffLocationType This is a Location Type like Airport, Station, and

Address etc.

6 DropoffLocation This is a complete address against selected Drop off

location Type i.e. Airport - Heathrow Terminal 1

14 PickupDate

It is a traveling date. format “dd MM yy”

i.e.15 March 2016

15 PickupTimeHr

It is a traveling Time (in Hour) like 01,02…..23

16 PickupTimeMinute

It is a traveling Time (in minute) like 00,02…..59

Response JSON Array :

Page 12: Eurosoft Tech Web Servicesshadowcars.co.uk/APIDocument/EuroSofttechAPI... · location Type i.e. Airport - Heathrow Terminal 1 5 DropoffLocationType This is a Location Type like Airport,

12

"[{ "VehicleType ": "MPV ", "NoOfPassenger ":0, "NoOfLuggages ":0, "NoOfHandLuggages ":0, "Price

":42.0},{ "VehicleType ": "Saloon ", "NoOfPassenger ":0, "NoOfLuggages ":0, "NoOfHandLuggages ":0,

"Price ":32.0},{ "VehicleType ": "Saloon ", "NoOfPassenger ":2, "NoOfLuggages ":7, "NoOfHandLuggages

":5, "Price ":42.0},{ "VehicleType ": "mpv plus ", "NoOfPassenger ":0, "NoOfLuggages ":0,

"NoOfHandLuggages ":0, "Price ":42.0},{ "VehicleType ": "8 Seater ", "NoOfPassenger ":0,

"NoOfLuggages ":0, "NoOfHandLuggages ":0, "Price ":42.0},{ "VehicleType ": "6 SEATER ",

"NoOfPassenger ":6, "NoOfLuggages ":2, "NoOfHandLuggages ":0, "Price ":82.0}]"

API Service Calling URL for CancelBooking

http://shadowcars.co.uk/api/jobs/CancelBooking

Method Name CancelBooking(string jsonString)

Description: It will contain all required input parameters in JSON Array format.

Request JSON Format :

{

"CancelReason": "Reason for cancel job",

"CompanyAccountCode": "12xxx-test",

"BookingRefrenceID": "Your bookingid for a trip",

}

Following is a list of parameters which will be required in JSON Array List Object

2 CompanyAccountCode An unique Account Company code which is

generated during signup process.

3 BookingRefrenceID Your system booking reference number

4 CancelReason Reason for Cancel a Job (Optional)

Response :OK Status Code

Page 13: Eurosoft Tech Web Servicesshadowcars.co.uk/APIDocument/EuroSofttechAPI... · location Type i.e. Airport - Heathrow Terminal 1 5 DropoffLocationType This is a Location Type like Airport,

13

API Service Calling URL for AvailableCars

http://shadowcars.co.uk/api/jobs/AvailableCars

Method Name AvailableCars(string jsonString)

Description: It will contain all required input parameters in JSON Array format.

Request JSON Format :

{

"CompanyAccountCode": "12xxx-test"

}

Following is a list of parameters which will be required in JSON Array List Object

2 CompanyAccountCode An unique Account Company code which is

generated during signup process.

Response JSON Arrray:

"[{ "vehicle_type ": "Saloon ", "vehicle_plate ": "22A-343 ", "latitude ":51.8860349751807, "longitude

":0.939971763816278, "eta_minutes ":0, "make ": "TOYOTA ", "model ": "AVENSIS ", "color ": "Silver ",

"status ": "Available ", "driver_no ": "01 ", "driver_phone ": "07712555888 ", "driver_name ": "David

Jackson ", "mph ":50},{ "vehicle_type ": "Mpv ", "vehicle_plate ": "23A-343 ", "latitude

":51.8963155599982, "longitude ":0.895813984175706, "eta_minutes ":null, "make ": "TOYOTA ",

"model ": "AVENSIS ", "color ": "Silver ", "status ": "Available ", "driver_no ": "02 ", "driver_phone ":

"07789555888 ", "driver_name ": "Henry Jackson ", "mph ":10}]"

Page 14: Eurosoft Tech Web Servicesshadowcars.co.uk/APIDocument/EuroSofttechAPI... · location Type i.e. Airport - Heathrow Terminal 1 5 DropoffLocationType This is a Location Type like Airport,

14

API Service Calling URL for GetFinalPrice

http://shadowcars.co.uk/api/jobs/GetFinalPrice

Method Name GetFinalPrice(string jsonString)

Description: It will contain all required input parameters in JSON Array format.

Request JSON Format :

{

"CompanyAccountCode": "12xxx-test",

"BookingRefrenceID": "Your bookingid for a trip",

}

Following is a list of parameters which will be required in JSON Array List Object

2 CompanyAccountCode An unique Account Company code which is

generated during signup process.

3 BookingRefrenceID Your system booking reference number

Response JSON Arrray

[{"BookingRefrenceID": "Your booking id for a trip","CompanyAccountCode": "12xxx-

test","JourneyTypeID": 1,"pickUpLocationType": "AirPort","pickUpLocation": "Heathrow Terminal 1 TW6

1JS","DropoffLocationType": "Address","DropoffLocation": "South Hill Avenue HA2 0DU","PickupDate":

"16/04/2016","PickupTimeHr": "16","PickupTimeMinute": "19","PassangerName": "David

Jackson","PassangerEmail": "[email protected]","PassangermobileNumber":

"07411257745","PassangerPhoneNumber": "020822244896","NoOfPassanger": 24,"NoOfLuggages":

1,"NoOfHandLuggages": 4,"SpecialRequiretment": "XXXX","vehicleType": "Saloon","Fare":

20.00,"PickupFlightNumber": "XXX","PickupComingFrom": "Canada","FromStreet":

"XXX","DropoffDoorNumber": "XXX","DropoffStreet": "XXX","PickupDoorNumber":

"XXX","ReturnFlightNumber": "XXX","ReturnDate": "05/10/2016","ReturnTimeHr":

"12","ReturnTimeMinute": "00"}]