POST Train/Schedule
Request Information
URI Parameters
None.
Body Parameters
TrainScheduleRequestName | Description | Type | Additional information |
---|---|---|---|
trainID | string |
None. |
|
paxAdult | integer |
None. |
|
paxChild | integer |
None. |
|
paxInfant | integer |
None. |
|
departDate | date |
None. |
|
origin | string |
None. |
|
destination | string |
None. |
|
userID |
user API |
string |
None. |
accessToken |
access code getting from login |
string |
None. |
Request Formats
application/json, text/json
Sample:
{ "trainID": "sample string 1", "paxAdult": 2, "paxChild": 3, "paxInfant": 4, "departDate": "2025-01-22T03:45:13.6253416+07:00", "origin": "sample string 6", "destination": "sample string 7", "userID": "sample string 8", "accessToken": "sample string 9" }
application/xml, text/xml
Sample:
<TrainScheduleRequest 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> <departDate>2025-01-22T03:45:13.6253416+07:00</departDate> <destination>sample string 7</destination> <origin>sample string 6</origin> <paxAdult>2</paxAdult> <paxChild>3</paxChild> <paxInfant>4</paxInfant> <trainID>sample string 1</trainID> </TrainScheduleRequest>
Response Information
Resource Description
TrainScheduleResponseName | Description | Type | Additional information |
---|---|---|---|
trainID | string |
None. |
|
paxAdult | integer |
None. |
|
paxChild | integer |
None. |
|
paxInfant | integer |
None. |
|
departDate | date |
None. |
|
origin | string |
None. |
|
destination | string |
None. |
|
originFull | string |
None. |
|
destinationFull | string |
None. |
|
schedules | Collection of TrainScheduleModel |
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:
{ "trainID": "sample string 1", "paxAdult": 2, "paxChild": 3, "paxInfant": 4, "departDate": "2025-01-22T03:45:13.6253416+07:00", "origin": "sample string 6", "destination": "sample string 7", "originFull": "sample string 8", "destinationFull": "sample string 9", "schedules": [ { "trainNumber": "sample string 1", "trainName": "sample string 2", "departTime": "2025-01-22T03:45:13.6253416+07:00", "arrivalTime": "2025-01-22T03:45:13.6253416+07:00", "availibilityClasses": [ { "subClass": "sample string 1", "availabilityStatus": "sample string 2", "availabilityClass": "sample string 3", "price": 4.0, "pricePerAdult": 5.0 }, { "subClass": "sample string 1", "availabilityStatus": "sample string 2", "availabilityClass": "sample string 3", "price": 4.0, "pricePerAdult": 5.0 } ] }, { "trainNumber": "sample string 1", "trainName": "sample string 2", "departTime": "2025-01-22T03:45:13.6253416+07:00", "arrivalTime": "2025-01-22T03:45:13.6253416+07:00", "availibilityClasses": [ { "subClass": "sample string 1", "availabilityStatus": "sample string 2", "availabilityClass": "sample string 3", "price": 4.0, "pricePerAdult": 5.0 }, { "subClass": "sample string 1", "availabilityStatus": "sample string 2", "availabilityClass": "sample string 3", "price": 4.0, "pricePerAdult": 5.0 } ] } ], "respTime": "2025-01-22T03:45:13.6409741+07:00", "userID": "sample string 11", "accessToken": "sample string 12", "status": "sample string 13", "respMessage": "sample string 14" }
application/xml, text/xml
Sample:
<TrainScheduleResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Cebes.DI.H2H.Api.Models"> <accessToken>sample string 12</accessToken> <respMessage>sample string 14</respMessage> <respTime>2025-01-22T03:45:13.6409741+07:00</respTime> <status>sample string 13</status> <userID>sample string 11</userID> <departDate>2025-01-22T03:45:13.6253416+07:00</departDate> <destination>sample string 7</destination> <destinationFull>sample string 9</destinationFull> <origin>sample string 6</origin> <originFull>sample string 8</originFull> <paxAdult>2</paxAdult> <paxChild>3</paxChild> <paxInfant>4</paxInfant> <schedules> <TrainScheduleModel> <arrivalTime>2025-01-22T03:45:13.6253416+07:00</arrivalTime> <availibilityClasses> <TrainAvailabilityModel> <availabilityClass>sample string 3</availabilityClass> <availabilityStatus>sample string 2</availabilityStatus> <price>4</price> <pricePerAdult>5</pricePerAdult> <subClass>sample string 1</subClass> </TrainAvailabilityModel> <TrainAvailabilityModel> <availabilityClass>sample string 3</availabilityClass> <availabilityStatus>sample string 2</availabilityStatus> <price>4</price> <pricePerAdult>5</pricePerAdult> <subClass>sample string 1</subClass> </TrainAvailabilityModel> </availibilityClasses> <departTime>2025-01-22T03:45:13.6253416+07:00</departTime> <trainName>sample string 2</trainName> <trainNumber>sample string 1</trainNumber> </TrainScheduleModel> <TrainScheduleModel> <arrivalTime>2025-01-22T03:45:13.6253416+07:00</arrivalTime> <availibilityClasses> <TrainAvailabilityModel> <availabilityClass>sample string 3</availabilityClass> <availabilityStatus>sample string 2</availabilityStatus> <price>4</price> <pricePerAdult>5</pricePerAdult> <subClass>sample string 1</subClass> </TrainAvailabilityModel> <TrainAvailabilityModel> <availabilityClass>sample string 3</availabilityClass> <availabilityStatus>sample string 2</availabilityStatus> <price>4</price> <pricePerAdult>5</pricePerAdult> <subClass>sample string 1</subClass> </TrainAvailabilityModel> </availibilityClasses> <departTime>2025-01-22T03:45:13.6253416+07:00</departTime> <trainName>sample string 2</trainName> <trainNumber>sample string 1</trainNumber> </TrainScheduleModel> </schedules> <trainID>sample string 1</trainID> </TrainScheduleResponse>