POST Train/TakeSeat

Request Information

URI Parameters

None.

Body Parameters

TrainTakeSeatRequest
NameDescriptionTypeAdditional information
passengers

Collection of TrainTakeSeatPassenger

None.

bookingCode

string

None.

bookingDate

date

None.

trainID

string

None.

userID

user API

string

None.

accessToken

access code getting from login

string

None.

Request Formats

application/json, text/json

Sample:
{
  "passengers": [
    {
      "name": "sample string 1",
      "type": 0,
      "seatNumber": "sample string 2",
      "wagonNumber": "sample string 3",
      "wagonCode": "sample string 4"
    },
    {
      "name": "sample string 1",
      "type": 0,
      "seatNumber": "sample string 2",
      "wagonNumber": "sample string 3",
      "wagonCode": "sample string 4"
    }
  ],
  "bookingCode": "sample string 1",
  "bookingDate": "2021-11-27T00:26:35.6982208+07:00",
  "trainID": "sample string 3",
  "userID": "sample string 4",
  "accessToken": "sample string 5"
}

application/xml, text/xml

Sample:
<TrainTakeSeatRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Cebes.DI.H2H.Api.Models">
  <accessToken>sample string 5</accessToken>
  <userID>sample string 4</userID>
  <bookingCode>sample string 1</bookingCode>
  <bookingDate>2021-11-27T00:26:35.6982208+07:00</bookingDate>
  <passengers>
    <TrainTakeSeatPassenger>
      <name>sample string 1</name>
      <seatNumber>sample string 2</seatNumber>
      <type>Adult</type>
      <wagonCode>sample string 4</wagonCode>
      <wagonNumber>sample string 3</wagonNumber>
    </TrainTakeSeatPassenger>
    <TrainTakeSeatPassenger>
      <name>sample string 1</name>
      <seatNumber>sample string 2</seatNumber>
      <type>Adult</type>
      <wagonCode>sample string 4</wagonCode>
      <wagonNumber>sample string 3</wagonNumber>
    </TrainTakeSeatPassenger>
  </passengers>
  <trainID>sample string 3</trainID>
</TrainTakeSeatRequest>

Response Information

Resource Description

TrainTakeSeatResponse
NameDescriptionTypeAdditional information
bookingCode

string

None.

trainID

string

None.

bookingDate

date

None.

passengers

Collection of TrainTakeSeatPassenger

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:
{
  "bookingCode": "sample string 1",
  "trainID": "sample string 2",
  "bookingDate": "2021-11-27T00:26:35.7138212+07:00",
  "passengers": [
    {
      "name": "sample string 1",
      "type": 0,
      "seatNumber": "sample string 2",
      "wagonNumber": "sample string 3",
      "wagonCode": "sample string 4"
    },
    {
      "name": "sample string 1",
      "type": 0,
      "seatNumber": "sample string 2",
      "wagonNumber": "sample string 3",
      "wagonCode": "sample string 4"
    }
  ],
  "respTime": "2021-11-27T00:26:35.7138212+07:00",
  "userID": "sample string 5",
  "accessToken": "sample string 6",
  "status": "sample string 7",
  "respMessage": "sample string 8"
}

application/xml, text/xml

Sample:
<TrainTakeSeatResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Cebes.DI.H2H.Api.Models">
  <accessToken>sample string 6</accessToken>
  <respMessage>sample string 8</respMessage>
  <respTime>2021-11-27T00:26:35.7138212+07:00</respTime>
  <status>sample string 7</status>
  <userID>sample string 5</userID>
  <bookingCode>sample string 1</bookingCode>
  <bookingDate>2021-11-27T00:26:35.7138212+07:00</bookingDate>
  <passengers>
    <TrainTakeSeatPassenger>
      <name>sample string 1</name>
      <seatNumber>sample string 2</seatNumber>
      <type>Adult</type>
      <wagonCode>sample string 4</wagonCode>
      <wagonNumber>sample string 3</wagonNumber>
    </TrainTakeSeatPassenger>
    <TrainTakeSeatPassenger>
      <name>sample string 1</name>
      <seatNumber>sample string 2</seatNumber>
      <type>Adult</type>
      <wagonCode>sample string 4</wagonCode>
      <wagonNumber>sample string 3</wagonNumber>
    </TrainTakeSeatPassenger>
  </passengers>
  <trainID>sample string 2</trainID>
</TrainTakeSeatResponse>