VishalTravels API Reference
Introduction

VishalTravels Version 2 API

A REST API for searching, pricing and booking series/fixed-departure flights, retrieving booking details and checking agent account balance. All endpoints return JSON and are namespaced under /api/v2.

  • Base URL{{baseUrl}}. Set your own base URL in the sidebar if your environment differs (staging/production).
  • Formatapplication/json. Requests and responses are JSON. Successful responses include "success": true.
  • Response Envelope{ success, data }. All responses share a common envelope with a success flag and a data or message payload.

Authentication

Every request must include your agent api-key as a request header. There is no OAuth flow or bearer token — the key is issued to your agency and identifies your account for pricing, balance and bookings.

HeaderRequiredDescription
api-keyrequiredYour agent API key, issued per agency/environment.
Content-Typerecommendedapplication/json;charset=UTF-8
Acceptrecommendedapplication/json, text/plain, */*
  • Keep your key secret. Treat the api-key like a password — anyone with it can search fares and create bookings against your agent balance. This documentation stores the key only in your browser's local storage so you can test requests; it is never sent anywhere except the base URL you configure.

Environment Setup

Configure these once in the sidebar and every "Try it" panel below will use them automatically.

  • Set Base URL to the environment you want to hit (defaults to {{baseUrl}}).
  • Paste your API Key.
  • Open any endpoint below, adjust parameters if needed, and click Send Request.
  • CORS note: browsers block cross-origin requests unless the server explicitly allows them. If "Send Request" fails with a network error, your API server likely needs to allow CORS from this page's origin, or you should serve/open this documentation from the same host as the API.

Test Cases

Before your api-key is certified for production use, we require an end-to-end test pass covering the full booking lifecycle. Please exercise SearchCreate BookingBooking Details and keep the request/response logs from each step handy — we may ask for them during certification review.

  • Call Search for the sector and date you want to certify, covering onward (connecting), round-trip, and multi-city itineraries — save the full request and response for each.
  • Call Create Booking using a fare from that search result, and save the full request and response.
  • Call Booking Details using the resulting reference, and save the full request and response.

Once the API integration is done, please send us test booking references created using the API with the following combinations:

  • Domestic sector — 2 adults, 1 child, and 1 infant.
  • International sector — 2 adults, 1 child, and 1 infant.