PT.Api

<back to all web services

QuerySchedule

The following routes are available for this service:
POST/api/queryschedule
QuerySchedule Parameters:
NameParameterData TypeRequiredDescription
OriginCodebodystringYesTPHCM
DestCodebodystringYesDALAT
DepartureDatebodystringYesdd-MM-yyyy
LocaleRequest Parameters:
NameParameterData TypeRequiredDescription
LocaleformstringNoLocale. Ex: vi-VN, en-US
BaseRequest Parameters:
NameParameterData TypeRequiredDescription
VersionformintNoVersion. Ex: 1,2,3,...
QueryScheduleResponse Parameters:
NameParameterData TypeRequiredDescription
DataformList<Schedule>No
BaseResponse Parameters:
NameParameterData TypeRequiredDescription
StatusformintNoResponse status. Ex: 1 - Success; 0 - Error
MessageformstringNoResponse message
Schedule Parameters:
NameParameterData TypeRequiredDescription
RouteIdformintNo
RouteNameformstringNo
DepartureTimeformstringNo
CarBookingIdformintNo
KindformstringNo
PriceformintNo
StribIdformintNo
RouteStopsformIList<tbl_Stop>No
tbl_Stop Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
RouteIdformintNo
WayIdformintNo
OfficeIdformintNo
TypeformintNo
CodeformstringNo
NameformstringNo
AddressformstringNo
PhoneformstringNo
FaxformstringNo
LatitudeformfloatNo
LongitudeformfloatNo
OrderNumberformintNo
DistanceformintNo
DurationformintNo
PassingformboolNo
ShuttleBeforeformintNo
NoteformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /jsv/reply/QuerySchedule HTTP/1.1 
Host: api2.futabus.vn 
Content-Type: text/jsv
Content-Length: length

{
	OriginCode: String,
	DestCode: String,
	DepartureDate: String,
	Locale: vi-VN,
	Version: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Data: 
	[
		{
			RouteId: 0,
			RouteName: String,
			DepartureTime: String,
			CarBookingId: 0,
			Kind: String,
			Price: 0,
			StribId: 0
		}
	],
	Status: 0,
	Message: String
}