POST Bus/Booking

request API for bus booking

Request Information

URI Parameters

None.

Body Parameters

BusBookingRequest
NameDescriptionTypeAdditional information
bus

po bus name

string

None.

originTerminal

string

None.

destinationTerminal

string

None.

choosedSeat

list of choosed seat

Collection of string

None.

directCode

route code

string

None.

subClassFare

string

None.

locationID

location code

string

None.

departDate

date

None.

paxAdult

integer

None.

paxChild

integer

None.

paxInfant

integer

None.

passengers

list of bus passenger

Collection of BusPassengerRequestModel

None.

departID

departure code

integer

None.

arrivalID

integer

None.

userID

user API

string

None.

accessToken

access code getting from login

string

None.

Request Formats

application/json, text/json

Sample:
{
  "bus": "sample string 1",
  "originTerminal": "sample string 2",
  "destinationTerminal": "sample string 3",
  "choosedSeat": [
    "sample string 1",
    "sample string 2"
  ],
  "directCode": "sample string 4",
  "subClassFare": "sample string 5",
  "locationID": "sample string 6",
  "departDate": "2021-11-26T21:25:33.2021024+07:00",
  "paxAdult": 8,
  "paxChild": 9,
  "paxInfant": 10,
  "passengers": [
    {
      "title": "sample string 1",
      "firstName": "sample string 2",
      "lastName": "sample string 3",
      "identity": "sample string 4",
      "phone": "sample string 5",
      "identityType": "sample string 6",
      "address": "sample string 7",
      "email": "sample string 8",
      "birthDate": "2021-11-26T21:25:33.2177028+07:00",
      "parent": 1,
      "paxType": 0
    },
    {
      "title": "sample string 1",
      "firstName": "sample string 2",
      "lastName": "sample string 3",
      "identity": "sample string 4",
      "phone": "sample string 5",
      "identityType": "sample string 6",
      "address": "sample string 7",
      "email": "sample string 8",
      "birthDate": "2021-11-26T21:25:33.2177028+07:00",
      "parent": 1,
      "paxType": 0
    }
  ],
  "departID": 11,
  "arrivalID": 12,
  "userID": "sample string 13",
  "accessToken": "sample string 14"
}

application/xml, text/xml

Sample:
<BusBookingRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Cebes.DI.H2H.Api.Models">
  <accessToken>sample string 14</accessToken>
  <userID>sample string 13</userID>
  <arrivalID>12</arrivalID>
  <bus>sample string 1</bus>
  <choosedSeat xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </choosedSeat>
  <departDate>2021-11-26T21:25:33.2021024+07:00</departDate>
  <departID>11</departID>
  <destinationTerminal>sample string 3</destinationTerminal>
  <directCode>sample string 4</directCode>
  <locationID>sample string 6</locationID>
  <originTerminal>sample string 2</originTerminal>
  <passengers>
    <BusPassengerRequestModel>
      <address>sample string 7</address>
      <birthDate>2021-11-26T21:25:33.2177028+07:00</birthDate>
      <email>sample string 8</email>
      <firstName>sample string 2</firstName>
      <identity>sample string 4</identity>
      <identityType>sample string 6</identityType>
      <lastName>sample string 3</lastName>
      <parent>1</parent>
      <paxType>Adult</paxType>
      <phone>sample string 5</phone>
      <title>sample string 1</title>
    </BusPassengerRequestModel>
    <BusPassengerRequestModel>
      <address>sample string 7</address>
      <birthDate>2021-11-26T21:25:33.2177028+07:00</birthDate>
      <email>sample string 8</email>
      <firstName>sample string 2</firstName>
      <identity>sample string 4</identity>
      <identityType>sample string 6</identityType>
      <lastName>sample string 3</lastName>
      <parent>1</parent>
      <paxType>Adult</paxType>
      <phone>sample string 5</phone>
      <title>sample string 1</title>
    </BusPassengerRequestModel>
  </passengers>
  <paxAdult>8</paxAdult>
  <paxChild>9</paxChild>
  <paxInfant>10</paxInfant>
  <subClassFare>sample string 5</subClassFare>
</BusBookingRequest>

Response Information

Resource Description

BusBookingResponse
NameDescriptionTypeAdditional information
bus

po bus name

string

None.

operatorName

string

None.

originTerminal

string

None.

destinationTerminal

string

None.

choosedSeat

list of choosed seat

Collection of string

None.

bookingCode

string

None.

directCode

route code

string

None.

locationID

location code

string

None.

departPlace

depart from

string

None.

departTime

depart time detail

date

None.

bookingTime

booking time

date

None.

paxAdult

integer

None.

paxChild

integer

None.

paxInfant

integer

None.

salesPrice

total amount must be paid

decimal number

None.

memberDiscount

member discount

decimal number

None.

ticketPrice

decimal number

None.

issuedTimeLimit

time limit to issued

date

None.

passengers

list of passenger

Collection of BusPassengerModel

None.

respTime

describe time in sending response

date

None.

userID

user ID to access API

string

None.

accessToken

access token that needed to access API

string

None.

status

SUCCESS or FAILED

string

None.

respMessage

detail message of response status

string

None.

Response Formats

application/json, text/json

Sample:
{
  "bus": "sample string 1",
  "operatorName": "sample string 2",
  "originTerminal": "sample string 3",
  "destinationTerminal": "sample string 4",
  "choosedSeat": [
    "sample string 1",
    "sample string 2"
  ],
  "bookingCode": "sample string 5",
  "directCode": "sample string 6",
  "locationID": "sample string 7",
  "departPlace": "sample string 8",
  "departTime": "2021-11-26T21:25:33.2333032+07:00",
  "bookingTime": "2021-11-26T21:25:33.2333032+07:00",
  "paxAdult": 11,
  "paxChild": 12,
  "paxInfant": 13,
  "salesPrice": 14.0,
  "memberDiscount": 15.0,
  "ticketPrice": 16.0,
  "issuedTimeLimit": "2021-11-26T21:25:33.2333032+07:00",
  "passengers": [
    {
      "title": "sample string 1",
      "firstName": "sample string 2",
      "lastName": "sample string 3",
      "identity": "sample string 4",
      "phone": "sample string 5",
      "identityType": "sample string 6",
      "address": "sample string 7",
      "email": "sample string 8",
      "birthDate": "2021-11-26T21:25:33.2333032+07:00",
      "parent": 1,
      "paxType": "sample string 10",
      "paxTicketNo": "sample string 11"
    },
    {
      "title": "sample string 1",
      "firstName": "sample string 2",
      "lastName": "sample string 3",
      "identity": "sample string 4",
      "phone": "sample string 5",
      "identityType": "sample string 6",
      "address": "sample string 7",
      "email": "sample string 8",
      "birthDate": "2021-11-26T21:25:33.2333032+07:00",
      "parent": 1,
      "paxType": "sample string 10",
      "paxTicketNo": "sample string 11"
    }
  ],
  "respTime": "2021-11-26T21:25:33.2333032+07:00",
  "userID": "sample string 19",
  "accessToken": "sample string 20",
  "status": "sample string 21",
  "respMessage": "sample string 22"
}

application/xml, text/xml

Sample:
<BusBookingResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Cebes.DI.H2H.Api.Models">
  <accessToken>sample string 20</accessToken>
  <respMessage>sample string 22</respMessage>
  <respTime>2021-11-26T21:25:33.2333032+07:00</respTime>
  <status>sample string 21</status>
  <userID>sample string 19</userID>
  <bookingCode>sample string 5</bookingCode>
  <bookingTime>2021-11-26T21:25:33.2333032+07:00</bookingTime>
  <bus>sample string 1</bus>
  <choosedSeat xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </choosedSeat>
  <departPlace>sample string 8</departPlace>
  <departTime>2021-11-26T21:25:33.2333032+07:00</departTime>
  <destinationTerminal>sample string 4</destinationTerminal>
  <directCode>sample string 6</directCode>
  <issuedTimeLimit>2021-11-26T21:25:33.2333032+07:00</issuedTimeLimit>
  <locationID>sample string 7</locationID>
  <memberDiscount>15</memberDiscount>
  <operatorName>sample string 2</operatorName>
  <originTerminal>sample string 3</originTerminal>
  <passengers>
    <BusPassengerModel>
      <address>sample string 7</address>
      <birthDate>2021-11-26T21:25:33.2333032+07:00</birthDate>
      <email>sample string 8</email>
      <firstName>sample string 2</firstName>
      <identity>sample string 4</identity>
      <identityType>sample string 6</identityType>
      <lastName>sample string 3</lastName>
      <parent>1</parent>
      <paxTicketNo>sample string 11</paxTicketNo>
      <paxType>sample string 10</paxType>
      <phone>sample string 5</phone>
      <title>sample string 1</title>
    </BusPassengerModel>
    <BusPassengerModel>
      <address>sample string 7</address>
      <birthDate>2021-11-26T21:25:33.2333032+07:00</birthDate>
      <email>sample string 8</email>
      <firstName>sample string 2</firstName>
      <identity>sample string 4</identity>
      <identityType>sample string 6</identityType>
      <lastName>sample string 3</lastName>
      <parent>1</parent>
      <paxTicketNo>sample string 11</paxTicketNo>
      <paxType>sample string 10</paxType>
      <phone>sample string 5</phone>
      <title>sample string 1</title>
    </BusPassengerModel>
  </passengers>
  <paxAdult>11</paxAdult>
  <paxChild>12</paxChild>
  <paxInfant>13</paxInfant>
  <salesPrice>14</salesPrice>
  <ticketPrice>16</ticketPrice>
</BusBookingResponse>