PT.Api

<back to all web services

QuerySettings

The following routes are available for this service:
POST/api/settings
QuerySettings Parameters:
NameParameterData TypeRequiredDescription
ClientAppbodystringNo
BaseRequest Parameters:
NameParameterData TypeRequiredDescription
VersionformintNoVersion. Ex: 1,2,3,...
QuerySettingsResponse Parameters:
NameParameterData TypeRequiredDescription
DataformSettingsNo
BaseResponse Parameters:
NameParameterData TypeRequiredDescription
StatusformintNoResponse status. Ex: 1 - Success; 0 - Error
MessageformstringNoResponse message
Settings Parameters:
NameParameterData TypeRequiredDescription
VersionformintNo
MaxBookSeatformintNo
ValidStartHourOffsetformintNo
ValidStartDateOffsetformintNo
ValidStartDateformDateTimeNo
ValidEndDateformDateTimeNo
RouteCodeformList<RouteCode>No
BanksformList<tbl_Bank>No
MinChargeMoneyformintNo
FavouriteRouteformList<tbl_Route>No
PaymentTypesformList<tbl_PaymentType>No
GatewayformList<GatewaySetting>No
MetaformstringNo
SpecialDeparturesformList<SpecialDeparture>No
RouteCode Parameters:
NameParameterData TypeRequiredDescription
OriginCodeformstringNo
OriginNameformstringNo
DestCodeformstringNo
DestNameformstringNo
tbl_Bank Parameters:
NameParameterData TypeRequiredDescription
CodeformstringNo
NameformstringNo
BankTypeformstringNo
tbl_Route Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
TypeformintNo
CodeformstringNo
NameformstringNo
OriginCodeformstringNo
OriginNameformstringNo
DestCodeformstringNo
DestNameformstringNo
DistanceformintNo
DurationformintNo
KindformstringNo
TotalScheduleformintNo
tbl_PaymentType Parameters:
NameParameterData TypeRequiredDescription
CodeformstringNo
NameformstringNo
DescriptionformstringNo
PriorityformintNo
GatewaySetting Parameters:
NameParameterData TypeRequiredDescription
TypeformintNo
GatewayCodeformstringNo
GatewayNameformstringNo
OrderNumformintNo
PaymentTypeCodeformstringNo
PaymentTypeNameformstringNo
FromTimeformstringNo
ToTimeformstringNo
CodeformstringNo
NameformstringNo
CssClassformstringNo
SpecialDeparture Parameters:
NameParameterData TypeRequiredDescription
RouteIdformintNo
NameformstringNo
FromCodeformstringNo
ToCodeformstringNo
ValidStartDateformDateTimeNo
ValidEndDateformDateTimeNo
MaxBookSeatformintNo

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /json/reply/QuerySettings HTTP/1.1 
Host: api2.futabus.vn 
Content-Type: application/json
Content-Length: length

{"ClientApp":"String","Version":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Data":{"Version":0,"MaxBookSeat":0,"ValidStartHourOffset":0,"ValidStartDateOffset":0,"RouteCode":[{"OriginCode":"String","OriginName":"String","DestCode":"String","DestName":"String"}],"Banks":[{"Code":"String","Name":"String","BankType":"String"}],"MinChargeMoney":0,"FavouriteRoute":[{"Id":0,"Type":0,"Code":"String","Name":"String","OriginCode":"String","OriginName":"String","DestCode":"String","DestName":"String","Distance":0,"Duration":0,"Kind":"String","TotalSchedule":0}],"PaymentTypes":[{"Code":"String","Name":"String","Description":"String","Priority":0}],"Gateway":[{"Type":0,"GatewayCode":"String","GatewayName":"String","OrderNum":0,"PaymentTypeCode":"String","PaymentTypeName":"String","FromTime":"String","ToTime":"String","Code":"String","Name":"String","CssClass":"String"}],"Meta":"String","SpecialDepartures":[{"RouteId":0,"Name":"String","FromCode":"String","ToCode":"String","MaxBookSeat":0}]},"Status":0,"Message":"String"}