POST Train/BookingList

Request Information

URI Parameters

None.

Body Parameters

TrainBookingListRequest
NameDescriptionTypeAdditional information
filterBy

csFilterDateTicketTrain

None.

startDate

date

None.

endDate

date

None.

userID

user API

string

None.

accessToken

access code getting from login

string

None.

Request Formats

application/json, text/json

Sample:
{
  "filterBy": 0,
  "startDate": "2025-01-23T00:09:36.2024339+07:00",
  "endDate": "2025-01-23T00:09:36.2024339+07:00",
  "userID": "sample string 1",
  "accessToken": "sample string 2"
}

application/xml, text/xml

Sample:
<TrainBookingListRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Cebes.DI.H2H.Api.Models">
  <accessToken>sample string 2</accessToken>
  <userID>sample string 1</userID>
  <endDate>2025-01-23T00:09:36.2024339+07:00</endDate>
  <filterBy>Booking</filterBy>
  <startDate>2025-01-23T00:09:36.2024339+07:00</startDate>
</TrainBookingListRequest>

Response Information

Resource Description

TrainBookingListResponse
NameDescriptionTypeAdditional information
startDate

date

None.

endDate

date

None.

list

Collection of TrainBookingModel

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:
{
  "startDate": "2025-01-23T00:09:36.2024339+07:00",
  "endDate": "2025-01-23T00:09:36.2024339+07:00",
  "list": [
    {
      "bookingCode": "sample string 1",
      "trainID": "sample string 2",
      "route": "sample string 3",
      "bookingDate": "2025-01-23T00:09:36.2024339+07:00",
      "salesPrice": 1.0,
      "ticketPrice": 1.0,
      "paxAdult": 4,
      "paxChild": 5,
      "paxInfant": 6,
      "ticketStatus": "sample string 7",
      "issuedTimeLimit": "2025-01-23T00:09:36.2024339+07:00"
    },
    {
      "bookingCode": "sample string 1",
      "trainID": "sample string 2",
      "route": "sample string 3",
      "bookingDate": "2025-01-23T00:09:36.2024339+07:00",
      "salesPrice": 1.0,
      "ticketPrice": 1.0,
      "paxAdult": 4,
      "paxChild": 5,
      "paxInfant": 6,
      "ticketStatus": "sample string 7",
      "issuedTimeLimit": "2025-01-23T00:09:36.2024339+07:00"
    }
  ],
  "respTime": "2025-01-23T00:09:36.2024339+07:00",
  "userID": "sample string 2",
  "accessToken": "sample string 3",
  "status": "sample string 4",
  "respMessage": "sample string 5"
}

application/xml, text/xml

Sample:
<TrainBookingListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Cebes.DI.H2H.Api.Models">
  <accessToken>sample string 3</accessToken>
  <respMessage>sample string 5</respMessage>
  <respTime>2025-01-23T00:09:36.2024339+07:00</respTime>
  <status>sample string 4</status>
  <userID>sample string 2</userID>
  <endDate>2025-01-23T00:09:36.2024339+07:00</endDate>
  <list>
    <TrainBookingModel>
      <bookingCode>sample string 1</bookingCode>
      <bookingDate>2025-01-23T00:09:36.2024339+07:00</bookingDate>
      <issuedTimeLimit>2025-01-23T00:09:36.2024339+07:00</issuedTimeLimit>
      <paxAdult>4</paxAdult>
      <paxChild>5</paxChild>
      <paxInfant>6</paxInfant>
      <route>sample string 3</route>
      <salesPrice>1</salesPrice>
      <ticketPrice>1</ticketPrice>
      <ticketStatus>sample string 7</ticketStatus>
      <trainID>sample string 2</trainID>
    </TrainBookingModel>
    <TrainBookingModel>
      <bookingCode>sample string 1</bookingCode>
      <bookingDate>2025-01-23T00:09:36.2024339+07:00</bookingDate>
      <issuedTimeLimit>2025-01-23T00:09:36.2024339+07:00</issuedTimeLimit>
      <paxAdult>4</paxAdult>
      <paxChild>5</paxChild>
      <paxInfant>6</paxInfant>
      <route>sample string 3</route>
      <salesPrice>1</salesPrice>
      <ticketPrice>1</ticketPrice>
      <ticketStatus>sample string 7</ticketStatus>
      <trainID>sample string 2</trainID>
    </TrainBookingModel>
  </list>
  <startDate>2025-01-23T00:09:36.2024339+07:00</startDate>
</TrainBookingListResponse>