D Hotel Price Comparison API Documentation NAV Navbar
Logo
shell

Introduction

Welcome to Hotel price Comparison API Documentation. Our API is organized around GET Requests. You can use our API to get information for International Hotel Prices in dollars

Authentication

curl --request POST \
  --url 'https://api.makcorps.com/auth' \
  --header 'Content-Type: application/json' \
  --data '{
	"username":"franklin",
	"password":"franklin@123"
}'

JSON Response:

{
"access_token": 

{"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzJ9.eyJpYXQiOjE1MTc2NzczNjAsImlkZW50aXR5IjozLCJuYmYiOjE1MTc2NzczNjAsImV4cCI6MTUxNzY3OTE2MH0.ytSqQj3VDymEaJz9EIdskWELwDQZRD1Dbo6TuHaPz9U"}

You must have an JWT Token to use the API functions. Complete the registration to get your JWT token.

Your JWT token will expire after every 30 min.So, you have to request for new JWT token after every 30 min.Your JWT token must be included in the every request.

API Functions

Price Status

Purpose

Get Live Prices of hotels in different cities.

Request URL

curl --request GET \ --url https://api.makcorps.com/free/city \ --header 'Authorization: JWT jwt_token'

URL Parameters

Parameter Description
city The city name (ex. london)
jwt_token The access token
you can replace "city" with any area of he city restricted to paid users only ex-(https://api.makcorps.com/free/london).
curl --request GET \
  --url https://api.makcorps.com/free/london \
  --header 'Authorization: JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1MTc2NzczNjAsImlkZW50aXR5IjozLCJuYmYiOjE1MTc2NzczNjAsImV4cCI6MTUxNzY3OTE2MH0.ytSqQj3VDymEaJz9EIdskWELwDQZRD1Dbo6TuHaPz9U'

JSON Response:

{
  "comparison":[ ,
  
    {
    "Hotel": Hotel Borobudur Jakarta,
    "vendor 1": Expedia.com US $62,
    "vendor 2": Booking.com US $67,
    "vendor 3": Hotels.com US $63,
    "ratings": 5,
    "best-price": Expedia.com,
    },
    {
    "Hotel": JW Marriott Hotel Jakarta,
    "vendor 1": Expedia.comUS$聽146,
    "vendor 2": "Booking.comUS$聽148",,
    "ratings": "3.2,,
    "best-vendor": "Expedia",
    "vendor 3": Orbitz.com US $147,
    },
    {
    "Hotel": Shangri-La Hotel Jakarta,
    "vendor 1": "Booking.com US $152",,
    "vendor 2": "Expedia.com US $155",,
    "ratings": 4.7,,
    "best-vendor":  "Hotels.com",
    "vendor 3": "Shangri-La.com US $154",
    },
    

Response Codes

The response_code key included in each response contains the status of the result returned.

Codes and their meanings:

Code Description
200 Success.
400 Bad request.A user with that email or username already exists
401 Unauthorized or invalid token.
404 Data couldn’t be loaded on our servers. No data available.
405 Data couldn’t be loaded on our servers. Request couldn’t go through.
500 Unauthorized API Token.
501 Account Expired.
502 Invalid arguments passed.