X

Developers

Purpose of this document:

This guide is a technical reference intended for application developers who need to integrate with the StayPlanet API

API Parameters:

1. Find Property  

API will display all available properties.

 

Method

URL

POST

api/find_property/
Example: https://www.stayplanet.com/api/find_property?email=test@stayplanet.com&api_key= 12eb9c-e3a195-c2a144-4f543e-ed0356&location=Florida&token_id= a15781-cb0461-d5a143-af8e94-4f557f

Parameter

Description

email

User’s Email

Required ? Yes

Type : enum

Password

User’s Password

Required? Yes

api_key

Users API key

Required? yes

token_id

User’s token id

Required? Yes

location

Location for search (i.e. Florida)

Required? yes

URL : https://www.stayplanet.com/api/find_property?email=test@stayplanet.com&api_key=12eb9c-e3a195-c2a144-4f543e-ed0356&location=Florida&token_id=a15781-cb0461-d5a143-af8e94-4f557f

Response:

Status

Response

25%

Response will be an object containing the list of properties (array)

as well as the updated recipe database. Each item in the recipe array has the following structure.

{"response":[{"0":"Orlando","address":"Orlando","1":"Orlando","city":"Orlando","2":"Florida","state":"Florida","3":"United States of America","country":"United States of America","4":"Villa close to Disney!! Wonderful !","product_title":"Villa close to Disney!! Wonderful!","5":"159.00","price":"159.00"}]}

2. Find a Property listing  

API will display all available properties.

Method

URL

POST/GET


Example: https://www.stayplanet.com/api/propertyDetails?email=test@stayplanet.com&api_key=12eb9c-e3a195-c2a144-4f543e-ed0356&property_id=364&token_id=a15781-cb0461-d5a143-af8e94-4f557f

Parameter

Description

email

User’s Email

Required ? Yes

Type : enum

Password

User’s Password

Required? Yes

api_key

Users API key

Required? yes

token_id

User’s token id

Required? Yes

peoperty_id

Property ID of an existing listing

Required? yes

URL : https://www.stayplanet.com/api/propertyDetails?email=test@stayplanet.com&api_key=12eb9c-e3a195-c2a144-4f543e-ed0356&property_id=364&token_id=a15781-cb0461-d5a143-af8e94-4f557f

Response:

Status

Response

200

Response will be an object containing the the details of the property,with relevant information of its booking status (array)

{"Status":"True","Message":"result","result":{"0":null,"booking_id":null,"1":null,"owner_id":null,"2":null,"property_id":null,"3":null,"booking_date":null,"4":null,"booking_userid":null,"5":null,"check_in":null,"6":null,"check_out":null,"7":null,"nights":null,"8":null,"room_rate":null,"9":null,"currency_code":null,"10":null,"booking_status":null,"11":null,"total":null,"12":null,"guest_name":null,"13":null,"address":null,"14":null,"email":null,"15":null,"phone":null,"16":"Big Villa in Miami","product_title":"Big Villa in Miami","17":"Apartment","property_type":"Apartment","18":"Private Room","room_type":"Private Room","19":"1","accommodates":"1","20":"","bedrooms":"","21":"","beds":"","22":"","noofbathrooms":"","23":"","property_city":"","24":"","bed_type":"","25":"0","minimum_stay":"0","26":"10","security_deposit":"10","27":"no","instantbook":"no","28":"Alex","user_name":"Alex","29":"tjax78@gmail.com","host_email":"tjax78@gmail.com","30":"","host_phone":"","31":"","s_address":"","32":"","s_city":"","33":"","s_district":"","34":"","s_state":"","35":"","s_country":"","36":"0","s_postal_code":"0","37":"Alex","firstname":"Alex","38":"Benford","lastname":"Benford"}}

How to use:

1. Create Account on stay Planet

2. Login to your account

3. Go to Account Setting

4. Find auto generated API key and token ID

5. Apply the API key and token ID in your API request

6. It will return the results

7. Developer can use this result to get the desired information

Connecting with outside provider e.g. Channel Manager:
Using this API means communicating with StayPlanet DB there’s no way to directly communicate to other third party API using StayPlanet API to show results. It can only be used to display the requested data from StayPlanet db. In case StayPlanet want to display the combined results from Chanel Manager API + StayPlanet API then it is required that Stay planet is first integrated with Chanel manager API to show the combined results when requested. The request will first store the response at StayPlanet side and then can be updated in DB and can be interacted with the result shown by StayPlanet API

General Data flow and API working:

1. Developer requesting info via StayPlanet API

2. StayPlanet authenticate the request with account authentication Key

3. StayPlanet validate the data input for place, date, time etc.

4. StayPlanet store the parameters sent via API request in our Db

5. StayPlanet initiate search result request based on those parameters in our DB

6. StayPlanet initiate request to fetch results from Chanel manager (Future upgrade)

7. Based on query and data available for particular request we return the value in JSON format that can be used by anyone know their websites.

The request will first store the response at StayPlanet side and then can be updated in DB and can be interacted with the result shown by StayPlanet API

Results = StayPlanet Data + Response received from Chanel manager API data (If integrated).