Guestcentric API documentation

Index

Overview

This API implements a REST interface to Guestcentric web-services. The exposed methods should be called via HTTP POST methods, and should get a JSON document in return.

All API methods are called via unencrypted HTTP (port 80), with the exception of the booking method, that goes through ssl HTTPS (port 443).

All methods should be authenticated via a "key" parameter (please request your private key from support@guestcentric.com).

Note: The API expects all data to be UTF-8 encoded.

How to use it

Use the api endpoint followed by the method path to issue a POST request (ie: http://api.guestcentric.net/example/test).

curl http://api.guestcentric.net/example/test -d key=your_api_key
{"error":false,"response":"ok"}

Note: The "key" field parameter is mandatory in every request.

The method should return a json structure with the result. This structure consists in:

All the examples in this documentation are using json as the output format, this is the default format.
If you prefer, you might receive the output in either XML or PHP (serialized array) format. You just need to pass an (optional) parameter "format".

curl http://api.guestcentric.net/example/test -d key=your_api_key -d format=xml

or

curl http://api.guestcentric.net/example/test -d key=your_api_key -d format=php
		

Return:

<?xml version="1.0"?>
<gc><response>ok</response><error></error></gc>

and

a:3:{s:8:"response";s:2:"ok";s:4:"time";s:6:"0.004s";s:5:"error";b:0;}
		

Methods

Global methods

These methods return global values to use with the api.

Hotel methods (single hotel)

Note: Every method on this namespace expects a mandatory hotelId argument.

Hotels methods

Secure methods

All API methods in this namespace are called via encrypted HTTPS (port 443).

The API endpoint for these methods should be https://secure.guestcentric.net/api/secure/