Skip to content

Travelyaari Hold Seats API

Somya Arora edited this page Oct 31, 2017 · 2 revisions

1.4 Hold Seats

Intent

hold_seats

Request Params Description

KEYWORD DESCRIPTION
SEAT_INFO Object containing customer info, passenger info etc
SEAT_INFO.FROM_CITY_ID Origin city name
SEAT_INFO.TO_CITY_ID destination city name
SEAT_INFO.JOURNEY_DATE date of the journey
SEAT_INFO.ROUTE_BUS_ID route Id of bus
SEAT_INFO.PICK_UP_ID Travelyaari ID for pick-up city name
SEAT_INFO.DROP_OFF_ID Travelyaari ID for drop-off city name
CONTACT_INFO Object containing customer name, email, phone etc
CONTACT_INFO.CUSTOMER_NAME Name of customer
CONTACT_INFO.EMAIL Customer email-id
CONTACT_INFO.PHONE Customer phone number
CONTACT_INFO.MOBILE Customer mobile number
PASSENGERS Object containing customer info, passenger info etc
PASSENGERS.NAME Passenger's name
PASSENGERS.AGE Passenger's age
PASSENGERS.GENDER Passenger's gender
PASSENGERS.SEAT_NO Passenger's seat number
PASSENGERS.FARE Fare of travel
PASSENGERS.SEAT_TYPE_ID Seat type
PASSENGERS.IS_SEAT_AC Is selected seat ac

Payload

{
  "seat_info":{
  		 "FromCityId": $FROM_CITY_ID,
		 "ToCityId"  : $TO_CITY_ID,
		 "JourneyDate":$JOURNEY_DATE,
		 "BusId": $ROUTE_BUS_ID,
		 "PickUpID": $PICK_UP_ID ,
		 "DropOffID":$DROP_OFF_ID,
  "ContactInfo": {
    "CustomerName": "$CUSTOMER_NAME",
    "Email": "$CUSTOMER_EMAIL",
    "Phone": "$CUSTOMER_PHONE",
    "Mobile": "$CUSTOMER_MOBILE"
  },
  "Passengers": [
    {
      "Name": "$NAME",
      "Age": $AGE,
      "Gender": "$GENDER",
      "SeatNo": "$SEATNO",
      "Fare": $FARE,
      "SeatTypeId": $SEAT_TYPE_ID,
      "IsAcSeat": $IS_AC_SEAT
    }
  ]
 }
}

## Response Params Description
| KEY | DESCRIPTION |
| ---|--- |
| $HOLD_ID | Travelyaari ID for booking to hold seat |

## Response Body 

{ "HoldId": $HOLD_ID }

## 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| fromCityId | From City Id is missing.|
| 400| toCityId | From City Id is missing.|
| 400| busRouteId | Bus Route id is missing.|
| 400| journeyDate | Journey Date is missing.|
Clone this wiki locally