PHP code example of evilfreelancer / bookeo-api-php

1. Go to this page and download the library: Download evilfreelancer/bookeo-api-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

evilfreelancer / bookeo-api-php example snippets


$config = new \Bookeo\Config([
    'api_key'    => 'my-api-key',
    'secret_key' => 'my-secret-key'
]);
$bookeo = new \Bookeo\Client($config);

$bookeo = \BookeoApi::getClient();

$bookeo = \BookeoApi::getClient([
    'api_key'    => 'my-api-key',
    'secret_key' => 'my-secret-key'
]);

'providers' => [
    // ...
    Bookeo\Laravel\ClientServiceProvider::class,
],



use \Bookeo\Client;
use \Bookeo\Models\MatchingSlotsSearchParameters;

$bookeo = new Client([
    'secret_key' => 'xxxxxxx',
    'api_key'    => 'xxxxxxxxxxxxxxxx'
]);

$result = $bookeo->availability->slots(null, '2019-09-16T00:00:00Z', '2019-09-18T23:59:59Z')->exec();
print_r($result);

$search = new MatchingSlotsSearchParameters();
$search->productId = 'unique-id-of-product';

$result = (string) $bookeo->availability->matching_slots->search($search)->exec();
print_r($result);

$result = (string) $bookeo->availability->matching_slots('pageNavigationToken', 1)->exec();
print_r($result);