PHPackages                             yourtransfer24/yt24-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. [HTTP &amp; Networking](/categories/http)
4. /
5. yourtransfer24/yt24-sdk-php

ActiveLibrary[HTTP &amp; Networking](/categories/http)

yourtransfer24/yt24-sdk-php
===========================

Official PHP SDK for the YourTransfer24 REST JSON API Platform.

1.0.0(5mo ago)01MITPHPPHP &gt;=7.4

Since Nov 18Pushed 3mo agoCompare

[ Source](https://github.com/YourTransfer24/yt24-sdk-php)[ Packagist](https://packagist.org/packages/yourtransfer24/yt24-sdk-php)[ Docs](https://yourtransfer24.com)[ RSS](/packages/yourtransfer24-yt24-sdk-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

yt24-sdk-php
============

[](#yt24-sdk-php)

Official PHP SDK for the YourTransfer24 REST JSON API Platform. Provides clean access to authentication, profile data, bookings, booking confirmation, booking status, availability checks, quotes, vehicles, companies, coverage, and logs. Fully aligned with the official YourTransfer24 API documentation.

---

Installation
------------

[](#installation)

```
composer require yourtransfer24/yt24-sdk-php

```

---

Initialization
--------------

[](#initialization)

```

use YT24SDK\YT24Client;
use YT24SDK\ProfileAPI;
use YT24SDK\BookingsAPI;
use YT24SDK\AvailabilityAPI;
use YT24SDK\QuoteAPI;
use YT24SDK\VehiclesAPI;
use YT24SDK\CompaniesAPI;
use YT24SDK\CoverageAPI;
use YT24SDK\LogsAPI;

$client = new YT24Client("YOUR_API_KEY", "sandbox");

// Instantiate endpoints
$profile = new ProfileAPI($client);
$bookings = new BookingsAPI($client);
$availability = new AvailabilityAPI($client);
$quote = new QuoteAPI($client);
$vehicles = new VehiclesAPI($client);
$companies = new CompaniesAPI($client);
$coverage = new CoverageAPI($client);
$logs = new LogsAPI($client);

```

---

API Usage
---------

[](#api-usage)

### 1. Profile

[](#1-profile)

```

// Get profile
$data = $profile->getProfile();

// Update profile
$profile->updateProfile([
    "first_name" => "John",
    "last_name" => "Doe"
]);

```

### 2. Bookings

[](#2-bookings)

#### Create, Retrieve, List, Confirm, Update Status

[](#create-retrieve-list-confirm-update-status)

```

// List bookings
$bookings->list();

// With filters
$bookings->list(["limit" => 20, "page" => 2]);

// Retrieve a booking
$bookings->get(123);

// Create booking (Full Real Payload Example)
$bookings->create([
    "pickup_location" => "Airport",
    "dropoff_location" => "Hotel",
    "date" => "2025-01-20",
    "passengers" => 3,
    "luggage" => 2,
    "vehicle_type" => "Sedan",
    "flight_number" => "AA123",
    "arrival_time" => "14:30",
    "child_seats" => 1,
    "notes" => "Customer prefers front seat",
    "customer" => [
        "first_name" => "John",
        "last_name" => "Doe",
        "email" => "john@example.com",
        "phone" => "+18095551234"
    ]
]);

// Confirm a booking
$bookings->confirm(123);

// Update booking status
$bookings->updateStatus(123, ["status" => "confirmed"]);

```

### 3. Availability

[](#3-availability)

```

$availability->check([
    "pickup_location" => "Airport",
    "dropoff_location" => "Hotel",
    "date" => "2025-01-20"
]);

```

### 4. Quote

[](#4-quote)

```

$quote->getQuote([
    "pickup_location" => "Airport",
    "dropoff_location" => "Hotel",
    "passengers" => 2
]);

```

### 5. Vehicles

[](#5-vehicles)

```

// List vehicles
$vehicles->list();

// Vehicle details
$vehicles->get(5);

```

### 6. Companies

[](#6-companies)

```

// Company list
$companies->list();

// Company details
$companies->get(12);

```

### 7. Coverage

[](#7-coverage)

```

// Get operating zones and coverage areas
$coverage->list();

```

### 8. Logs

[](#8-logs)

```

// Logs filtering example
$logs->list(["booking_id" => 123]);

```

---

Error Handling
--------------

[](#error-handling)

YourTransfer24 API returns strict structured JSON errors:

```
{
  "error": true,
  "type": "validation_error",
  "message": "Pickup location is required",
  "err_key": "YT24_400_01"
}

```

### Capturing Errors

[](#capturing-errors)

```

try {
    $bookings->create([]);
} catch (Exception $err) {
    echo $err->status;   // HTTP status code
    echo $err->err_key;  // API error code
    echo $err->getMessage(); // Error message
}

```

The SDK does not modify, alter, wrap, or transform errors — they are returned exactly as provided by the YourTransfer24 API.

---

Project Structure
-----------------

[](#project-structure)

```

yt24-sdk-php/
│── README.md
│── LICENSE
│── composer.json
└── src/
    ├── YT24Client.php
    ├── ProfileAPI.php
    ├── BookingsAPI.php
    ├── AvailabilityAPI.php
    ├── QuoteAPI.php
    ├── VehiclesAPI.php
    ├── CompaniesAPI.php
    ├── CoverageAPI.php
    ├── LogsAPI.php

```

---

License
-------

[](#license)

MIT License © YourTransfer24

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance80

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 88.2% of commits — single point of failure

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

Unknown

Total

1

Last Release

171d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/244501963?v=4)[apisupport-yt24](/maintainers/apisupport-yt24)[@apisupport-yt24](https://github.com/apisupport-yt24)

---

Top Contributors

[![alaindiego-yt24](https://avatars.githubusercontent.com/u/244191617?v=4)](https://github.com/alaindiego-yt24 "alaindiego-yt24 (15 commits)")[![apisupport-yt24](https://avatars.githubusercontent.com/u/244501963?v=4)](https://github.com/apisupport-yt24 "apisupport-yt24 (2 commits)")

---

Tags

apisdkrestphp-sdkbookingtraveltransportationyourtransfer24

### Embed Badge

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

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

###  Alternatives

[xeroapi/xero-php-oauth2

Xero official PHP SDK for oAuth2 generated with OpenAPI spec 3

1054.3M14](/packages/xeroapi-xero-php-oauth2)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34170.2k2](/packages/onesignal-onesignal-php-api)[ory/hydra-client

Documentation for all of Ory Hydra's APIs.

17435.9k](/packages/ory-hydra-client)[zenditplatform/zendit-php-sdk

PHP client for Zendit API

1204.3k](/packages/zenditplatform-zendit-php-sdk)[huaweicloud/huaweicloud-sdk-php

Huawei Cloud SDK for PHP

1829.2k2](/packages/huaweicloud-huaweicloud-sdk-php)[ory/hydra-client-php

Documentation for all of Ory Hydra's APIs.

1710.8k](/packages/ory-hydra-client-php)

PHPackages © 2026

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