Explore API information in two Checkfront hotels

I want to use the Checkfront API to look for information in two hotels and display the availability results as with the normal API.

I just want to know how to search in two different rooms but both are listed on Checkfront and I have access to their APIs.

Comments

  • Hi kboudrari,

    Thanks for using our forums.

    In order to query a Checkfront account for availability, you would need to have API access credentials for that specific account. This means the only way to query multiple establishments would be if you have acquired credentials for all of those accounts and then connect to each one individually. 

    There is no way to make a single query that would check the availability of multiple Checkfront accounts.

    Please let me know if you have any more questions or feel free to reach out to support@checkfront.com.

    All the best,
    Chase - Checkfront Support Team
  • Hello, 

    Thank you for your time. 

    I correctly have the API access credentials for all of those accounts that I want to connect to it. What I want to have is the PHP request.

    Thank you !
  • Hi kboudrari,

    Thank you for the reply.

    If you have the API credentials to access the Checkfront accounts, then please refer to our API documentation concerning how to connect to the API and submit queries:
    http://api.checkfront.com/index.html

    You can also find our PHP SDK and some sample PHP code here:
    https://github.com/Checkfront/PHP-SDK

    I hope this helps!

    All the best,
    Chase - Checkfront Support Team
  • $this->Checkfront = new Checkfront(
    array 
    (
    'host' => array ('', ''),
        'auth_type' => array ('', ''),
        'api_key' => array ('', ''),
        'api_secret' => array ('', ''),
        'account_id' => array ('', '')
    )

    );
    $this->cart();
    }

    I tried this but is not working
  • Hi kboudrari,

    Are you actually using empty arrays as the values for the 'host', 'auth_type', etc.? These need to be your actual Checkfront API credentials, as 'strings' not 'arrays'.

    But assuming you are passing the correct credentials, then please note that to use the Checkfront() constructor, you would need to include both the CheckfrontAPI class shown here (https://github.com/Checkfront/PHP-SDK/blob/master/lib/CheckfrontAPI.php) and the Checkfront class that extends CheckfrontAPI shown in the Cart example (https://github.com/Checkfront/PHP-SDK/blob/master/examples/cart/Cart.php).

    All the best,
    Chase - Checkfront Support Team
  • Please give me an example of code.
Sign In or Register to comment.