POST Bus/Schedule

request API for bus schedule

Request Information

URI Parameters

None.

Body Parameters

BusScheduleRequest
NameDescriptionTypeAdditional information
bus

po bus name

string

None.

originTerminal

string

None.

destinationTerminal

string

None.

departDate

date

None.

paxAdult

integer

None.

paxChild

integer

None.

paxInfant

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",
  "departDate": "2025-01-23T00:02:18.1452577+07:00",
  "paxAdult": 5,
  "paxChild": 6,
  "paxInfant": 7,
  "userID": "sample string 8",
  "accessToken": "sample string 9"
}

application/xml, text/xml

Sample:
<BusScheduleRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Cebes.DI.H2H.Api.Models">
  <accessToken>sample string 9</accessToken>
  <userID>sample string 8</userID>
  <bus>sample string 1</bus>
  <departDate>2025-01-23T00:02:18.1452577+07:00</departDate>
  <destinationTerminal>sample string 3</destinationTerminal>
  <originTerminal>sample string 2</originTerminal>
  <paxAdult>5</paxAdult>
  <paxChild>6</paxChild>
  <paxInfant>7</paxInfant>
</BusScheduleRequest>

Response Information

Resource Description

BusScheduleResponse
NameDescriptionTypeAdditional information
bus

po bus name

string

None.

originTerminal

string

None.

destinationTerminal

string

None.

departDate

date

None.

paxAdult

integer

None.

paxChild

integer

None.

paxInfant

integer

None.

schedules

list bus depart schedule

Collection of BusScheduleModel

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",
  "originTerminal": "sample string 2",
  "destinationTerminal": "sample string 3",
  "departDate": "2025-01-23T00:02:18.1608722+07:00",
  "paxAdult": 5,
  "paxChild": 6,
  "paxInfant": 7,
  "schedules": [
    {
      "directCode": "sample string 1",
      "locationID": "sample string 2",
      "classes": [
        {
          "classFare": "sample string 1",
          "adultSeatPrice": 2.0,
          "childSeatPrice": 3.0,
          "infantSeatPrice": 4.0,
          "totalPrice": 5.0
        },
        {
          "classFare": "sample string 1",
          "adultSeatPrice": 2.0,
          "childSeatPrice": 3.0,
          "infantSeatPrice": 4.0,
          "totalPrice": 5.0
        }
      ],
      "capacity": "sample string 3",
      "operatorName": "sample string 4",
      "departLocation": [
        {
          "departID": 1,
          "departAddress": "sample string 2",
          "departTime": "2025-01-23T00:02:18.1608722+07:00"
        },
        {
          "departID": 1,
          "departAddress": "sample string 2",
          "departTime": "2025-01-23T00:02:18.1608722+07:00"
        }
      ],
      "arrivalLocation": [
        {
          "arrivalID": 1,
          "arrivalAddress": "sample string 2",
          "arrivalTime": "2025-01-23T00:02:18.1608722+07:00"
        },
        {
          "arrivalID": 1,
          "arrivalAddress": "sample string 2",
          "arrivalTime": "2025-01-23T00:02:18.1608722+07:00"
        }
      ],
      "busType": "sample string 5",
      "busInfo": "sample string 6",
      "isAllowChooseSeat": true
    },
    {
      "directCode": "sample string 1",
      "locationID": "sample string 2",
      "classes": [
        {
          "classFare": "sample string 1",
          "adultSeatPrice": 2.0,
          "childSeatPrice": 3.0,
          "infantSeatPrice": 4.0,
          "totalPrice": 5.0
        },
        {
          "classFare": "sample string 1",
          "adultSeatPrice": 2.0,
          "childSeatPrice": 3.0,
          "infantSeatPrice": 4.0,
          "totalPrice": 5.0
        }
      ],
      "capacity": "sample string 3",
      "operatorName": "sample string 4",
      "departLocation": [
        {
          "departID": 1,
          "departAddress": "sample string 2",
          "departTime": "2025-01-23T00:02:18.1608722+07:00"
        },
        {
          "departID": 1,
          "departAddress": "sample string 2",
          "departTime": "2025-01-23T00:02:18.1608722+07:00"
        }
      ],
      "arrivalLocation": [
        {
          "arrivalID": 1,
          "arrivalAddress": "sample string 2",
          "arrivalTime": "2025-01-23T00:02:18.1608722+07:00"
        },
        {
          "arrivalID": 1,
          "arrivalAddress": "sample string 2",
          "arrivalTime": "2025-01-23T00:02:18.1608722+07:00"
        }
      ],
      "busType": "sample string 5",
      "busInfo": "sample string 6",
      "isAllowChooseSeat": true
    }
  ],
  "respTime": "2025-01-23T00:02:18.1608722+07:00",
  "userID": "sample string 9",
  "accessToken": "sample string 10",
  "status": "sample string 11",
  "respMessage": "sample string 12"
}

application/xml, text/xml

Sample:
<BusScheduleResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Cebes.DI.H2H.Api.Models">
  <accessToken>sample string 10</accessToken>
  <respMessage>sample string 12</respMessage>
  <respTime>2025-01-23T00:02:18.1608722+07:00</respTime>
  <status>sample string 11</status>
  <userID>sample string 9</userID>
  <bus>sample string 1</bus>
  <departDate>2025-01-23T00:02:18.1608722+07:00</departDate>
  <destinationTerminal>sample string 3</destinationTerminal>
  <originTerminal>sample string 2</originTerminal>
  <paxAdult>5</paxAdult>
  <paxChild>6</paxChild>
  <paxInfant>7</paxInfant>
  <schedules>
    <BusScheduleModel>
      <arrivalLocation>
        <ArrivalLocationModel>
          <arrivalAddress>sample string 2</arrivalAddress>
          <arrivalID>1</arrivalID>
          <arrivalTime>2025-01-23T00:02:18.1608722+07:00</arrivalTime>
        </ArrivalLocationModel>
        <ArrivalLocationModel>
          <arrivalAddress>sample string 2</arrivalAddress>
          <arrivalID>1</arrivalID>
          <arrivalTime>2025-01-23T00:02:18.1608722+07:00</arrivalTime>
        </ArrivalLocationModel>
      </arrivalLocation>
      <busInfo>sample string 6</busInfo>
      <busType>sample string 5</busType>
      <capacity>sample string 3</capacity>
      <classes>
        <BusFareModel>
          <adultSeatPrice>2</adultSeatPrice>
          <childSeatPrice>3</childSeatPrice>
          <classFare>sample string 1</classFare>
          <infantSeatPrice>4</infantSeatPrice>
          <totalPrice>5</totalPrice>
        </BusFareModel>
        <BusFareModel>
          <adultSeatPrice>2</adultSeatPrice>
          <childSeatPrice>3</childSeatPrice>
          <classFare>sample string 1</classFare>
          <infantSeatPrice>4</infantSeatPrice>
          <totalPrice>5</totalPrice>
        </BusFareModel>
      </classes>
      <departLocation>
        <DepartLocationModel>
          <departAddress>sample string 2</departAddress>
          <departID>1</departID>
          <departTime>2025-01-23T00:02:18.1608722+07:00</departTime>
        </DepartLocationModel>
        <DepartLocationModel>
          <departAddress>sample string 2</departAddress>
          <departID>1</departID>
          <departTime>2025-01-23T00:02:18.1608722+07:00</departTime>
        </DepartLocationModel>
      </departLocation>
      <directCode>sample string 1</directCode>
      <isAllowChooseSeat>true</isAllowChooseSeat>
      <locationID>sample string 2</locationID>
      <operatorName>sample string 4</operatorName>
    </BusScheduleModel>
    <BusScheduleModel>
      <arrivalLocation>
        <ArrivalLocationModel>
          <arrivalAddress>sample string 2</arrivalAddress>
          <arrivalID>1</arrivalID>
          <arrivalTime>2025-01-23T00:02:18.1608722+07:00</arrivalTime>
        </ArrivalLocationModel>
        <ArrivalLocationModel>
          <arrivalAddress>sample string 2</arrivalAddress>
          <arrivalID>1</arrivalID>
          <arrivalTime>2025-01-23T00:02:18.1608722+07:00</arrivalTime>
        </ArrivalLocationModel>
      </arrivalLocation>
      <busInfo>sample string 6</busInfo>
      <busType>sample string 5</busType>
      <capacity>sample string 3</capacity>
      <classes>
        <BusFareModel>
          <adultSeatPrice>2</adultSeatPrice>
          <childSeatPrice>3</childSeatPrice>
          <classFare>sample string 1</classFare>
          <infantSeatPrice>4</infantSeatPrice>
          <totalPrice>5</totalPrice>
        </BusFareModel>
        <BusFareModel>
          <adultSeatPrice>2</adultSeatPrice>
          <childSeatPrice>3</childSeatPrice>
          <classFare>sample string 1</classFare>
          <infantSeatPrice>4</infantSeatPrice>
          <totalPrice>5</totalPrice>
        </BusFareModel>
      </classes>
      <departLocation>
        <DepartLocationModel>
          <departAddress>sample string 2</departAddress>
          <departID>1</departID>
          <departTime>2025-01-23T00:02:18.1608722+07:00</departTime>
        </DepartLocationModel>
        <DepartLocationModel>
          <departAddress>sample string 2</departAddress>
          <departID>1</departID>
          <departTime>2025-01-23T00:02:18.1608722+07:00</departTime>
        </DepartLocationModel>
      </departLocation>
      <directCode>sample string 1</directCode>
      <isAllowChooseSeat>true</isAllowChooseSeat>
      <locationID>sample string 2</locationID>
      <operatorName>sample string 4</operatorName>
    </BusScheduleModel>
  </schedules>
</BusScheduleResponse>