Overview

Welcome to Tymk Software Bus Service Developer Documentation. You'll find comprehensive guides and documentation to help you start working with Bus Service as quickly as possible, as well as support if you get stuck. Let's jump right in!

Index

  • Get Source Locations List.
  • Get Destination Locations List.
  • Get Available Trips List.
  • Get Trip Details.
  • Block Bus Ticket.
  • Get Updated Bus Ticket Fare.
  • Confirm Bus Ticket.
  • Get Cancel Ticket Details.
  • Cancel Bus Ticket.
  • Get Balance

Base URLs

Type Request URL
Test http://testapi.tymksoftwares.in/api/bus/v1/
Live http://tymksoftwares.in/api/bus/v1/

Service

Service Id Name
9 Bus

Source Locations List

  • Call for fetching the list of Source locations along with the respective properties.
  • Send GET request to /sources

Request Parameters

Keyword Type Requirement Description
key string mandatory API Key received from Developer Panel

Response Parameters

Keyword Type Description
status boolean Status of the request
sources array Array of Source Objects
sources.id string Source ID
sources.name string Source Name

Response

{
    "status": true,
    "sources": [{
        "id": "1168",
        "name": "vadodara",
    }, {
        "id": "649",
        "name": "mumbai",
    }]
}

Destination Locations List

  • Call for fetching the list of Destination locations based on Source along with the respective properties.
  • Send GET request to /destinations

Request Parameters

Keyword Type Requirement Description
key string mandatory API Key received from Developer Panel
source_id integer mandatory Source ID from (Source Location Lists) request

Response Parameters

Keyword Type Description
status boolean Status of the request
destinations array Array of Destination Objects
destinations.id string Source ID
destinations.name string Source Name

Success Response

{
    "status": true,
    "destinations": [{
        "id": "1168",
        "name": "vadodara",
    }, {
        "id": "649",
        "name": "mumbai",
    }]
}

Error Response

{
    "status": false,
    "errors": [
        [
            "code": 403,
            "message": Invalid Source ID
        ]
    ]
}

Available Trips List

  • Call for fetching available Trips based on Source, Destination & Date of Journey.
  • Send GET request to /trips

Request Parameters

Keyword Type Requirement Description
key string mandatory API Key received from Developer Panel
source_id integer mandatory Source ID from (Source Locations List) request
destination_id integer mandatory Destination ID from (Destination Locations List) request
doj string mandatory Date in format "yyyy-mm-dd", Minimum today

Response Parameters

Keyword Type Description
status boolean Status of the request
trips array Array of Trip Objects
trips[ ]
trip_id string Trip ID
AC boolean Is the Bus Air Conditioned
arrival string Time of Arrival
seats string number of seats on the Bus
bus_type string Bus Type Description
bus_type_id string Bus Type ID
departure string Time of Departure
destination_id string Destination ID
doj string Date of Journey
boarding_points array Array of Boarding Point Objects
dropping_points array Array of Dropping Point Objects
fares array Array of Fare Objects
cancellation_policy array Array of Cancellation Policy Objects
id_proof boolean Identity Proof Requirement
live_tracking boolean Live Tracking Availability
operator_id string Bus Operator ID
partial_cancellation boolean Partial cancellation allowed
route_id string Bus Route ID
seater boolean Bus has Seater Seats
sleeper boolean Bus has Sleeper Seats
source_id string Source ID
tatkal_time string Time until Tatkal Ticket can be booked
travels string Bus Travels Name
vehicle_type string Type of Vehicle
zero_cancellation_time string Time until Zero Cancellation
m_ticket boolean M-Ticket Availability
  • Boarding Points and Droping Points have same Array Structure
boarding_points[ ]
address string Address of Boarding Point
id string Boarding Point ID
name string Name of Boarding Point
contact string Contact No. of Boarding Point
landmark string Landmark near Boarding Point
location string Location of Boarding Point
prime string Is Boarding Point Prime
time string Departure time from Boarding Point
cancellation_policy[ ]
from string Time in Hours before Departure
to string Time in Hours before Departure
percent string Percent of charge applicable
amount string Amount of charge applicable

Success Response

{
    "status": true,
    "trips":"trips": [{
        "AC": false,
        "arrival": "2017-01-13 22:40:00",
        "seats": "25",
        "boarding_points": [{
            "address": "Chhani Jakat",
            "id": "31590",
            "name": "Chhani Jakat naka",
            "contact": "9352515507",
            "landmark": "Chhani Jakat",
            "location": "Chhani Jakat Naka",
            "prime": true,
            "time": "2017-01-13 19:44:00"
        }],
        "bus_type": "Leyland Non A/C Seater/Sleeper Executive Luxury (2+1)",
        "bus_type_id": "1110",
        "cancellation_policy": [{
            "from": "23",
            "to": "24",
            "percent": "50",
            "amount": null
        }, {
            "from": "24",
            "to": "48",
            "percent": "20",
            "amount": null
        }, {
            "from": "48",
            "to": null,
            "percent": "10",
            "amount": null
        }],
        "departure": "2017-01-13 19:44:00",
        "destination_id": "1160",
        "doj": "2017-01-13",
        "dropping_points": [{
            "address": null,
            "id": "51654",
            "name": "CTM Char Rasta",
            "contact": null,
            "landmark": null,
            "location": "CTM Char Rasta",
            "prime": true,
            "time": "2017-01-13 22:40:00"
        }],
        "fares": [
            55000,
            34000,
            58000
        ],
        "id": "2000490022040022375",
        "id_proof": false,
        "live_tracking": false,
        "operator_id": "6644",
        "partial_cancellation": true,
        "route_id": "2000490000000022375",
        "seater": true,
        "sleeper": true,
        "source_id": "1168",
        "tatkal_time": "2017-01-13 00:23:00",
        "travels": "New Kothari Travels",
        "vehicle_type": "BUS",
        "zero_cancellation_time": "2017-01-13 00:10:00",
        "m_ticket": true
    }],
}

Response Fail

{
    "status": "false",
    "errors": [
        {
            "code": 403,
            "message": "Invalid Source Identifier"
        },
        {
            "code": 404,
            "message": "Invalid Destination Identifier"
        }
    ]
}

Get Trip Details

  • Call for fetching available single trip details and Bus Seat Layout based on Trip Identifier
  • Send GET request to /trip/details

Request Parameters

Keyword Type Requirement Description
key string mandatory API Key received from Developer Panel
trip_id string mandatory Trip Identifier

Response Parameters

Keyword Type Description
status boolean Status of the request
seats array Array of Seat Objects
seats[ ]
available boolean Seat Availability
fare_details array Particular Seat's Fair Details
location array Particular Seat's Location in Bus Layout
size array Particular Seat's Size in Bus Layout
ladies boolean Ladies Seat or not
seat_no string Seat Number
floor string Seat available on lower desk (0) or upper desk (1)
fare_details[ ]
base integer Base Fare Rate in Paisa
markup_fare_absolute integer Markup Fee in Paisa
markup_fare_percentage string Markup Fee Percentage
operator_service_charge_absolute integer Operator Charge in Paisa
operator_service_charge_percentage string Operator Charge in Percentage
service_tax_absolute integer Service tax in Paisa
service_tax_percentage string Service Tax in Percentag
total integer Total Fare of Particular Seat in Paisa
location[ ]
column string Column Number
row string Row Number

Bus Seat Location Capture

size[ ]
length string Seat Length
width string Seat Width

Seat Size


Block Ticket

  • This request will blocked a ticket for a specified time.
  • To Confirm Ticket, This request must required.
  • Send POST request to /ticket/block

Request Parameters

Keyword Type Requirement Description
key string mandatory API Key received from Developer Panel
company_order_id string mandatory Unique Order ID from Your App / Website
trip_id string mandatory Trip Identifier
source_id integer mandatory Source ID from (Source List) request
destination_id integer mandatory Destination ID from (Destination List) request
boarding_point_id string mandatory Boarding Point Id Get from Trip Detail
passengers array mandatory Passenger Array List
passengers []
seat_no string mandatory Seat Number ( Trip Detail Response )
fare integer mandatoty Total Amount of Fare ( From Trip Detail Response )
ladies integer mandatory For Female Passenger use 1 otherwise 0
name string mandatory Name of the Passenger
mobile integer mandatory 10 Digit Mobile Number, Start with 9 | 8 | 7
title string mandatory Use Mr, Mrs, Ms
email string mandatory Email Address of passenger
age integer mandatory Customer Age
gender string mandatory Like MALE,FEMALE
primary integer mandatory If passenger is primary then 1 otherwise 0
address string mandatory Passenger address
id_type string mandatory Passenger Identity Proof
PAN_CARD, VOTER_CARD, PASSPORT
DRIVING_LICENCE, RATION_CARD, AADHAR
id_no string mandatory Passenger Identity Proof Number

Response Parameters

Keyword Type Description
status boolean Response Status
reference_id string Blocked Ticket Reference Id (Required for Ticket Confirmation)

Response Success

{
    "status":true,
    "reference_id":"WsXhausgbjs7WeDRFS"
}

Response Fail

{
    "status":false,
    "errors":[
        {
            "code":101,
            "message":"Invalid API Authentication Key"
        }
    ]
}

Get Balance

  • Get Company Balance
  • Send GET request to https://testapi.tymksoftwares.in/api/balance or https://tymksoftwares.in/api/balance
Keyword Type Requirement Description
key string mandatory API Key received from Developer Panel

Response Code

{
    "status": true,
    "balance": 10000, // In Paisa
}

Support

  • Email: sid@tymkgroup.com / support@tymksoftwares.in
  • Phone: 9510447773