Hapio Logo

Hapio’s SDK

Simplifying integration with the Booking and Scheduling API

Visit Github

Streamline the integration of Hapio’s robust booking and scheduling capabilities

The Hapio SDK for PHP allows you to easily interact with the Hapio API for bookings and scheduling when using the PHP programming language.

Read more

System Requirements

Before getting started with the Hapio SDK for PHP, developers should ensure that their environment meets the following requirements:
PHP 8.2 or later.

Getting Started

Integrating the Hapio SDK into a PHP project is a straightforward process. Developers can utilize Composer, a popular PHP dependency manager, to include the SDK in their project.

Working with the SDK

Utilizing the Hapio SDK for PHP is as simple as instantiating an API client and getting to work.

Documentation and Models

The Hapio SDK for PHP offers comprehensive documentation and includes various models to interact with the Hapio API efficiently.

Getting started

The easiest way to install the Hapio SDK is by using Composer to require the package in your project.

To use the SDK in your project you simply instantiate an API client, and then get to work:

Visit Github

composer require hapio/hapio-sdk-php

// Require the Composer autoloader
require __DIR__ . '/vendor/autoload.php';

use Hapio\Sdk\ApiClient;

// Instantiate a Hapio API client
$apiClient = new ApiClient('your-api-token');

// Get a list of all bookings this week
$response = $apiClient->bookings()->list([
    'from' => new DateTime('monday this week 00:00:00'),
    'to' => new DateTime('friday this week 23:59:59'),
]);

while ($response) {
    foreach ($response->getItems() as $booking) {
        var_dump($booking);
    }

    if ($response->hasMoreItems()) {
        $response = $response->getNextPage();
    } else {
        $response = null;
    }
}

Frequently asked questions

If you have other questions don’t hesitate to contact us.

Contact us

The Hapio SDK is a tool designed to simplify integration with the Booking and Scheduling API, specifically catering to PHP projects. It allows easy interaction with the Hapio API for bookings and scheduling.

Currently, the Hapio SDK is specifically designed for PHP. However, plans are in place to develop SDKs for other programming languages.

For any questions or support needs, you can contact the Hapio team via email at hi@hapio.io. The team is ready to assist with any inquiries you may have.