PHPackages                             tourware/sdk-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. tourware/sdk-php

ActiveLibrary[API Development](/categories/api)

tourware/sdk-php
================

PHP SDK for the flowcore API.

v0.7.0(3mo ago)04.6kMITPHPPHP ^7.3|^8.0

Since Oct 7Pushed 3mo ago4 watchersCompare

[ Source](https://github.com/tourware/sdk-php)[ Packagist](https://packagist.org/packages/tourware/sdk-php)[ Docs](https://github.com/tourware/sdk-php)[ RSS](/packages/tourware-sdk-php/feed)WikiDiscussions develop Synced yesterday

READMEChangelog (10)Dependencies (16)Versions (24)Used By (0)

tourware PHP SDK 🚀
==================

[](#tourware-php-sdk-)

**Official PHP client for the tourware REST API**

[![Latest Version on Packagist](https://camo.githubusercontent.com/adecfe0a26ab6c31790eaf8d6fdecfbc91ee2ca282ea6b1bea49c32198abbfd9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f7572776172652f73646b2d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourware/sdk-php)
[![Total Downloads](https://camo.githubusercontent.com/e5fe953098181cdc2e779f7d0c2d2405db7d8c03c89ad4fae2355d6ae709160f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f7572776172652f73646b2d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourware/sdk-php)
[![License: MIT](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](./LICENSE)

The **tourware PHP SDK** provides a clean, consistent, and extensible PHP interface to the tourware REST API.
It simplifies authentication, querying, filtering, pagination, and interaction with all tourware resources such as Travels, Bookings, Customers, and more.

The SDK is designed for **modern PHP applications**, including Laravel and Symfony, but works with any PSR-4 compatible project.

---

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require tourware/sdk-php
```

Load the package:

```
require 'vendor/autoload.php';
```

---

🚀 Quick Start
-------------

[](#-quick-start)

```
use tourware\Client;

// Create a client for the flowcore API (staging by default)
$client = Client::create(
    xApiKey: 'YOUR_X_API_KEY'
);

// Production:
$prodClient = Client::create(
    xApiKey: 'YOUR_X_API_KEY',
    staging: false
);

// Example: Fetch a travel record
$travel = $client->travels()->find('60feacb365f5f1002750c2b2');
```

---

🧭 Working With Entities
-----------------------

[](#-working-with-entities)

Each API resource has a dedicated client.

### Accessing entities:

[](#accessing-entities)

```
$client->travel()->find('id');
$client->booking()->list();
$client->customer()->create([...]);
```

### Using entity classes:

[](#using-entity-classes)

```
use tourware\Entities\Travel;

$travel = $client->entity(new Travel)->find('id');
```

### Raw access:

[](#raw-access)

```
$travel = $client->raw('travels')->find('id');
```

---

🔍 Query Builder
---------------

[](#-query-builder)

The SDK includes a fluent query builder.

```
$travels = $client
    ->travel()
    ->query()
    ->filter('title')->contains('Kenya')
    ->filter('price.adult')->gte(1500)
    ->sort('updatedAt')->desc()
    ->offset(0)
    ->limit(20)
    ->get();
```

### Dot-notation access:

[](#dot-notation-access)

```
$title = $travels->get('records.0.title');
$firstName = $travels->get('records.0.responsibleUser.firstname');
```

---

💥 CRUD Operations
-----------------

[](#-crud-operations)

### Create

[](#create)

```
$client->travel()->create([
    'title' => 'New Travel Package',
]);
```

### Read

[](#read)

```
$client->travel()->find('id');
```

### Update

[](#update)

```
$client->travel()->update('id', [
    'title' => 'Updated Title',
]);
```

### Delete

[](#delete)

```
$client->travel()->delete('id');
```

### List

[](#list)

```
$client->travel()->list(offset: 0, limit: 50);
```

---

⚙️ Custom Requests
------------------

[](#️-custom-requests)

```
$response = $client
    ->custom("/relations/getRelations/travels/bba0b42e4699", method: 'GET')
    ->call();
```

---

🛡️ Error Handling
-----------------

[](#️-error-handling)

```
try {
    $travel = $client->travel()->find('id');
} catch (\tourware\Exceptions\ApiException $e) {
    echo "API Error: " . $e->getMessage();
} catch (\Exception $e) {
    echo "General Error: " . $e->getMessage();
}
```

---

🧪 Testing
---------

[](#-testing)

```
composer test
```

---

🎯 Best Practices
----------------

[](#-best-practices)

- Store API keys in environment variables
- Prefer Query Builder over raw endpoints
- Wrap API calls in `try/catch`
- Log API requests and responses
- Keep SDK updated regularly

---

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome!
Please check the `CONTRIBUTING.md` and `CODE_OF_CONDUCT.md` before submitting a PR.

---

🔒 Security
----------

[](#-security)

If you discover a security vulnerability, please email:

****

Do not create public issues for security topics.

---

📜 Changelog
-----------

[](#-changelog)

See:
[CHANGELOG.md](./CHANGELOG.md)

---

🧑‍💻 Maintainers &amp; Credits
-----------------------------

[](#‍-maintainers--credits)

- Official maintainers from tourware
- Community contributors

Licensed under **MIT License**.

---

🌟 Why Use This SDK?
-------------------

[](#-why-use-this-sdk)

- Clean &amp; intuitive API
- Fully PSR-4 compliant
- Flexible Query Builder
- Supports all tourware endpoints
- Ideal for Laravel, Symfony &amp; general PHP apps
- Built for tour operators, DMCs and travel platforms

> “This SDK gives you a modern, stable, and scalable foundation for any tourware integration — from small tools to full enterprise platforms.”

---

🚀 Happy Coding!
---------------

[](#-happy-coding)

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance81

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~81 days

Recently: every ~313 days

Total

21

Last Release

102d ago

PHP version history (3 changes)v0.1.0PHP ^8.0

v0.2.0PHP ^7.4

v0.2.2PHP ^7.3|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11969458?v=4)[tourware](/maintainers/tourware)[@tourware](https://github.com/tourware)

---

Top Contributors

[![philsturgeon](https://avatars.githubusercontent.com/u/67381?v=4)](https://github.com/philsturgeon "philsturgeon (49 commits)")[![nicoorfi](https://avatars.githubusercontent.com/u/15706832?v=4)](https://github.com/nicoorfi "nicoorfi (44 commits)")[![frankdejonge](https://avatars.githubusercontent.com/u/534693?v=4)](https://github.com/frankdejonge "frankdejonge (38 commits)")[![ravage84](https://avatars.githubusercontent.com/u/625761?v=4)](https://github.com/ravage84 "ravage84 (10 commits)")[![vbarzana](https://avatars.githubusercontent.com/u/3055285?v=4)](https://github.com/vbarzana "vbarzana (10 commits)")[![gmponos](https://avatars.githubusercontent.com/u/5675248?v=4)](https://github.com/gmponos "gmponos (10 commits)")[![jotaelesalinas](https://avatars.githubusercontent.com/u/2042875?v=4)](https://github.com/jotaelesalinas "jotaelesalinas (8 commits)")[![RobLoach](https://avatars.githubusercontent.com/u/25086?v=4)](https://github.com/RobLoach "RobLoach (7 commits)")[![colinodell](https://avatars.githubusercontent.com/u/202034?v=4)](https://github.com/colinodell "colinodell (7 commits)")[![hansott](https://avatars.githubusercontent.com/u/3886384?v=4)](https://github.com/hansott "hansott (7 commits)")[![itmsh](https://avatars.githubusercontent.com/u/9166075?v=4)](https://github.com/itmsh "itmsh (5 commits)")[![reinink](https://avatars.githubusercontent.com/u/882133?v=4)](https://github.com/reinink "reinink (5 commits)")[![bcrowe](https://avatars.githubusercontent.com/u/752603?v=4)](https://github.com/bcrowe "bcrowe (5 commits)")[![browner12](https://avatars.githubusercontent.com/u/5232313?v=4)](https://github.com/browner12 "browner12 (5 commits)")[![EmanueleMinotto](https://avatars.githubusercontent.com/u/417201?v=4)](https://github.com/EmanueleMinotto "EmanueleMinotto (5 commits)")[![marcqualie](https://avatars.githubusercontent.com/u/101022?v=4)](https://github.com/marcqualie "marcqualie (4 commits)")[![hassankhan](https://avatars.githubusercontent.com/u/1781985?v=4)](https://github.com/hassankhan "hassankhan (3 commits)")[![fulldecent](https://avatars.githubusercontent.com/u/382183?v=4)](https://github.com/fulldecent "fulldecent (3 commits)")[![jclyons52](https://avatars.githubusercontent.com/u/6395559?v=4)](https://github.com/jclyons52 "jclyons52 (3 commits)")[![kdubuc](https://avatars.githubusercontent.com/u/895661?v=4)](https://github.com/kdubuc "kdubuc (2 commits)")

---

Tags

phppublicsdk-phpsdk-phptourware

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tourware-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/tourware-sdk-php/health.svg)](https://phpackages.com/packages/tourware-sdk-php)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1943.1k5](/packages/aimeos-prisma)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
