Unboxing our first SDK

After the release of the first version of the Katanox API, we collected feedback from our travel sellers and used it to build our first SDK in PHP

Unboxing our first SDK

Katanox prides itself for delivering a developers' product which enables them to sell travel effortlessly and more efficiently.

Since we launched Katanox, we have been looking up to the likes of Twilio and Stripe because of their great developer experience and tooling around their APIs.

Hence, after the release of the first version of the Katanox API, we collected a lot of feedback from our travel sellers and used it to build our first Software Development Kit (SDK) in PHP.

The benefits of using an SDK are many, but one of the most important is that developers need to spend significantly less time integrating our API and focus more on what matters most for them, delivering unique experience to their clients.

Usage

First of all, you need to install the library in your project using Composer.

composer require katanox/katanox-php

Below you can see how easily you can retrieve available hotels in your location by simply using the AvailabilityResource. Furthermore, since we our API is REST, you can navigate easily to other resources (next/previous pages) with ease, saving you a lot of repeated effort to construct similar queries.

$katanox = new Katanox\KatanoxApi('your-api-key-here', true);
$availabilityResource = $katanox->getAvailabilityResource();

$q = new AvailabilityQuery();
$q->setLat(52.0356)
    ->setLng(4.0913)
    ->setRadius(2000)
    ->setAdults(1)
    ->setChildren(0)
    ->setCheckIn('2021-07-01')
    ->setCheckOut('2021-07-02')
    ->setPage(1)
    ->setLimit(25);

// Get the first page    
$response = $availabilityResource->search($q);
$properties = $response->getData()->getProperties();

// Get the next page
$nextPage = $availabilityResource->next($response);
$properties = $nextPage->getData()->getProperties();
Fetch available properties with pagination

You can find the full documentation of the Katanox PHP SDK in our Github repository.

We cannot wait to see what you will build!