To work with the MotoPress Hotel Booking REST API, you must go through authentication.
The following authentication methods are supported:
Basic AuthOAuth 1
To authenticate, you are required to have two access tokens:
consumer_keyconsumer_secret
You can create access tokens in the administrator dashboard: Accommodation > Settings > Advanced
In the REST API responses, you can see response-related links. For the better REST API usability and performance, some links can be embeddable resources.
To get an extended response with embedded resources in the request, add the GET parameter _embed.
Specify the list of IDs required for embedding links separated by commas.
Or add _embed = true to embed all related resources.
- Follow this link and click the
Start Free Trialbutton to create your demo site. - Confirm the creation of your site via email.
- Log in to your demo.
- Create access tokens in the administration dashboard: Accommodation > Settings > Advanced.
- Navigate to Hotel Booking REST API documentation.
- Fill in the
demo-idfield using a part of URL value of your created demo site.
For example if your demo URL is hbdemo.getmotopress.com/z8p5rxxxx7xfeck/wp-admin, thendemo-idisz8p5rxxxx7xfeck. - To log in, click the
Authorizebutton and use theconsumer_keyandconsumer_secretcredentials.