0% found this document useful (0 votes)
29 views26 pages

Process Flow

Baby bill

Uploaded by

lalge.mohan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views26 pages

Process Flow

Baby bill

Uploaded by

lalge.mohan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Process Flow

1. Get your Partner Portal credentials from the CabBazar team. You need to
provide Name, Phone and Email for registration on the Partner Portal.
2. Get your Testing server IP whitelisted on the CabBazar Test environment.
3. Login to Partner Portal in the Test environment and get the API key for the Test
environment.
4. Integrate APIs
a. Fetch and store below data in your database. You may refresh / sync it once
in a month through a cron job. The data is different in the Test and
Production environment.
i. Cities for Outstation cab
ii. Cities for Local car rental
iii. Airports for Airport transfer
b. Get prices for Outstation / Local / Airport transfer using respective API. For
Airport transfer, you will need to first retrieve the destination cities list for
the Airport selected by the user.
c. Place booking is a two step process.
Initiate booking API must be called after the user clicks the ‘Payment’
button. If it returns any error, error can be shown to the user otherwise
proceed to the payment gateway for payment of the total amount received
in Initiate booking API response. After the payment is received, call the
Confirm booking API. Initiate booking API will create a booking with
paymentStatus ‘pending’. Only after Confirm booking API, the booking will
be active and the amount will be deducted from your wallet. Confirm
booking API will fail if your wallet balance is low.
d. Create a POST API endpoint (webhook) at your server to receive the
updates on the booking like car & driver details assigned / changed /
removed, booking completed with or without extra kms and final price. It
will be needed to communicate the cab driver details to the customer.
Update the Webhook URL and Webhook key (optional) at Partner Portal.
e. Integrate the Cancel Booking API as needed, to cancel any booking by your
team or the end customer.
f. You can fetch the latest booking details at any time using the Get Booking
details API. Although it should automatically update through the Webhook
provided but you can manually get the latest booking details too at any
point of time using this API.

API Documentation

The Base URL for APIs is:


For Test environment: https://api.stage.cabbazar.com/partner/api
For Production environment: https://api.cabbazar.com/partner/api

For API key, please login to partner portal in respective environment.


For Test environment: https://stage.cabbazar.com/partner/login
For Production environment: https://cabbazar.com/partner/login

For Whitelisting your server IP, please contact the CabBazar team.
IMPORTANT – All API communication must be from Server to Server and from
whitelisted IP so that your API key is never exposed. You are responsible for the
security of your API key so that nobody else can make booking by paying
through your wallet. At any time, if you are in doubt, you can generate a new
API key from the partner portal.

Error Response: Success response code is 200. All error response will have error message in
below format:
{“message”: <error message>}

1. Get Cities for Outstation cab


Description: This API provides the list of all the cities for outstation cab search i.e. pickup and
destination cities for one way and round trip intercity cabs. Partners are expected to retrieve it
once and store it in their database. This list rarely changes. Partners may choose to sync it once
in a month through a cron job. This API must be called between 12:00AM to 6AM IST only to
avoid any server load.

URL: /cities
Method: GET
Parameters:
key=<your API key>
Response:
[
{
"address": "Delhi, Delhi, India",
"placeId": "CABBAZAR_6cbda080-bae4-4bbe-a749-9947ffd2cd46"
}
]

2. Get Cities for Local car rental


Description: This API provides the list of all the cities for local car rental search i.e. cities for 4
hour 40km, 8 hour 80km, 12 hour 120km cab. Partners are expected to retrieve it once and
store it in their database. This list rarely changes. Partners may choose to sync it once in a
month through a cron job.

URL: /local/cities
Method: GET
Parameters:
key=<your API key>
Response:
[
{
"cityName": "Agra",
"cityId": "8c058ffa-0419-4aff-b194-e1ef5abaf6ff"
}
]

3. Get Airports for Airport transfers


Description: This API provides the list of all the airports for airport transfer cab. Partners are
expected to retrieve it once and store it in their database. This list rarely changes. Partners may
choose to sync it once in a month through a cron job.

URL: /airport
Method: GET
Parameters:
key=<your API key>
Response:
[
{
"airportName": "Agra Airport",
"airportId": "4608ac07-0968-4b35-9d65-2bd2f7b84607"
}
]

4. Get Prices for Outstation cab


Description: This API provides the prices of all car types available for the given
itinerary for outstation one way or round trip.

URL: /fare
Method: POST
Parameters:
{
“key”: <your API key>,
“departureAt”: Trip start datetime in IST (Indian Standard Time) in format
DD/MM/YYYY HH:mm e.g. 05/11/2021 20:30 for November 5, 2021, 8:30 pm.
“isReturn”: true or false. If trip is round trip then true else false.
“arrivalAt”: Trip end date in IST (Indian Standard Time) in format
DD/MM/YYYY e.g. 05/11/2021 for November 5, 2021. This field is only required
for round trip i.e. isReturn – true. Please note its date only and not time.
“itinerary”: [
{“address”: <as received from Get Cities API>,
“placeId”: <as received from Get Cities API>
},
{“address”: <as received from Get Cities API>,
“placeId”: <as received from Get Cities API>
}
]
}
Response:
A sample response is given below.
Important points:
- Possible values for “carType” are 'hatchback', 'sedan', 'innova', 'crysta', 'suv',
'tempo_12', 'tempo_12_ac', 'tempo_15', 'tempo_25'.
- “isFixedRoute”: true means Toll tax / State tax is included in price otherwise
it's extra.
- carrierCharges means charges for Add-on service ‘Assured luggage space
(either carrier or boot space)’ i.e. the add-on service assures that either cab
will have boot space e.g. petrol / diesel cars or it will have carrier e.g. in
CNG cars.
- petCharges means charges for Add-on service ‘Pet Allowed’.

{
"details": {
"isReturn": true,
"itinerary": [
{
"address": "Delhi, Delhi, India",
"placeId": "CABBAZAR_6cbda080-bae4-4bbe-a749-9947ffd2cd46",
"location": {
"lat": 28.7040592,
"lng": 77.10249019999999
}
},
{
"address": "Chandigarh, Chandigarh, India",
"placeId": "CABBAZAR_ecf1e5fb-37de-4a6b-87ff-afee25b713cc",
"location": {
"lat": 30.7333148,
"lng": 76.7794179
}
}
],
"departureAt": "09/02/2022 20:00",
"arrivalAt": "10/02/2022",
"tripDuration": 2,
"isFixedRoute": false,
"taxType": "IGST (5%)",
"terms": [
"Vehicle and fuel charges included",
"Driver Night Charges included",
“For Round trip bookings, all the local sightseeing in the destination cities is
included except for Sikkim and Darjeeling. For local sightseeing in Pickup city (if
required), please add all the Pickup city stops in itinerary.”
"Included Kilometers will start from pickup location",
"Driver allowance includes driver's stay, food and night charges",
"Toll and state tax extra. Customer need to pay directly as per actuals.",
"Parking charges extra if applicable. Customer need to pay directly as per
actuals",
"Extra Kms charge, if any, needs to be paid by Customer directly to the
driver",
"AC will remain switch off in hill areas",
"For round trip booking, Kilometers will count from pickup location to
pickup location",
"One way trip will have only one pickup and one drop. Additional pickup or
drop on the way will incur additional charges of Rs. 250 per pickup / drop.",
"Rohtang Pass needs special permit and is not included in any trip"
],
“cancellationPolicy”: “If driver / car details are not assigned at time of
cancellation then No cancellation charge will be levied on you. If driver / car
details are already assigned at time of cancellation then 20% of booking amount
will be deducted as cancellation charges.”
},
"fareChart": [
{
"carId": "f5d5db79-ea08-4740-8ff0-b8368c6fbe24",
"carType": "sedan",
"includedKm": 500,
"estimatedPrice": 5000,
"estimatedGst": 250,
"extraKmPricePerKm": 9,
“carrierChargesWithoutGst”: 500,
“carrierCharges”: 525,
“carrierText”: “Assured luggage space (either carrier or boot space) for Rs.
525”,
“petChargesWithoutGst”: 800,
“petCharges”: 840,
“petText”: “Pet Allowed for Rs. 840”
},
{
"carId": "ad4fef88-7b04-49fa-9acd-29f1fead3c12",
"carType": "hatchback",
"includedKm": 500,
"estimatedPrice": 5000,
"estimatedGst": 250,
"extraKmPricePerKm": 9,
“carrierChargesWithoutGst”: 500,
“carrierCharges”: 525,
“carrierText”: “Assured luggage space (either carrier or boot space) for Rs.
525”
},
{
"carId": "0788e276-ba8e-42a9-b1cd-0e82fe1fb023",
"carType": "suv",
"includedKm": 500,
"estimatedPrice": 6500,
"estimatedGst": 325,
"extraKmPricePerKm": 12,
“carrierChargesWithoutGst”: 500,
“carrierCharges”: 525,
“carrierText”: “Assured luggage space (either carrier or boot space) for Rs.
525”,
“petChargesWithoutGst”: 800,
“petCharges”: 840,
“petText”: “Pet Allowed for Rs. 840”
},
{
"carId": "b20f14c9-8b7a-4fda-bbd7-bda6b4470a2c",
"carType": "innova",
"includedKm": 500,
"estimatedPrice": 7500,
"estimatedGst": 375,
"extraKmPricePerKm": 14,
“carrierChargesWithoutGst”: 500,
“carrierCharges”: 525,
“carrierText”: “Assured luggage space (either carrier or boot space) for Rs.
525”,
“petChargesWithoutGst”: 1000,
“petCharges”: 1050,
“petText”: “Pet Allowed for Rs. 1050”
},
{
"carId": "3c53a3b7-8bb5-4322-9e19-8e3345f3c26b",
"carType": "tempo_12",
"includedKm": 500,
"estimatedPrice": 12000,
"estimatedGst": 600,
"extraKmPricePerKm": 22.6,
“carrierChargesWithoutGst”: 500,
“carrierCharges”: 525,
“carrierText”: “Assured luggage space (either carrier or boot space) for Rs.
525”,
“petChargesWithoutGst”: 2000,
“petCharges”: 2100,
“petText”: “Pet Allowed for Rs. 2100”
},
{
"carId": "4152f405-c75c-4667-b67d-049de8b4acac",
"carType": "tempo_15",
"includedKm": 500,
"estimatedPrice": 13270,
"estimatedGst": 663.5,
"extraKmPricePerKm": 25.3,
“carrierChargesWithoutGst”: 500,
“carrierCharges”: 525,
“carrierText”: “Assured luggage space (either carrier or boot space) for Rs.
525”,
“petChargesWithoutGst”: 2000,
“petCharges”: 2100,
“petText”: “Pet Allowed for Rs. 2100”
}
]
}

5. Get Prices for Local car rental


Description: This API provides the prices of all car types available for local car
rental for given city, date and fare type.

URL: /fare/local
Method: POST
Parameters:
{
“key”: <your API key>,
“departureAt”: Trip start datetime in IST (Indian Standard Time) in format
DD/MM/YYYY HH:mm e.g. 05/11/2021 20:30 for November 5, 2021, 8:30 pm.
“cityId”: <as received from Get Cities for Local car rental API>
“fareType”: “2_20” or “4_40” or “8_80” or “12_120” for 2 hours 20km or 4
hours 40km or 8 hours 80 kms or 12 hours 120 km respectively
}
Response:
A sample response is given below.
Important points:
- Possible values for “carType” are 'hatchback', 'sedan', 'innova', 'crysta', 'suv',
'tempo_12', 'tempo_12_ac', 'tempo_15', 'tempo_25'.
- Possible value for “fareType” are ‘2_20’,‘4_40’, ‘8_80’, ‘12_120’
- carrierCharges means charges for Add-on service ‘Assured luggage space
(either carrier or boot space)’ i.e. the add-on service assures that either cab
will have boot space e.g. petrol / diesel cars or it will have carrier e.g. in
CNG cars.
- petCharges means charges for Add-on service ‘Pet Allowed’.
{
"details": {
"cityId": “8c058ffa-0419-4aff-b194-e1ef5abaf6ff”,
"departureAt": "09/02/2022 20:00",
"fareType": "8_80",
"terms": [
"Vehicle and fuel charges included",
"Driver Night Charges included",
“For Round trip bookings, all the local sightseeing in the destination cities is
included except for Sikkim and Darjeeling. For local sightseeing in Pickup city (if
required), please add all the Pickup city stops in itinerary.”
"Included Kilometers will start from pickup location",
“Kilometers will count from pickup location to pickup location”,
"Driver allowance includes driver's stay, food and night charges",
"Toll and state tax extra. Customer need to pay directly as per actuals.",
"Parking charges extra if applicable. Customer need to pay directly as per
actuals",
"Extra Kms and Extra hours charge, if any, needs to be paid by Customer
directly to the driver",
"AC will remain switch off in hill areas",
"Rohtang Pass needs special permit and is not included in any trip"
],
“cancellationPolicy”: “If driver / car details are not assigned at time of
cancellation then No cancellation charge will be levied on you. If driver / car
details are already assigned at time of cancellation then 20% of booking amount
will be deducted as cancellation charges.”
},
"fareChart": [
{
"carId": "f5d5db79-ea08-4740-8ff0-b8368c6fbe24",
"carType": "sedan",
"estimatedPrice": 5000,
"estimatedGst": 250,
"extraKmPricePerKm": 9,
"extraHourPricePerHr": 200,
“carrierChargesWithoutGst”: 500,
“carrierCharges”: 525,
“carrierText”: “Assured luggage space (either carrier or boot space) for Rs.
525”,
“petChargesWithoutGst”: 800,
“petCharges”: 840,
“petText”: “Pet Allowed for Rs. 840”
},
{
"carId": "0788e276-ba8e-42a9-b1cd-0e82fe1fb023",
"carType": "suv",
"estimatedPrice": 6500,
"estimatedGst": 325,
"extraKmPricePerKm": 12,
"extraHourPricePerHr": 200,
“carrierChargesWithoutGst”: 500,
“carrierCharges”: 525,
“carrierText”: “Assured luggage space (either carrier or boot space) for Rs.
525”,
“petChargesWithoutGst”: 1000,
“petCharges”: 1050,
“petText”: “Pet Allowed for Rs. 1050”
}
]
}

6. Get Cities for Airport transfers


Description: This API provides the list of all the cities / destinations for airport transfer cab from /
to an airport. It will be used to populate the destination city drop-down for airport transfer.

URL: /airport/destination
Method: GET
Parameters:
key=<your API key>
airportId=<as received from Get Airports for Airport transfer API>
fareType=<either “from-airport” or “to-airport”>
Response:
[“Delhi”, “Gurgaon”, “Noida”, “Faridabad”, “Ghaziabad”, “Greater Noida”]

7. Get Prices for Airport transfers


Description: This API provides the prices of all car types available for airport
transfers for given airport, destination and fare type.

URL: /fare/airport
Method: POST
Parameters:
{
“key”: <your API key>,
“departureAt”: Trip start datetime in IST (Indian Standard Time) in format DD/MM/YYYY
HH:mm e.g. 05/11/2021 20:30 for November 5, 2021, 8:30 pm.
“airportId”: <as received from Get Airport for Airport transfers API>
“destinationCity”: <as received from Get Cities for Airport transfers API>
“fareType”: <either “from-airport” or “to-airport”>
}
Response:
A sample response is given below.
Important points:
- Possible values for “carType” are 'hatchback', 'sedan', 'innova', 'crysta', 'suv',
'tempo_12', 'tempo_12_ac', 'tempo_15', 'tempo_25'.
- Possible value for “fareType” are ‘from-airport’, ‘to-airport’
- “isFixedRoute”: true means Toll tax / State tax is included in price otherwise
it's extra.
- carrierCharges means charges for Add-on service ‘Assured luggage space
(either carrier or boot space)’ i.e. the add-on service assures that either cab
will have boot space e.g. petrol / diesel cars or it will have carrier e.g. in
CNG cars.
- petCharges means charges for Add-on service ‘Pet Allowed’.
{
"details": {
"airportId": “8c058ffa-0419-4aff-b194-e1ef5abaf6ff”,
“destinationCity”: “Delhi”,
"departureAt": "09/02/2022 20:00",
"fareType": "from-airport",
"isFixedRoute": true,
"terms": [
"Vehicle and fuel charges included",
"Driver Night Charges included",
"Toll and state tax included”,
"Parking charges extra if applicable. Customer need to pay directly as per
actuals",
"Included Kilometers will start from pickup location",
"Extra Kms and Extra hours charge, if any, needs to be paid by Customer
directly to the driver",
"AC will remain switch off in hill areas"
],
“cancellationPolicy”: “If driver / car details are not assigned at time of
cancellation then No cancellation charge will be levied on you. If driver / car
details are already assigned at time of cancellation then 20% of booking amount
will be deducted as cancellation charges.”
},
"fareChart": [
{
"carId": "f5d5db79-ea08-4740-8ff0-b8368c6fbe24",
"carType": "sedan",
“includedKm”: 20,
"estimatedPrice": 1000,
"estimatedGst": 50,
"extraKmPricePerKm": 20,
“carrierChargesWithoutGst”: 100,
“carrierCharges”: 105,
“carrierText”: “Assured luggage space (either carrier or boot space) for Rs.
105”,
“petChargesWithoutGst”: 800,
“petCharges”: 840,
“petText”: “Pet Allowed for Rs. 840”
},
{
"carId": "0788e276-ba8e-42a9-b1cd-0e82fe1fb023",
"carType": "suv",
“includedKm”: 20,
"estimatedPrice": 1500,
"estimatedGst": 75,
"extraKmPricePerKm": 25,
“carrierChargesWithoutGst”: 100,
“carrierCharges”: 105,
“carrierText”: “Assured luggage space (either carrier or boot space) for Rs.
105”,
“petChargesWithoutGst”: 1000,
“petCharges”: 1050,
“petText”: “Pet Allowed for Rs. 1050”
}
]
}

8. Initiate Booking
Description: This API creates the cab booking with “paymentStatus” as “pending”.
It must be called after the user clicks on the ‘Payment’ button. It will validate
everything, calculate prices and return the booking object. The total of
“estimatedPrice” + “estimatedGst” should be charged to the customer. API will
throw an error if wallet balance is less than the amount to be deducted.

URL: /booking/initiate
Method: POST
Parameters:
{
“key”: <your API key>,
“tripType”: <either ‘outstation’ or ‘local’ or ‘airport’>,
“departureAt”: Trip start datetime in IST (Indian Standard Time) in format DD/MM/YYYY
HH:mm e.g. 05/11/2021 20:30 for November 5, 2021, 8:30 pm.
“isReturn”: true or false. If trip is round trip then true else false. It should be sent for
Outstation cab booking only i.e. tripType ‘outstation’.
“arrivalAt”: Trip end date in IST (Indian Standard Time) in format DD/MM/YYYY e.g.
05/11/2021 for November 5, 2021. This field is only required for round trip i.e. isReturn – true.
Please note its date only and not time. It should be sent for Outstation cab booking only i.e.
tripType ‘outstation’.
“Itinerary”: <as received from Get Prices for Outstation cab API>. It should be sent for
Outstation cab booking only i.e. tripType ‘outstation’.,
“carId”: <as received from Get Prices API(s)>,
“customerName”: <Name of customer>,
“customerCountryCode”: <STD / ISD country code e.g. ‘91’ for India, ‘1’ for USA. Do not
prepend ‘+’ or ‘0’ before the code>
“customerPhone”: Phone number of customer. Do not add country code to this. Should
be only numeric digits. For India, it must be 10 digit valid phone number,
“customerEmail”: Email id of customer,
“completePickupAddress”: Pickup address (optional field),
“billingName”: Optional billing info if invoice needed in different name.
“gstNumber”: Optional billing info,
“carrierRequired”: true or false. if customer buy “Assured Luggage Space” add-on
service then it is true otherwise false,
“petRequired”: true or false. if customer buy “Pet Allowed” add-on service then it is true
otherwise false.
}
Response:
A sample response is given below.
{
"bookingId": 452,
"user": {
"name": "xxxx",
“countryCode”: “91”,
"phone": "xxxxxxxxxx",
"email": "[email protected]"
},
"travelAgency": { <= will be updated by webhook
"name": "",
"phone": "",
"email": ""
},
"driver": { <= will be updated by webhook
"name": "",
"phone": "",
"email": ""
},
"car": { <= will be updated by webhook
"registrationNumber": "",
"brandName": "",
"carName": ""
},
“tripType”: “outstation”,
“cityId”: “xxxx”,
“fareType”: “8_80”,
“airportId”: “xxxxx”,
“destinationCity”: “Delhi”,
“airportFareType”: “from-airport”,
“completePickupAddress”: “xxxx”,
"carType": "sedan",
"itinerary": [
{
"address": "Delhi, India",
"location": {
"lat": 28.7040592,
"lng": 77.10249019999999
}
},
{
"address": "Chandigarh, India",
"location": {
"lat": 30.7333148,
"lng": 76.7794179
}
}
],
"isReturn": false,
"departureAt": "09/02/2022 20:00",
"arrivalAt": null,
"includedKm": 265,
“isFixedRoute”: true,
"extraKmPricePerKm": 9,
“extraHourPricePerHr”: null,
"estimatedGst": 120,
"estimatedPrice": 2400,
“carrierRequired”: true,
“carrierChargesIncludedInPrice”: 150,
“petRequired”: true,
“petChargesIncludedInPrice”: 800,
"finalGst": 0, <= will be updated by webhook
"finalPrice": 0, <= will be updated by webhook
"taxType": "IGST (5%)",
"extraKm": 0, <= will be updated by webhook
"extraHrs": 0, <= will be updated by webhook
"extraDays": 0, <= will be updated by webhook
“billingInformation”: {“gstNumber”: null, “name”: null},
"status": "booked",
“paymentStatus”: “pending”,
"createdAt": "09/02/2022 13:00",
"cancelledAt": null, <= will be updated by webhook
“completedAt”: null <= will be updated by webhook
}
The booking object fields are explained below:
Field Description

bookingId Unique Id for every cab booking

user > name Customer name

user > countryCode STD / ISD code for customer phone. Only digits. Do
not prepend ‘+’ or zeros.

user > phone Customer phone. Only digits. For India i.e.
countryCode ‘91’, it should be 10 digit number >
6000000000

user > email Customer email

travelAgency > name Name of cab operator. Operator details will be


provided through Webhook when the cab/driver is
assigned to booking.

travelAgency > phone Phone of cab operator. 10 digit number.

travelAgency > email Email of cab operator

driver > name Driver name. Driver details will be provided through
Webhook when the cab/driver is assigned to booking.

driver > phone Driver phone number. 10 digit number.

driver > email Driver email

car > Assigned cab registration number. Car details will be


registrationNumber provided through Webhook when the cab/driver is
assigned to booking.

car > brandName Car brand e.g. Toyota

car > carName Car name e.g. Innova

tripType Either ‘outstation’ or ‘local’ or ‘airport’. It tells


whether the booking is for Outstation cab or Local car
rental or Airport transfer.

cityId City Id of Local car rental city. It is relevant for Local


car rental booking only i.e. tripType=local.

fareType Local car rental package. Either ‘2_20’ or ‘4_40’ or


‘8_80’ or ‘12_120’ for 2 hours 20km or 4 hours 40km,
8 hour 80km, 12 hours 120km respectively. It is
relevant for Local car rental booking only i.e.
tripType=local.

airportId Airport Id for Airport transfer. It is relevant for Airport


transfer booking only i.e. tripType=airport.

destinationCity Destination city from / to Airport. It is relevant for


Airport transfer booking only i.e. tripType=airport.

airportFareType Either ‘from-airport’ or ‘to-airport’. It is relevant for


Airport transfer booking only i.e. tripType=airport.

completePickupAddress Full Pickup address provided by customer. It is an


optional field.

carType Either of 'hatchback', 'sedan', 'innova', 'crysta', 'suv',


'tempo_12', 'tempo_12_ac', 'tempo_15', 'tempo_25'

itinerary Itinerary for Outstation cab. It is relevant for


Outstation cab booking only i.e. tripType=outstation.

isReturn true or false. It is true for Round trip and false for One
way trip. It is relevant for Outstation cab booking only
i.e. tripType=outstation.

departureAt Departure datetime in IST (Indian Standard Time) in


format DD/MM/YYYY HH:mm e.g. 05/11/2021 20:30
for November 5, 2021, 8:30 pm.
arrivalAt Trip end date in IST (Indian Standard Time) in format
DD/MM/YYYY e.g. 05/11/2021 for November 5, 2021.
Please note its date only and not time. It is relevant
for Outstation cab Round trip booking only i.e.
tripType=outstation and isReturn=true.

includedKm Number of Kms included in the booking price

isFixedRoute true or false. True means Toll tax and State tax are
included in the price. False means it's extra.

extraKmPricePerKm Price for extra kms over and above includedKm. E.g. if
includedKm = 250 and actually the cab runs 270km
then 20km is extra and it will be charged based on
this per km price. Customers need to pay the extra km
charge directly to the driver.

extraHourPricePerHr Price for extra hours for Local car rental. It is relevant
for Local car rental booking only i.e. tripType=local.

estimatedPrice Price for the booking. It includes the price for the
add-on service too, if applicable.

estimatedGst GST for the booking.

carrierRequired true or false. True if the customer opted for Assured


Luggage space add-on service.

carrierChargesIncludedI The price for Assured Luggage space add-on service


nPrice excluding GST. This price is for reference only. It is
already added to the estimatedPrice.

petRequired true or false. True if the customer opted for Pet


Allowed add-on service.
petChargesIncludedInPri The price for Pet Allowed add-on service excluding
ce GST. This price is for reference only. It is already
added to the estimatedPrice.

finalPrice Price after completion of trip. It includes any extra km


price as reported by the driver. It is mainly used for
invoice purposes.

finalGst GST after completion of trip. It includes any extra km


price as reported by the driver. It is mainly used for
invoice purposes.

taxType IGST or SGST. Field is for internal use.

extraKm Extra kms reported by driver at completion of trip.


E.g. if includedKm = 250 and actually the cab runs
270km then 20km is extra.

extraHrs Extra hours reported by driver for Local car rental at


completion of trip. It is relevant for Local car rental
booking only i.e. tripType=local.

extraDays Field is for internal use and rarely used for invoice
purposes.

billingInformation Billing information provided by the customer. It is an


optional field if a customer wants a different billing
name or wants to include the customer's GST number
in invoice.

status Either ‘booked’ or ‘completed’ or ‘cancelled’

paymentStatus Either ‘pending’ or ‘success’


createdAt Booking creation time in IST (Indian Standard Time) in
format DD/MM/YYYY HH:mm e.g. 05/11/2021 20:30
for November 5, 2021, 8:30 pm.

cancelledAt Cancellation time in IST (Indian Standard Time) in


format DD/MM/YYYY HH:mm e.g. 05/11/2021 20:30
for November 5, 2021, 8:30 pm.

completedAt Trip completion time in IST (Indian Standard Time) in


format DD/MM/YYYY HH:mm e.g. 05/11/2021 20:30
for November 5, 2021, 8:30 pm. This is the time when
Operator marks the booking as complete. It may be
after the actual trip completion.

9. Confirm Booking
Description: This API confirms the cab booking with “paymentStatus” as “success”.
It must be called after payment is received. It will deduct the payment from the
wallet and confirm the booking. API will throw an error if wallet balance is less
than the amount to be deducted.

URL: /booking/confirm
Method: POST
Parameters:
{
“key”: <your API key>,
“bookingId”: <as received from Initiate Booking API>
}
Response:
{
"bookingId": 452,
"paymentStatus": “success”
}

10. Webhook
Description: Please update Webhook URL in the Partner portal. A POST request,
with booking object JSON in body, will be sent to this Webhook URL whenever car
and driver is assigned / changed / removed for a booking or booking status change
to ‘completed’ and extra km may or may not have been incurred. The webhook
URL should simply send a response “OK”. Partners are advised to mandatorily
provide the Webhook URL because otherwise they will not get the information of
car and driver assigned for booking in real time. Although it can be checked at
Partner portal or can be retrieved through Get booking details API at any point of
time. You can also provide a Webhook Key (optional) on the Partner portal. This
key will be sent in every request to Webhook URL and you can validate it for
security.

URL: <configured in Partner portal>


Method: POST
Parameters:
{
“webhookKey”: <webhookKey updated by you at Partner Portal>,
…..<all booking object fields as given in Initiate Booking API>
}

11. Cancel Booking


Description: This API cancels the booking. The cancellation charge will be
deducted as per cancellation policy for the booking. It returns the amount to be
refunded to the customer. The booking amount will be credited back to the wallet
after deducting cancellation charge and adjusting the commission paid for the
booking.

URL: /booking/cancel
Method: POST
Parameters:
{
“key”: <your API key>,
“bookingId”: <bookingId>
}
Response:
{
"refund": 2040
}

12. Get Booking details


Description: This API is to fetch booking details at any point of time.

URL: /booking/:bookingId?key=<your API key>


(replace “:bookingId” with the bookingId which you want to fetch)
Method: GET
Parameters:
key=<your API key>,
Response: (same as Initiate Booking API)
{
<all booking object fields as given in Initiate Booking API>
}

For Meta-Search Engines only


13. Get Redirect URL for Cab booking
Description: If you are integrating API as meta-search engine i.e. you want to show
the cab prices at your site and then redirect the customer to CabBazar website for
booking the cab, then you need to use this API to get the redirect URL to open
same search result on cabbazar website.

URL: /lead
Method: POST
Parameters:
{
“key”: <your API key>,
“tripType”: <either ‘outstation’ or ‘local’ or ‘airport’>,
“departureAt”: Trip start datetime in IST (Indian Standard Time) in format DD/MM/YYYY
HH:mm e.g. 05/11/2021 20:30 for November 5, 2021, 8:30 pm.
“isReturn”: true or false. If trip is round trip then true else false. It should be sent for
Outstation cab booking only i.e. tripType ‘outstation’.
“arrivalAt”: Trip end date in IST (Indian Standard Time) in format DD/MM/YYYY e.g.
05/11/2021 for November 5, 2021. This field is only required for round trip i.e. isReturn – true.
Please note its date only and not time. It should be sent for Outstation cab booking only i.e.
tripType ‘outstation’.
“Itinerary”: <as received from Get Prices for Outstation cab API>. It should be sent for
Outstation cab booking only i.e. tripType ‘outstation’.,
“cityId”: <as received from Get Cities for Local car rental API>. It should be sent for Local
car rental booking only i.e. tripType ‘local’.
“airportId”: <as received from Get Airport for Airport transfers API>. It should be sent for
Local car rental booking only i.e. tripType ‘airport’.
“destinationCity”: <as received from Get Cities for Airport transfers API>. It should be
sent for Local car rental booking only i.e. tripType ‘airport’.
“fareType”: <either ‘2_20’,‘4_40’, ‘8_80’ or ‘12_120’ for tripType=’local’. Either
“from-airport” or “to-airport” for tripType=’airport’>
}
Response:
{
“redirectUrl”: “https://cabbazar.com/prices?enquiry=51cb8af0-9d90-44d2-b2f0-3c6ee”
}

You might also like