Skip to content

Travelyaari Bus Chart API

SoumyaSian edited this page Oct 28, 2017 · 4 revisions

1.3 Fetch Available Seats

Intent

bus_chart

Request Params Description

KEYWORD DESCRIPTION
FROM_CITY_ID pick-up city name
TO_CITY_ID destination city name
JOURNEY_DATE date of the journey
ROUTE_BUS_ID route Id of bus

Payload

{
  	"fromCityId" : "$FROM_CITY_ID",
        "toCityId" : "$TO_CITY_ID",
        "journeyDate" : "$JOURNEY_DATE",
        "routeBusId" : "$ROUTE_BUS_ID",
}

Response Params Description

KEY DESCRIPTION
CHART_LAYOUT Object which the information about the layout of the seats available
CHART_LAYOUT.INFO Object gives the information about the total count of the seats and layout
CHART_LAYOUT.INFO.TOTAL_SEMI_SLEEPER Total number of the semi sleeper seats
CHART_LAYOUT.INFO.TOTAL_SLEEPER Total number of the sleeper seats
CHART_LAYOUT.INFO.TOTAL_SEATER Total number of the seaters
CHART_LAYOUT.INFO.TOTAL_SEATES Total number of the seates
CHART_LAYOUT.INFO.DECKS Total number of decks available
CHART_LAYOUT.INFO.LOWER Object gives the maximum number of columns and rows in the lower deck
CHART_LAYOUT.INFO.LAYOUT_NAME Name of the layout name
CHART_LAYOUT.LAYOUT Object containing the lower and upper deck information
CHART_LAYOUT.LAYOUT.LOWER Object which has all the information about lower deck seats available
UPCOMING_OCCURENCE.SINGLE_OCCURENCE Count of single occurrence of the event
UPCOMING_OCCURENCE.TIME_ZONE Name of the time zone
UPCOMING_OCCURENCE.ENABLE_TICKETING True or False (True represents ticket can be enable and false represents ticket cannot be enable)
URL URL gives complete details about the event
CATS JSON Array of list of categories associated with this event
VENUE Event Venue JSON Object. Includes venue name, address, latitude, longitude, and city
PRICE A JSON Array of different pricing tiers for an event
PRICE.ID EventsHigh ID of one of the occurrence
PRICE.EID EventsHigh ID of an event
PRICE.NAME Name of the price tier
PRICE.CURRENCY Currency of price. Default is INR
PRICE.VALUE The ticket price value
PRICE.DISCOUNT_PCT The discount percentage. Default is 0
PRICE.DISCOUNT_VALUE If discount_pct>0, this represents the new ticket price value.
PRICE.VALIDITY_START This price tier is valid from this specified start date
PRICE.VALIDITY_END This price tier is valid till this specified end date
PRICE.NOTE A more descriptive note about the price tier. It is mandatory to display the note when available.
PRICE.CAPACITY Total capacity for this price tier. 0 means capacity is unbounded. Note: capacity does not mean remaining inventory, it means total capacity available
PRICE.IS_MULTI Ignore this field
PRICE.IS_INDIVIDUAL Ignore this field
PRICE.DATE The next upcoming date when this price tier is applicable
PRICE.TIME The next upcoming time when this price tier is applicable
PRICE.ALL_OCCURRENCE The total occurrences for this event for which this price tier is applicable. Same as price.occurrences.size()
PRICE.TIME The next upcoming time when this price tier is applicable
PRICE.OCCURRENCES List of all date/time occurrences of this event for which this price tier is applicable.
BOOKING_URL Ticketing end point for this event for users to buy tickets
BOOKING_ENQUIRY_URL Any Booking related enquiry for this event for users to buy tickets

Response Body

| CHART_LAYOUT | Object which the information about the layout of the seats available |
| CHART_LAYOUT.INFO | Object gives the information about the total count of the seats and layout|
| CHART_LAYOUT.INFO.TOTAL_SEMI_SLEEPER | Total number of the semi sleeper seats |
| CHART_LAYOUT.INFO.TOTAL_SLEEPER | Total number of the sleeper seats |
| CHART_LAYOUT.INFO.TOTAL_SEATER | Total number of the seaters |
| CHART_LAYOUT.INFO.TOTAL_SEATES  | Total number of the seates |
| CHART_LAYOUT.INFO.DECKS | Total number of decks available |
| CHART_LAYOUT.INFO.LOWER | Object gives the maximum number of columns and rows in the lower deck |
| CHART_LAYOUT.INFO.LAYOUT_NAME | Name of the layout name |
| CHART_LAYOUT.LAYOUT | Object containing the lower and upper deck information |
| CHART_LAYOUT.LAYOUT.LOWER | Object which has all the informati
[
  {
    "chartLayout": {
      "Info": {
        "TotalSleeper": $TOTAL_SLEEPER ,
        "TotalSemiSleeper": $TOTAL_SEMI_SLEEPER
        "TotalSeater": $TOTAL_SEATER,
        "TotalSeats": $TOTAL_SEATES,
        "Decks": $DECKS,
        "Lower": {
          "MaxRows": $MAX_ROWS,
          "MaxCols": $MAX_COLUMNS
        },
        "Upper": {
          "MaxRows": $MAX_ROWS,
          "MaxCols": $MAX_COLUMNS
        },
        "LayoutName": "$LAYOUT_NAME"
      },
      "Layout": {
        "Lower": [
          [
            $SEQ_NO,
            $ROW,
            $COL,
            $WIDTH,
            $HEIGHT,
            $SEAT_TYPE
          ] ...,
        ],
        "Upper": [
          [
            $SEQ_NO,
            $ROW,
            $COL,
            $WIDTH,
            $HEIGHT,
            $SEAT_TYPE
          ]..,
        ]
      }
    },
    "chartSeats": {
      "Seats": [
        "L22",
        "L3",
        "L4",
        "L24",
        "L7",
        "L8",
        "L26",
        "L11",
        "L12",
        "L28",
        "L15",
        "L16",
        "L30",
        "L19",
        "L20",
        "U21",
        "U1",
        "U2",
        "U23",
        "U5",
        "U6",
        "U25",
        "U9",
        "U10",
        "U27",
        "U13",
        "U14",
        "U29",
        "U17",
        "U18"
      ]
    },
    "seatsStatus": {
      "Status": [
        0,
        0,
        0,
        0,
        1,
        1,
        0,
        1,
        1,
        0,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        0,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1
      ],
      "Fares": [
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ],
        [
          620,
          620,
          0,
          0,
          0,
          0
        ]
      ],
      "UniqFares": [
        620
      ],
      "profiler": "1683"
    },
    "pickups": [
      {
        "Contact": "080-25525699,25526055",
        "Landmark": "Opp Mas Residency, Hosur Main Road",
        "Address": "Madiwala,Koramangala,Bangalore.",
        "PickupTime": "2017-10-31 21:30:00",
        "PickupArea": "",
        "PickupName": "MADIWALA(KPN)",
        "PickupCode": "9"
      },
      {
        "Contact": "08025252748",
        "Landmark": "Near R.T.O Office,Opp canara Bank,",
        "Address": "No 33/2 33 PKN Building 1 STG,Bangalore.",
        "PickupTime": "2017-10-31 21:45:00",
        "PickupArea": "",
        "PickupName": "INDIRA NAGAR(KPN)",
        "PickupCode": "12"
      },
      {
        "Contact": "080-42085298 , 9343349199",
        "Landmark": "Opp Wipro& Oxford college,Near shell Petrol bunk",
        "Address": "No 54,64,Garecababi talai,Bangalore.",
        "PickupTime": "2017-10-31 22:15:00",
        "PickupArea": "",
        "PickupName": "BOMMANAHALLI(KPN)",
        "PickupCode": "10"
      },
      {
        "Contact": "080-42150124,9148903539",
        "Landmark": "Mangutha timper building",
        "Address": "First cross,Vidya Nager,Opp SKF,Hosur main road",
        "PickupTime": "2017-10-31 22:30:00",
        "PickupArea": "",
        "PickupName": "BOMMACHANDRA(KPN)",
        "PickupCode": "244"
      }
    ],
    "dropoffs": [
      
    ],
    "availSeats": {
      "Upper": 14,
      "Lower": 9
    }
  }
]

Error messages

Some error messages, you might get for an invalid search request. The HTTP response code in this case will be 400.

Status Error message Description
400 Please specify the city city is missing.
Clone this wiki locally