Vous êtes sur la page 1sur 13

Buses&CabsAPI

(Lastupdatedon30thSep2015)


SMSdaakIndiaLimitedprivilegedandconfidentialcontent,donotdistribute.

Page1of13

TableofContents

BookingService
Sources[GET/POST]
Destinations[GET/POST]
AvailableTrips[GET/POST]
TripDetails[GET/POST]
BoardingPoints[GET/POST]
BlockTicket[POST]
ConfirmTicket[GET/POST]
CancellationService
CancellationData[GET/POST]
CancelTicket[POST]
TicketInformationService
PrintTicket[GET/POST]
BookingStatus[GET/POST]
FAQs


SMSdaakIndiaLimitedprivilegedandconfidentialcontent,donotdistribute.

Page2of13

1. BookingService

1.1. Sources[GET/POST]

https://www.instantpay.in/ws/bus/sources

APItogetalistofallthecitiesalongwiththeircityID.

RequestParameters

Parameter Mandatory Description

token Yes APIaccesstoken

format Yes xmlorjson

SampleJSONResponse

{"statuscode
":
"TXN","
status
":
{
"
cities
":
[{
"
id
":
"1995"
,"
name
":
"Banahatti"
}
,
{
"
id
":
"5074","
name
":
"Kolhapur(Maharashtra)" }
,
{
"
id
":
"2211"
,"
name
":
"Kundapura"}]}}

1.2. Destinations[GET/POST]

https://www.instantpay.in/ws/bus/destinations

APItogetalistofallthesourcedestinationpair.

RequestParameters

Parameter Mandatory Description

token Yes APIaccesstoken

source Yes CityIDofSourceCity

format Yes xmlorjson

SampleJSONResponse

{"statuscode
":
"TXN","
status
":
{
"
cities
":
[{
"
id
":
"1995"
,"
name
":
"Banahatti"
}
,
{
"
id
":
"5074","
name
":
"Kolhapur(Maharashtra)" }
,
{
"
id
":
"2211"
,"
name
":
"Kundapura"}]}}

SMSdaakIndiaLimitedprivilegedandconfidentialcontent,donotdistribute.

Page3of13

1.3. AvailableTrips[GET/POST]

https://www.instantpay.in/ws/bus/availabletrips

APItogetthelistofbusservicesfromthespecifiedsourcecitytothedestinationcityonaspecifieddate.

RequestParameters

Parameter Mandatory Description

token Yes APIaccesstoken

source Yes CityIDofSourceCity

destination Yes CityIdofDestinationCity

doj Yes TravelDate(20120716)

format Yes xmlorjson

SampleJSONResponse

{
"
statuscode
":
"TXN"
,"
status
":
{
"
availableTrips
":
[{
"
AC
":
"false"
,"
arrivalTime
":
"1590"
,"
availableSeats
":
"26"
,"
boardingTimes
":
[{
"
bpId
":
"827324"
,"
bpName
":
"Jangid
vishwakarma tour "
,"
location
":
"Jangid vishwakarma tour "
,"
prime
":
"false"
,"
time
":
"1290"
}
,
{
"
bpId
":
"827325"
,"
bpName
": "
Near mahipalpur shiv murti"
,"
location
":
"Near
mahipalpur shiv murti"
,"
prime
":
"false"
,"
time
":
"1360"
}
,
{
"
bpId
":
"827326"
,"
bpName
":
"Iffco
chowk, gurgaon"
,"
location
":
"Iffco chowk, gurgaon"
,"
prime
":
"false"
,"
time
":
"1380"
}]
,"
busType
":
"Non A/C Seater/Sleeper (2+1)"
,"
busTypeId
":
"1110"
,"
cancellationPolicy
":
"0:4:85:0;4:8:75:0;8:12:65:0;12:24:50:0;24:-1:10:0"
,"
departureTime
":
"1290"
,"
doj
":
"2015-09-30T00:00:00+05:30"
,"
droppingTimes
":
{
"
bpId
":
"1022071"
,"
bpName
":
"200 feet
bypass"
,"
location
":
"200 feet bypass"
,"
prime
":
"false"
,"
time
":
"1590"
}
,"
fareDetails
":
[{
"
baseFare
":
"550.00"
,"
markupFareAbsolute
":
"0.00"
,"
markupFarePercentage
":
"0"
,"
operatorServiceChargeAbsolute
":
"0.00"
,"
operatorServiceChargePercentage
":
"0"
,"
serviceTaxAbsolute
":
"0.00"
,"
serviceTaxPercentage
":
"0"
,"
totalFare
":
"550.00"
}
,
{
"
baseFare
":
"350.00"
,"
markupFareAbsolute
":
"0.00"
,"
markupFarePercentage
":
"0"
,"
operatorServiceChargeAbsolute
":
"0.00"
,"
operatorServiceChargePercentage
":
"0"
,"
serviceTaxAbsolute
":
"0.00"
,"
serviceTaxPercentage
":
"0"
,"
totalFare
":
"350.00"
}]
,"
fares
":
[
"550.00"
,
"350.00"
]
,"
id
":
"100008417330446278"
,"
idProofRequired
":


SMSdaakIndiaLimitedprivilegedandconfidentialcontent,donotdistribute.

Page4of13

"false"
,"
liveTrackingAvailable
":
"false"
,"
nonAC
":
"true"
,"
operator
":
"8890"
,"
partialCancellationAllowed
":
"false"
,"
rating
":
"1.6"
,"
routeId
":
"100008400000446278"
,"
seater
":
"true"
,"
sleeper
":
"true"
,"
tatkalTime
":
"0"
,"
travels
":
"Vishwakarma Tour and Travels"
,"
vehicleType
":
"BUS"
,"
zeroCancellationTime
":
"0"
,"
mTicketEnabled
":
"true"
}]}}

1.4. TripDetails[GET/POST]

https://www.instantpay.in/ws/bus/tripdetails

APItogetthedetailsofparticulartripID.

RequestParameters

Parameter Mandatory Description

token Yes APIaccesstoken

id Yes TripIdforselectedTrip

format Yes xmlorjson

SampleJSONResponse

{"
statuscode
":
"TXN"
,"
status
": {"
seats
": [{"
available
":
"false"
,"
baseFare
":
"450.00"
,"
column
":
"0"
,"
fare
":
"450.00"
,"
ladiesSeat
":
"false"
,"
length
":
"2"
,"
markupFareAbsolute
":
"0.00"
,"
markupFarePercentage
":
"0"
,"
name
":
"A"
,"
operatorServiceChargeAbsolute
":
"0.00"
,"
operatorServiceChargePercent
":
"0"
,"
row
":
"1"
,"
serviceTaxAbsolute
":
"0.00"
,"
serviceTaxPercentage
":
"0"
,"
width
":
"1"
,"
zIndex
":
"1"
},{"
available
":
"false"
,"
baseFare
":
"450.00"
,"
column
":
"0"
,"
fare
":
"450.00"
,"
ladiesSeat
":
"false"
,"
length
":
"2"
,"
markupFareAbsolute
":
"0.00"
,"
markupFarePercentage
":
"0"
,"
name
":
"B"
,"
operatorServiceChargeAbsolute
":
"0.00"
,"
operatorServiceChargePercent
":
"0"
,"
row
":
"0"
,"
serviceTaxAbsolute
":
"0.00"
,"
serviceTaxPercentage
":
"0"
,"
width
":
"1"
,"
zIndex
":
"1"
}]}}

1.5. BoardingPoints[GET/POST]

https://www.instantpay.in/ws/bus/boardingpoint


SMSdaakIndiaLimitedprivilegedandconfidentialcontent,donotdistribute.

Page5of13


APItogivethelistofboardingpointsandtheirrespectiveboardingtimes,landmark,completeaddressand
contactnumbersforthespecifiedroute.

RequestParameters

Parameter Mandatory Description

token Yes APIaccesstoken

id Yes BoardingPointIDforselectedTrip

tripId Yes tripIdforselectedTrip

format Yes xmlorjson

SampleJSONResponse

{"
statuscode
":
"TXN"
,"
status
": {"
address
":
""
,"
contactnumber
":
""
,"
id
":
779072
,"
landmark
":
"SARAI KALE KHAN"
,"
locationName
":
""
,"
name
":
"Sarai kale khan"
}}

1.6. BlockTicket[POST]

https://www.instantpay.in/ws/bus/blockticket

APItotentativelybook(block)aticket.Thistentativeticketwillbeblockedforaspecifiedtimeandcanbe
confirmed.

RequestParameters

Parameter Description

token APIaccesstoken

blockrequest BlockRequest

format xmlorjson


SMSdaakIndiaLimitedprivilegedandconfidentialcontent,donotdistribute.

Page6of13

SampleJSONblockrequestString
{"source":
"1492"
,"destination":
"1406"
,"availableTripId":
"100008417320611112"
,"boardingPoin
tId":
"1129224"
,"inventoryItems":[{"seatName":
"21"
,"ladiesSeat":
"false"
,"passenger":{"name":
"passenger_name_1"
,"title":
"MR"
,"gender":
"MALE"
,"age":
"23"
,"primary":
true
,"idType":
"PANCA
RD"
,"email":
"pass_name@domain_name.com"
,"idNumber":
"BEPS1111B"
,"address":
"passenger
_address"
,"mobile":
"xxxxxxxxxx"
},"fare":
"320.00"
},{"seatName":
"22"
,"ladiesSeat":
"true"
,"pas
senger":{"name":
"passenger_name_1"
,"title":
"MS"
,"gender":
"FEMALE"
,"age":
"23"
,"primary":
fal
se
,"idType":
""
,"email":
""
,"idNumber":
""
,"address":
""
,"mobile":
""
},"fare":
"320.00"
}]}

SampleJSONResponse

{"
statuscode
":
"TXN"
,"
status
":
"OD1234567891234"
}

1.7. ConfirmTicket[GET/POST]

https://www.instantpay.in/ws/bus/bookticket

APItoconfirmthepreviouslytentativebookedticket.

RequestParameters

Parameter Description

token APIaccesstoken

orderid instantPayOrderID
(EgOD1234567891234)

agentid DealerTransactionID

format xmlorjson

SampleJSONResponse

{"
statuscode":
"TXN"
,"
status
":
"SUCCESS"
,"orderid
":
"OD1234567891234"
,"
agentid
":
"TEST123" ,"
tin
":
"12345ABCD" }


SMSdaakIndiaLimitedprivilegedandconfidentialcontent,donotdistribute.

Page7of13

2. CancellationService

2.1. CancellationData[GET/POST]

https://www.instantpay.in/ws/bus/cancellationdata

APItogetthecancellationdetailsofabookedticket.

RequestParameters

Parameter Mandatory Description

token Yes APIaccesstoken

orderid Yes instantPayOrderID

format Yes xmlorjson

SampleJSONResponse
{
"
statuscode
":
"TXN","
status {
":"cancellable":
"true"
,"cancellationCharges"{"entry":{"key":"21","value":
"22.00"
}},fares:{"entry":{"key": "21"
,"value":"223.08"}},"freeCancellationTime":
"0"
,"partiallyCancella
ble":
"false"
,"tatkalTime":"0"
}}

2.2. CancelTicket[GET/POST]

https://www.instantpay.in/ws/bus/cancelticket

APItocancelapreviouslybookedconfirmedticket.

RequestParameters

Parameter Description


SMSdaakIndiaLimitedprivilegedandconfidentialcontent,donotdistribute.

Page8of13

token APIaccesstoken

orderid instantPayOrderID

seats CommaseparatedSeatNumberstobecancelled
(Eg41,A20,C10,R)

format xmlorjson

SampleJSONResponse

{"
statuscode
":
"TXN"
,"
status
":
{"cancellationCharge":
"25.03"
,"refundAmount":
"198"
,
"orderid":
"OD1234567891234" }
}


SMSdaakIndiaLimitedprivilegedandconfidentialcontent,donotdistribute.

Page9of13

3. TicketInformationService

3.1. PrintTicket[GET/POST]

https://www.instantpay.in/ws/bus/ticket

APItogetthedetailsofthebookedticket.


RequestParameters

Parameter Mandatory Description

token Yes APIaccesstoken

orderid Yes instantPayOrderID

format Yes xmlorjson

SampleJSONResponse

{"
statuscode ":
"TXN" ,"
status ":
{ "
busType ":
"Non A/C Seater (2+3)" ,"
cancellationPolicy ":
"0:1:25:0;1:2:15:0;2:24:10:0;24:-1:0:0" ,"
dateOfIssue ":
"2015-09-29T16:17:27+05:30" ,"
destinationCity ":
"Agra" ,"destinationCityId ":
"1322" ,"
doj":
"2015-10-09T00:00:00+05:30" ,"
inventoryId ":
"100011917420364985" ,"
inventoryItems ":
{"
fare":
"201.00" ,"
ladiesSeat ": "false","
operatorServiceCharge ":
"0.00" ,"
passenger ":
{"
address ":
""
,"age": "26","
email ":
"test@mail.com" ,"
gender ":
"MALE" ,"
idNumber ":
""
,"
idType ":
"NONE" ,"
mobile ": "XXXXXXXXXX
"
,"name ":
"Rahul" ,"
primary ": "true","
title":
"Mr"},"
seatName ":
"29" ,"
serviceTax ":
"0.00"},"
partialCancellationAllowed ":
"false","
pickUpContactNo ":
"","pickUpLocationAddress ":
"","
pickupLocation ":
""
,"
pickupLocationId ": "779072" ,"pickupLocationLandmark ": "SARAI KALE KHAN" ,"
pickupTime ":
"90","
pnr ":
"XAGX3109291500001/" ,"
primeDepartureTime ":
"90","
serviceCharge ":
"0.00" ,"
sourceCity ": "Delhi" ,"
sourceCityId ":
"1492" ,"
status ":
"BOOKED" ,"
tin":
"ZFB74SX" ,"
travels": "Uttar Pradesh State Road Transport Corporation(UPSRTC)" }}

3.2. BookingStatus[GET/POST]

https://www.instantpay.in/ws/bus/checkticket

ItreturnstheticketobjectifticketwasconfirmedotherwisegiveserrorinstandardAPIformat.


SMSdaakIndiaLimitedprivilegedandconfidentialcontent,donotdistribute.

Page10of13

RequestParameters

Parameter Description

token APIaccesstoken

orderid instantPayOrderID

format xmlorjson

SampleJSONResponse

{"
statuscode ": "TXN" ,"
status ": {"busType ":
"Non A/C Seater/Sleeper
(2+1)" ,"
cancellationCharges ": "30.00" ,"
cancellationPolicy ":
"0:24:100:0;24:-1:10:0" ,"dateOfCancellation ":
"2015-10-16T18:36:23+05:30" ,"
dateOfIssue ":
"2015-10-16T18:14:01+05:30" ,"
destinationCity ":
"Jaipur"
,"destinationCityId ": "1406" ,"
doj
":
"2015-10-28T00:00:00+05:30" ,"
inventoryId ": "100008417610494451" ,"
inventoryItems ":
{"fare": "304.20" ,"
ladiesSeat ": "false","
operatorServiceCharge ":
"4.20" ,"passenger ":
{"address ":
"","age ": "25" ,"email ":
"daam@gmail.com" ,"
gender ": "MALE" ,"
idNumber ":
"","
idType ":
"NONE" ,"mobile ": " 777758059" ,"
name ":
"Iahi","
primary ": "true" ,"title
":
"Mr" },"seatName ":
"4" ,"
serviceTax ":
"0.00" },"
partialCancellationAllowed ":
"false" ,"pickUpContactNo ": "011-4we96332 09871226191" ,"
pickUpLocationAddress ":
"FAIZ
ROAD,KAROL BAG, " ,"
pickupLocation ":
"FAIZ ROAD,KAROL BAG, " ,"
pickupLocationId ":
"1013850" ,"
pickupLocationLandmark ":
"KAROL BAG" ,"
pickupTime ":
"1215" ,"
pnr ":
"TS-RB20607178ICG/138827/1115 DEL-SMR" ,"
primeDepartureTime ": "
1170" ,"refundAmount ":
"270.00" ,"
serviceCharge ": "0.00" ,"
sourceCity ": "Delhi"
,"
sourceCityId ":
"1492" ,"status":
"CANCELLED" ,"tin":
"ENK55FS" ,"
travels ":
"Dashmesh Travels (P) Ltd" }}


SMSdaakIndiaLimitedprivilegedandconfidentialcontent,donotdistribute.

Page11of13

4. FAQs

(Q)Howtoconvertthethebelowtimeformatstoexacttimeformatlike10:15A.M,11:25P.Metc?

[arrivalTime]=>510

[departureTime]=>1140

(A)Timeformatisexplainedinminutes.WeareprovidingtimeinMinutesforalltheBusesin'AvailableTrips'
fromthestartoftheday.Minutesshouldbedividedby60togetthetimeformats.Considerthebelowtwo
examples

Thetimestartsfrom00:00am.

forexampleifthedroppingtimeis1095

1095/60=18andremainderis15

JourneyDay=18/24=0

Hour=18%24=18,Minutes=15

=>18hrs15min

=>06:15pm(samedayasdoj)

forexampleifthedroppingtimeis1600

1600/60=26andremainderis40

JourneyDay=26/24=1

Hour=26%24=2,Minutes=40

=>02:40amofthenextday(nextdayfromdoj)

(Q)IsthereanyAPItocallseatlayout?

(A)TheseatlayoutneedstobegeneratedusingtheseatarraymapreturnedfromtheAPI/tripdetails.

(Q)WhatisthesignificanceofMticketflagwhichwearesendinginavailabletrips?


SMSdaakIndiaLimitedprivilegedandconfidentialcontent,donotdistribute.

Page12of13

(A)TheMticketflaghastobeimplementedatpartner'send.IfthisflagisTRUEforaparticularoperatorthen
Mticket(SMSticket)willbeconsideredvalidandmobileticketcanbeproducedatthetimeofjourneyforthat
particularoperator.

(Q)Howtointerpretthecancellationpolicystring?

(A)Theentirestringisacommaseparatedlistofhavingfourpartsseparatedbysemicolon."FromTime:To
Time:CancellationRate:percentageorabsolute."e.g."0:12:100:012:1:10:0"

0:12:100:0meansifthecustomercancelstheticketwithin12hoursofdeparturetimethencancellationamount
willbe100%.(e.g.departuretime:8:00pmandifwecancelanytimebetween8:00amto8:00pmthen
cancellationamountwillbe100%)

12:1:10:0meansifthecustomercanceltheticketanytimebefore12hoursofdeparturetimethencancellation
amountwillbe10%.(e.g.departuretime:8:00pmandifwecancelanytimebefore8:00amthencancellation
amountis10%.):0representsPercentage.

(Q)CanIcanceltheprimarypassenger?
(A)Ifpartialcancellationisnotallowedfromoperator'sendyouarenotauthorizedtocanceltheseatfora
particularpassenger.Butifthepartialcancellationisallowedfromoperator'sendtheniftheprimarypassengeris
cancelledthenwholeticketgetscancelledwhichisnotrecommended.Thishastobeimplementedfrom
partner'sendthatwheneverprimarypassengerisbeingcancelledthentheyhavetothrowthemessagethatthe
"primarypassengercannotbecancelled".

(Q)Howcanicancelticket?
(A)Makesurethatinthebelowrequesteachseatnameshouldbeindoublequotesseparatedbycommaas
shownbelow,
{"orderid":"OD1234567891234" ,"seats":"12,11,10,9" }


SMSdaakIndiaLimitedprivilegedandconfidentialcontent,donotdistribute.

Page13of13

Vous aimerez peut-être aussi