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
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

email

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
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

Example Request
Example Response
200 - OK
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
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
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
                                                
GET https://mariot.technoarray.com/api/hotels/filter/international/ohaio
                                            
Example Response
200 - OK
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
                                                
GET https://mariot.technoarray.com/api/locations/domestic
                                            
Example Response
200 - OK
                                                    
{
    "status": 200,
    "error": false,
    "message": "list of all domestic cities",
    "date": [
        "test city",
        "ajman",
        "some city"
    ]
}