katanox / katanox-php
The official PHP SDK of the Katanox APIs
v3.6.0
2024-03-05 12:43 UTC
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
README
Katanox PHP SDK
Welcome to the official PHP SDK of the Katanox API. You can simply install the SDK using Composer and after providing your API key you can start calling the API.
Make sure you create a Travel Seller account at the Katanox Platform first so that you can receive a sandbox API key.
Install
Via Composer
$ composer require katanox/katanox-php
Manual Installation
Download the files and include autoload.php
:
<?php require_once('/path/to/Katanox/vendor/autoload.php');
API Endpoints
All URIs are relative to https://api.katanox.com/v2
Class | Method | HTTP request | Description |
---|---|---|---|
AvailabilityApi | getAvailableProperties | GET /availability | Retrieve the list of available properties |
BookingsApi | cancelBookingById | DELETE /bookings/{booking_id} | Cancel a booking |
BookingsApi | cancelReservation | DELETE /bookings/{booking_id}/reservations/{reservation_id} | Cancel a reservation |
BookingsApi | createBooking | POST /bookings | Create a booking |
BookingsApi | createReservation | POST /bookings/{booking_id}/reservations | Create a reservation |
BookingsApi | getBookingById | GET /bookings/{booking_id} | Retrieve a booking |
BookingsApi | getReservationById | GET /bookings/{booking_id}/reservations/{reservation_id} | Retrieve a reservation by id |
BookingsApi | updateReservation | PUT /bookings/{booking_id}/reservations/{reservation_id} | Update a reservation |
OfferApi | offerRefresh | POST /offers/{offer_id}/refresh | Refresh an offer |
OfferApi | offerValidate | GET /offers/{offer_id} | Retrieve an offer |
PropertiesApi | getProperties | GET /properties | Retrieve the list of contracted properties |
PropertiesApi | getPropertyById | GET /properties/{id} | Retrieve a property by id |
PropertiesApi | getRateplanById | GET /properties/{property_id}/rate-plans/{id} | Retrieve a rate plan by id |
PropertiesApi | getUnitById | GET /properties/{property_id}/units/{id} | Retrieve a unit by id |
Models
- AvailabilityAvailabilityAndPrice
- AvailabilityExtraCharge
- AvailabilityOffer
- AvailabilityPrice
- DtoAmenity
- DtoBedType
- DtoCancellationPolicy
- DtoCreatedBooking
- DtoCreatedReservation
- DtoFacility
- DtoI18NProperty
- DtoI18NRatePlan
- DtoI18NUnit
- DtoNoShowPolicy
- DtoPayment
- DtoPerson
- DtoPrice
- DtoProperty
- DtoPropertyImage
- DtoRatePlan
- DtoRatePlanService
- DtoReservation
- DtoUnit
- DtoUnitImage
- GeopointGeoPoint
- HttpBookingAndReservationLinks
- HttpBookingCreationRequest
- HttpBookingData
- HttpBookingResponse
- HttpPayment
- HttpPerson
- HttpReservationCreationRequest
- HttpReservationData
- HttpReservationResponse
- HttpReservationUpdateRequest
- ModelAmenity
- ModelApiError
- ModelBedType
- ModelGetAvailabilityResponse
- ModelGetPropertiesResponse
- ModelGetPropertyByIdResponse
- ModelGetRatePlanByIdResponse
- ModelGetUnitByIdResponse
- ModelI18NUnit
- ModelInternalServerError
- ModelLink
- ModelOffersData
- ModelPage
- ModelPropertiesData
- ModelPropertiesMeta
- ModelPropertyData
- ModelUnit
- ModelUnitImage
- OfferGetOfferResponse
Tests
To run the tests, use:
composer install vendor/bin/phpunit
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
2.0
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen