mariot V1.2
POST
login
https://mariot.technoarray.com/api/login
User can login to api using there email id and password. If login is successful and json response comes with an bearer tokens. Which will be used for user authantication to access and update user data or to check out the avaliable hotel lists.
BODY raw
{
"email": "admin@test.test",
"password": "techno@123#"
}
Example Request
POST https://mariot.technoarray.com/api/login
{
"email": "admin@test.test",
"password": "techno@123#"
}
Example Response
200 - OK
{
"message": "Login Succesful",
"user_id": "1",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJtYXJpb3QiLCJhdWQiOiIiLCJzdWIiOiJhcGkgYWNjZXNzIiwiaWF0IjoxNjc5NTU5MjM0LCJleHAiOjE2Nzk2NDU2MzQsImVtYWlsIjoiYWRtaW5AdGVzdC50ZXN0In0.6HnLdtg5dJKR0PKI8JG9TXrS7RgPWbb3oFuIQLNuNOc"
}
POST
forget password
https://mariot.technoarray.com/api/forget-password
user’s can search there account by email id .
if email exist in the database an email with containing password reset token is sent.
this token is valid for only 5 min.
BODY raw
{
"email" : ""
}
Example Request
POST https://mariot.technoarray.com/api/forget-password
{
"email" : "ajay@technoarray.com"
}
Example Response
200 - OK
{
"status": 200,
"error": false,
"message": "Email successfully sent",
"data": []
}
POST
validate reset token
https://mariot.technoarray.com/api/validate-reset-token
after user’s get the passwrod reset token they need to type it in the app and to validate the reset token
the request body must contains following fields
reset_token
if provided token is valid then a then user id and a token is recived as response which needs to be send with reset password request.
BODY raw
{
"email" : "",
"reset_token": "2816304"
}
Example Request
POST https://mariot.technoarray.com/api/validate-reset-token
{
"email" : "ajay@technoarray.com",
"reset_token": "6619524"
}
Example Response
200 - OK
{
"status": 200,
"errors": false,
"message": "success",
"data": {
"user_id": "20",
"token": "NjYxOTUyNA=="
}
}
POST
reset password
https://mariot.technoarray.com/api/reset-password
finally user can request to reset his/her password with following fields
user_id
token
new_password
cnew_password
BODY raw
{
"user_id" : 8,
"token" : "MDE5Nzk2NA==",
"new_password": "techno@123#",
"cnew_password": "techno@123#"
}
Example Request
POST https://mariot.technoarray.com/api/reset-password
{
"user_id" : 20,
"token" : "NjYxOTUyNA==",
"new_password": "techno@123#",
"cnew_password": "techno@123#"
}
Example Response
200 - OK
{
"status": 200,
"error": false,
"message": "Password changed successfully"
}
GET
single user
https://mariot.technoarray.com/api/users/17
User’s can check there fields up data by accessing this route. For a successful requrest user must provide a valid access token. and passing his/her id in the request url.
Example Request
GET https://mariot.technoarray.com/api/users/17
Example Response
200 - OK
{
"status": 200,
"error": false,
"message": "Single user",
"data": {
"id": "17",
"name": "James",
"co_applicant": "Jessi",
"children_names": "[\"Edd\",\"Julia\"]",
"email": "james@abc.xyz",
"address": "#125 new street, new york",
"anniversary_date": "2023-03-10 00:00:00",
"membership_number": "1325486",
"membership_tenure": "1200",
"annual_mcos": "0.00",
"last_holiday_used": "5",
"remaining_holidays": "3",
"status": "active",
"type": "customer",
"created_at": "2023-03-23 08:29:15",
"updated_at": "2023-03-23 08:29:15"
}
}
PUT
update single user
https://mariot.technoarray.com/api/users/17
user can update any field given below in example request. With earch update request user must send his/her email id. as emails are unquie.
if user want to update password following fields must be sent.
- old_password
- new_password
- cnew_password
BODY raw
{
"email": "james@abc.xyz",
"name": "James",
"co_applicant": "Jessi",
"childrens": ["Edd","Julia","Anna"],
"address": "#125 new street, new york",
"anniversary_date": "2023-03-10 00:00:00",
"membership_number": "1325486",
"membership_tenure": "1500",
"annual_mcos": "800.00",
"last_holiday_used": "5",
"remaining_holidays": "3",
"old_password": "james@123#",
"new_password": "james@123#",
"cnew_password": "james@123#"
}
Example Request
PUT https://mariot.technoarray.com/api/users/17
{
"email": "james@abc.xyz",
"name": "James",
"co_applicant": "Jessi",
"childrens": ["Edd","Julia","Anna"],
"address": "#125 new street, new york",
"anniversary_date": "2023-03-10 00:00:00",
"membership_number": "1325486",
"membership_tenure": "1500",
"annual_mcos": "800.00",
"last_holiday_used": "5",
"remaining_holidays": "3",
"old_password": "james@123#",
"new_password": "james@123#",
"cnew_password": "james@123#"
}
Example Response
200 - OK
{
"status": 200,
"error": false,
"message": "User Updated Successfully",
"data": {
"id": "17",
"name": "James",
"co_applicant": "Jessi",
"children_names": "[\"Edd\",\"Julia\"]",
"email": "james@abc.xyz",
"address": "#125 new street, new york",
"anniversary_date": "2023-03-10 00:00:00",
"membership_number": "1325486",
"membership_tenure": "1500",
"annual_mcos": "800.00",
"last_holiday_used": "5",
"remaining_holidays": "3",
"status": "active",
"type": "customer",
"created_at": "2023-03-23 08:29:15",
"updated_at": "2023-03-23 08:44:52"
}
}
GET
get all hotel
https://mariot.technoarray.com/api/hotels
This request fetch all the avaliable hotels list.
Example Request
GET https://mariot.technoarray.com/api/hotels
Example Response
200 - OK
{
"status": 200,
"error": false,
"message": "Hotels list",
"data": {
"0": {
"id": "15",
"user_id": "1",
"name": "api hotel 12",
"address": "some address",
"facilities": "[\"Free WIFI\",\"Fitness center\"]",
"images": "[]",
"description": "api test",
"city": "some city",
"state": "some state",
"created_at": "2023-03-15 07:42:28",
"updated_at": "2023-03-15 07:42:28",
"deleted_at": null
},
"1": {
"id": "14",
"user_id": "1",
"name": "api hotel 3 updated",
"address": "some place",
"facilities": "[\"Free WIFI\",\"Free Parking\",\"Spa\"]",
"images": "[\"1678791520_a0bc4fcd2c19bbde3a49.jpg\"]",
"description": "test",
"city": "some city",
"state": "some state",
"created_at": "2023-03-13 12:03:39",
"updated_at": "2023-03-14 11:34:36",
"deleted_at": null
},
"2": {
"id": "5",
"user_id": "1",
"name": "Robert fox",
"address": "adfbjsjhf",
"facilities": "[\"Free WIFI\",\"Free Parking\",\"Cafe\",\"Conference Room\",\"Spa\",\"Poolside bar\",\"Swimming pool\\/ Jacuzzi\",\"Laundry service\",\"Meeting facilities\",\"Fitness center\",\"Room service\"]",
"images": "[\"1678430554_9b44ba8f246151c37086.jpeg\",\"1678430482_d37899aedc349a3208fe.jpeg\"]",
"description": "test",
"city": "ajman",
"state": "Ajman",
"created_at": "2023-03-10 06:41:22",
"updated_at": "2023-03-10 06:42:34",
"deleted_at": null
},
"3": {
"id": "4",
"user_id": "1",
"name": "test hotel",
"address": "",
"facilities": "[\"Free WIFI\",\"Free Parking\",\"Swimming pool\\/ Jacuzzi\",\"Laundry service\",\"Meeting facilities\"]",
"images": "[\"1678430034_44e6d95dbd95bc825fb4.jpg\",\"1678430035_12a3c545f4724f3784e3.webp\"]",
"description": "adsada",
"city": "test city",
"state": "test state",
"created_at": "2023-03-10 06:33:55",
"updated_at": "2023-03-10 06:33:55",
"deleted_at": null
},
"4": {
"id": "3",
"user_id": "1",
"name": "test hotel 2",
"address": "some place ",
"facilities": "[\"Free WIFI\",\"Free Parking\",\"Cafe\",\"Conference Room\",\"Spa\",\"Poolside bar\",\"Swimming pool\\/ Jacuzzi\",\"Laundry service\",\"Meeting facilities\",\"Fitness center\",\"Room service\"]",
"images": "[\"1678358637_da31924387b1d604691f.jpg\",\"1678358571_1d2f1c416b6266a3ea36.jpg\",\"1678358571_8c9edfcaa93d8c684342.webp\"]",
"description": "this is description",
"city": "test city",
"state": "test state",
"created_at": "2023-03-09 09:50:54",
"updated_at": "2023-03-10 05:56:54",
"deleted_at": null
},
"imageUrl": "https://mariot.technoarray.com/uploads/hotel/%7Bimage%7D",
"pages": {
"pageUrl": "https://mariot.technoarray.com/api/hotel?page=1",
"currentPage": 1,
"totalPage": 1
}
}
}
GET
single hotel
https://mariot.technoarray.com/api/hotels/15
This request fetches single hotel detail who’s id is passed into the url
Example Request
GET https://mariot.technoarray.com/api/hotels/15
Example Response
200 - OK
{
"status": 200,
"error": false,
"message": "Single hotel",
"data": {
"0": {
"id": "15",
"user_id": "1",
"name": "api hotel 12",
"address": "some address",
"facilities": "[\"Free WIFI\",\"Fitness center\"]",
"images": "[]",
"description": "api test",
"city": "some city",
"state": "some state",
"created_at": "2023-03-15 07:42:28",
"updated_at": "2023-03-15 07:42:28",
"deleted_at": null
},
"imageUrl": "https://mariot.technoarray.com/uploads/hotel/%7Bimage%7D"
}
}
GET
filter hotels
https://mariot.technoarray.com/api/hotels/filter/{category}/{city}
city is an optional parameter.
Example Request
GET https://mariot.technoarray.com/api/hotels/filter/domestic
Example Response
200 - OK
{
"status": 200,
"error": false,
"message": "Hotels list",
"data": {
"0": {
"id": "15",
"user_id": "1",
"name": "api hotel 12",
"address": "some address",
"facilities": "[\"Free WIFI\",\"Fitness center\"]",
"images": "[]",
"description": "api test",
"city": "some city",
"state": "some state",
"created_at": "2023-03-15 07:42:28",
"updated_at": "2023-03-15 07:42:28",
"deleted_at": null,
"category": "domestic"
},
"1": {
"id": "14",
"user_id": "1",
"name": "api hotel 3 updated",
"address": "some place",
"facilities": "[\"Free WIFI\",\"Free Parking\",\"Spa\"]",
"images": "[\"1678791520_a0bc4fcd2c19bbde3a49.jpg\"]",
"description": "test",
"city": "some city",
"state": "some state",
"created_at": "2023-03-13 12:03:39",
"updated_at": "2023-03-14 11:34:36",
"deleted_at": null,
"category": "domestic"
},
"2": {
"id": "5",
"user_id": "1",
"name": "Robert fox",
"address": "adfbjsjhf",
"facilities": "[\"Free WIFI\",\"Free Parking\",\"Cafe\",\"Conference Room\",\"Spa\",\"Poolside bar\",\"Swimming pool\\/ Jacuzzi\",\"Laundry service\",\"Meeting facilities\",\"Fitness center\",\"Room service\"]",
"images": "[\"1678430554_9b44ba8f246151c37086.jpeg\",\"1678430482_d37899aedc349a3208fe.jpeg\"]",
"description": "test",
"city": "ajman",
"state": "Ajman",
"created_at": "2023-03-10 06:41:22",
"updated_at": "2023-03-10 06:42:34",
"deleted_at": null,
"category": "domestic"
},
"3": {
"id": "4",
"user_id": "1",
"name": "test hotel",
"address": "",
"facilities": "[\"Free WIFI\",\"Free Parking\",\"Swimming pool\\/ Jacuzzi\",\"Laundry service\",\"Meeting facilities\"]",
"images": "[\"1678430034_44e6d95dbd95bc825fb4.jpg\",\"1678430035_12a3c545f4724f3784e3.webp\"]",
"description": "adsada",
"city": "test city",
"state": "test state",
"created_at": "2023-03-10 06:33:55",
"updated_at": "2023-03-10 06:33:55",
"deleted_at": null,
"category": "domestic"
},
"4": {
"id": "3",
"user_id": "1",
"name": "test hotel 2",
"address": "some place ",
"facilities": "[\"Free WIFI\",\"Free Parking\",\"Cafe\",\"Conference Room\",\"Spa\",\"Poolside bar\",\"Swimming pool\\/ Jacuzzi\",\"Laundry service\",\"Meeting facilities\",\"Fitness center\",\"Room service\"]",
"images": "[\"1678358637_da31924387b1d604691f.jpg\",\"1678358571_1d2f1c416b6266a3ea36.jpg\",\"1678358571_8c9edfcaa93d8c684342.webp\"]",
"description": "this is description",
"city": "test city",
"state": "test state",
"created_at": "2023-03-09 09:50:54",
"updated_at": "2023-03-10 05:56:54",
"deleted_at": null,
"category": "domestic"
},
"imageUrl": "https://mariot.technoarray.com/uploads/hotel/:imageName",
"pages": {
"pageUrl": "https://mariot.technoarray.com/api/hotel?page=1",
"currentPage": 1,
"totalPage": 1
}
}
}
GET
get locations
https://mariot.technoarray.com/api/locations/{category}
Get all cities base on category (domestic/international)
Example Request
GET https://mariot.technoarray.com/api/locations/
Example Response
200 - OK
{
"status": 200,
"error": false,
"message": "list of all cities",
"date": {
"domestic": [
"test city",
"ajman",
"some city"
],
"international": [
"ohaio",
"test city"
]
}
}