API Request & Response Format
Type Format Details
Test URL
http://staging.makruzz.com/booking_api/
Request
{data:{all post data},username:"",password:""}
data will contain all the post data of the form in a key value pair
Response
{data:{all response},msg:"",code:""}
data will contain all the response of the request in a key value pair
msg will have the response messages from the server
code will have the codes related to the responses





Login
URL Request Response Validation
login

                                    {"data":{"username":"your username","password":"your password"}}
                                

{"data":{"token":"encryted token"},"msg":"Succeffully Login","code":"200"}
username - Required(Makruzz agent's username)
password - Required (Makruzz agent's password)
Get All Sectors
** You will received a token from successfully login response in json. You have to pass token in every request in http header with name "Mak_Authorization".
Ex - Mak_Authorization: received_token
URL Request Response Validation
get_sectors

{"data":[{"id":"1","title":"Port Blair","code":"PB"},{"id":"2","title":"Swaraj Deep(Havelock) ","code":"SW(HL)"},{"id":"3","title":"Shaheed Deep(Neil island) ","code":"SH(NL)"},{"id":"4","title":"Baratang","code":"BT"}],"msg":"Sectors Successfully listed","code":"200"}
Schedule Search
** You will received a token from successfully login response in json. You have to pass token in every request in http header with name "Mak_Authorization".
Ex - Mak_Authorization: received_token
URL Request Response Validation
schedule_search

{"data":{"trip_type":"single_trip","from_location":"1","travel_date":"2019-01-30","no_of_passenger":"1","to_location":"2"}}

{"data": [{"id": "222","source_location_id": "1","destination_location_id": "2","departure_time": "08:00:00","arrival_time": "09:45:00","from_date": "2018-11-01","to_date": "2019-03-31","booking_start_date": "2018-11-01","booking_end_date": "2019-03-31","ticket_code": "A412","schedule_type": "1","ship_id": "5","is_active": "Y","is_deleted": "N","display_name": "MAK 1","source_name": "Port Blair","destination_name": "Havelock","ship_title": "Makruzz","ship_class_title": "Premium","total_seat": "192","ship_class_id": "17","meal_description": "","meal_price": "","is_meal": "N","ship_class_price": "600","seat": 192}],"msg": "Schedules Succeffully Fetched","code": "200"}
trip_type - Required
from_location - Required
to_location - Required
travel_date - Required
no_of_passengers - Required | Integer
Schedule Search Between Dates
** You will received a token from successfully login response in json. You have to pass token in every request in http header with name "Mak_Authorization".
Ex - Mak_Authorization: received_token
URL Request Response Validation
schedule_search_range

{"data": {"2022-12-25": [{"id": "600","source_location_id": "1","destination_location_id": "2","departure_time": "08:00:00","arrival_time": "09:30:00","from_date": "2022-09-23","to_date": "2024-03-31","booking_start_date": "2022-09-01","booking_end_date": "2024-03-31","ticket_code": "A412","schedule_type": "1","ship_id": "4","is_active": "Y","is_deleted": "N","display_name": "MAK 2","is_package": "N","source_name": "Port Blair","destination_name": "Swaraj Dweep  (Havelock) ","ship_title": "Makruzz Gold","ship_class_title": "Premium","total_seat": "251","ship_class_id": "14","meal_description": "","meal_price": "","is_meal": "N","ship_class_price": "1525","via": "","seat": 251,}]},"msg": "Schedules Succeffully Fetched","code": "200"}
trip_type - Required
from_location - Required
to_location - Required
travel_date_from - Required
travel_date_to - Required
no_of_passengers - Required | Integer
Booking Data Form
** You will received a token from successfully login response in json. You have to pass token in every request in http header with name "Mak_Authorization".
Ex - Mak_Authorization: received_token
URL Request Response Validation
get_passenger_details

 {"data":{"schedule_id":"222","travel_date":"2019-01-30","class_id":"17"}}

 {"data":"","msg":"Schedule Successfully selected","code":"200"}
schedule_id - Required
travel_date - Required
class_id - Required
Passenger Save
** You have to pass token in http header with name "Mak_Authorization".
Ex - Mak_Authorization: received_token
URL Request Response Validation
savePassengers

                                    {"data":{"passenger":{"1":{"title":"MR","name":"test","age":"44","sex":"male","nationality":"indian","fcountry":"","fpassport":"","fexpdate":""}},"c_name":"test","c_mobile":"1234567890","c_email":"test@test.com","p_contact":"123456","c_remark":"test","no_of_passenger":"1","schedule_id":"5","travel_date":"2017-05-06","class_id":"1","fare":"1000"}}
                                

{"data":{"booking_id":55,"schedule_id":"5","class_id":"1","travel_date":"2017-05-06"},"msg":"Passenger Details Saved","code":"200"}
title - Required
name - Required
age - Required | Integer
sex - Required
nationality - Required
c_name - Required
c_mobile - Required | Integer
c_email - Required | Email
p_contact - Required
no_of_passenger - Required | Integer
schedule_id - Required | Integer
travel_date - Required | Date | YYYY-MM-DD
class_id - Required | Integer
fare - Required | Numeric

If Nationality will foreigner, below three fields will require
fcountry - Required
fpassport - Required
fexpdate - Required | Date | YYYY-MM-DD
Confirm Booking
** You have to pass token in http header with name "Mak_Authorization".
Ex - Mak_Authorization: received_token
URL Request Response Validation
confirm_booking

                                    {"data":{"booking_id":"304"}}
                                

 {"data":{"pnr":"XFAVSB"},"msg":"PNR Successfully Generated","code":"200"}
booking_id - Required | Integer
Confirm Booking
** You have to pass token in http header with name "Mak_Authorization".
Ex - Mak_Authorization: received_token
URL Request Response Validation
confirm_booking_v2

                                    {"data":{"booking_id": [934,935]}}
                                

 {"data":[{"order_id":934,"pnr":"FSFBWH","status":"success"},{"order_id":935,"pnr":"GVBHJK","status":"success"}],"msg":"PNR Status","code":"200"}
booking_id - Required | array
Print Ticket
** You have to pass token in http header with name "Mak_Authorization".
Ex - Mak_Authorization: received_token
URL Request Response Validation
print_ticket

{"data":{"ticket_pnr":"NKHDKN"}}

{"data":{"journey_and_schedule_info":{"pnr":"UDYTAP","booking_id":"333","date_of_booking":"2019-01-28 16:41:49","date_of_journey":"2019-01-31","schedule_id":"222","email":"at@makruzz.com","mobile_no":"9804782569","p_contact":"123","login_location_id":"1","remark":"kol","name":"Andaman Tour","phone_no":null,"ship_class_title":"Premium","payment_mode":"Cash","login_location_name":"Office","source":"Port Blair","destination":"Havelock","journey_ship":"Makruzz","display_name":"MAK 1","ticket_code":"A412","departure_time":"08:00:00","arrival_time":"09:45:00","passengers":[{"id":"510","title":"MR","name":"test","age":"123","gender":"male","fare":"600","psf":"50","cgst":"54.00","ugst":"54.00","nationality":"indian","country":"","passport":"","is_cancelled":"N","is_void":"N"}]},"booking_issued_by":"Xgenmedia Test Agent"},"msg":"Ticket Successfully Generated","code":"200"}
ticket_pnr - Required
Cancel Booking
** You have to pass token in http header with name "Mak_Authorization".
Ex - Mak_Authorization: received_token
URL Request Response Validation
booking_cancel

                                    {"data":{"pnr":"XPNLPR"}}
                                

 {"data":{"pnr":"XPNLPR","passenger_details":[{"id":"1829","name":"Yash Gupta","age":"30","gender":"male"},{"id":"1830","name":"Rohit Sharma","age":"35","gender":"male"}]},"msg":"Passengers Successfully listed","code":"200"}
pnr - Required | String
Cancel Booking Confirm
** You have to pass token in http header with name "Mak_Authorization".
Ex - Mak_Authorization: received_token
URL Request Response Validation
booking_cancel_confirm

                                    {"data":{"pnr":"XPNLPR", "passenger_id":[1829,1830], "reason": "Due to medical emergency"}}
                                

 {"data":{"pnr":"XPNLPR","passengers_id":[1829,1830]},"msg":"Booking cancelled Successfully","code":"200"}
pnr - Required | String
passengers_id - Required | array
reason - Required | String
Agent Transaction Report
** You have to pass token in http header with name "Mak_Authorization".
Ex - Mak_Authorization: received_token
URL Request Response Validation
transaction_report

                                    {"data":{"from_date":"2022-01-01","to_date":"2022-08-09"}}
                                

 {"data":{"agent_profile":{"name":"Xgenmedia Tours and
exploration","agent_code":"MAK00345"},"date_range":{"from_date":"2022-08-01","to_date":"2022-08-09"},"balance_summary":{"opening_balance":"201195.39","closing_balance":"196897.89","available_balance":"196897.89"},"transaction":{"booking":[{"tran_date":"2022-08-02
17:45:23","description":"TRAVEL","travel_date":"2022-08-04","pnr":"VSZDOF","passenger_name":"MR Mahavishnup
Pugh","is_cancelled":"N","is_void":"N","source":"Port Blair","destination":"Swaraj Deep(Havelock)
","class":"Premium","ticket_number":"A412-4700","fare":"-1200.00","meal":"0.00","commission":"240.00","tds":"-9.00","charges":null},{"tran_date":"2022-08-02
18:07:01","description":"TRAVEL","travel_date":"2022-08-04","pnr":"NKREOE","passenger_name":"MR
Mahavishnup","is_cancelled":"N","is_void":"N","source":"Port Blair","destination":"Swaraj Deep(Havelock)
","class":"Deluxe","ticket_number":"A412-4703","fare":"-1800.00","meal":"0.00","commission":"360.00","tds":"-13.50","charges":null},{"tran_date":"2022-08-02
18:25:05","description":"TRAVEL","travel_date":"2022-08-04","pnr":"WXDZTB","passenger_name":"MR Kiona
Chandler","is_cancelled":"N","is_void":"N","source":"Port Blair","destination":"Swaraj Deep(Havelock)
","class":"Premium","ticket_number":"A412-4705","fare":"-1200.00","meal":"0.00","commission":"240.00","tds":"-9.00","charges":null}],"cancellation_n_void":[],"payment":[]}},"msg":"Transaction
Report Successfully Generated","code":"200"}
from_date - Required | Date (yyyy-mm-dd)
to_date - Required | Date (yyyy-mm-dd)
Wallet Balance
** You have to pass token in http header with name "Mak_Authorization".
Ex - Mak_Authorization: received_token
URL METHOD Request Response Validation
wallet_balance POST

{"data":{"amount":"498491.75"},"msg":"Wallet balance Succeffully Fetched","code":"200"}