Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update api_reference.md #16

Merged
merged 1 commit into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions api_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ console.log(response);

`book` function in IRCTC class takes input as a javascript object, where they are explained below

`Mandatory Keys`

- `Mandatory Keys`
- UPI
- Must be a string and have atleast three characters including `@`
- Must be a active UPI ID issued under NPCI UPI Guidlines
Expand Down Expand Up @@ -80,16 +79,13 @@ console.log(response);
- Must not be expired
- You have to login atleast once using the password in the IRCTC website before using it here
- Must verify mobile number and email ID in the portal before using the credentials here
- coach
- Must be a String
- Preferred Coach for total ticket
- Must be related to the class of the ticket
- passengers
- Must be a List and Contains Javascript Object of Each Passenger details
- Passengers list must contain maximum of 6 passengers for General
- Passengers list must contain maximum of 4 passengers for tatkal and Premium Tatkal
- Each passenger details must be enclosed in an javascript object format and include them in passengers list main field
- Each Passenger Object Contains
- `Mandatory Passenger Object Keys`
- name
- Must be a string and Mandatory Field
- The Name of the passenger, who takes the journey
Expand All @@ -107,6 +103,7 @@ console.log(response);
- Must be a string and Mandatory
- The Food choice need to be empty string if the train does not serves the food
- acceptable values `"V" | "N" | "D" | ""`
- `Optional Passenger Object Keys`
- berth
- Must be a string and Optional Parameter - Default to null
- This is the preferred berth that the passenger is opting and instructing IRCTC to book on the preferred berth
Expand All @@ -115,6 +112,11 @@ console.log(response);
- country
- Must be a string and Optional Parameter - Defaults to IN
- ISO Country Code of the Passenger Nationality
- `Optional Keys`
- coach
- Must be a String
- Preferred Coach for total ticket
- Must be related to the class of the ticket

The example input is as follows

Expand Down