PHPackages                             felixfever/tripleseat - 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. felixfever/tripleseat

ActiveLibrary[API Development](/categories/api)

felixfever/tripleseat
=====================

Tripleseat API interface for PHP 8

1.0.5(4d ago)033MITPHPPHP &gt;=8

Since Feb 23Pushed 2y agoCompare

[ Source](https://github.com/FelixFever/tripleseat-php)[ Packagist](https://packagist.org/packages/felixfever/tripleseat)[ RSS](/packages/felixfever-tripleseat/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (20)Versions (7)Used By (0)

PHP wrapper for Tripleseat API
==============================

[](#php-wrapper-for-tripleseat-api)

A simple PHP wrapper around [Tripleseat's API](https://support.tripleseat.com/hc/en-us/sections/200821727-Tripleseat-API).

Requires at least PHP 8

Until v1 there may be backward incompatible changes with every minor version (0.x).

### How is this fork different

[](#how-is-this-fork-different)

- Compatible with PHP 8
- Adds a method to get total page count to make it possible to build a pager.

### Getting started

[](#getting-started)

First, create a new instance of the Tripleseat client and provide the API keys for authentication.

```
$ composer require bonroyage/tripleseat
```

```
use Tripleseat\Tripleseat;

$tripleseat = new Tripleseat([
    'api_key' => '',
    'secret_key' => '',
    'public_key' => ''
]);
```

#### API keys

[](#api-keys)

You'll need to attain your Tripleseat account's API keys. These can be found by logging in to your Tripleseat account and going to Settings -&gt; Tripleseat API.

There is a public and secret key that is used for the majority of the API calls. These values are configured as the `api_key` and `secret_key` respectively.

A second public key is shown separately and is used for some lead operations. This is configured as `public_key`.

### Services

[](#services)

The following services are supported

ServiceDocumentationSchemaAccount[Tripleseat documentation](https://support.tripleseat.com/hc/en-us/articles/212528547-Accounts-API)[Schema](http://api.tripleseat.com/v1/account_schema.json)Booking[Tripleseat documentation](https://support.tripleseat.com/hc/en-us/articles/212528827-Bookings-API)[Schema](http://api.tripleseat.com/v1/booking_schema.json)Contact[Tripleseat documentation](https://support.tripleseat.com/hc/en-us/articles/211858578-Contacts-API)[Schema](http://api.tripleseat.com/v1/contact_schema.json)Event[Tripleseat documentation](https://support.tripleseat.com/hc/en-us/articles/212171807-Events-API)[Schema](http://api.tripleseat.com/v1/event_schema.json)Lead[Tripleseat documentation](https://support.tripleseat.com/hc/en-us/articles/212528787-Leads-API)[Schema](http://api.tripleseat.com/v1/lead_schema.json)Location[Tripleseat documentation](https://support.tripleseat.com/hc/en-us/articles/212570457-Locations-API)[Schema](http://api.tripleseat.com/v1/location_schema.json)Site[Tripleseat documentation](https://support.tripleseat.com/hc/en-us/articles/212912147-Sites-API)[Schema](http://api.tripleseat.com/v1/site_schema.json)User[Tripleseat documentation](https://support.tripleseat.com/hc/en-us/articles/212567567-Users-API)[Schema](http://api.tripleseat.com/v1/user_schema.json)### Sites

[](#sites)

> A site represents a group of venues. Sites can have multiple locations.

You will most likely only need to retrieve or alter data for a single site, this is also enforced by Tripleseat. For example, you cannot create a contact that belongs to an account in a different site.

An `InvalidSite` exception will be thrown if the site is not in the list of sites that your API keys give you access to.

```
// Create a new client for Site with ID 1
$mySite = $tripleseat[1];

// Search accounts in this site
$mySite->account->search(['query' => 'tripleseat']);

// is the same as
$tripleseat->account->search(['query' => 'tripleseat', 'site_id' => 1]);
```

#### What does it do in the background?

[](#what-does-it-do-in-the-background)

When you call an offset on the Tripleseat class, it first checks that the site ID is returned by the sites endpoint and then created a new instance of the Tripleseat class with the `site_id` passed as additional property in the `$auth` array.

Every request made with through this class will have `site_id` added to the query parameters of each request.

```
$sites = $tripleseat->site->all();

$mySite = new Tripleseat([
    'api_key' => '',
    'secret_key' => '',
    'public_key' => '',
    'site_id' => 1
]);
```

#### What about endpoints that don't use site\_id?

[](#what-about-endpoints-that-dont-use-site_id)

Endpoints like `site`, `location`, and `user` don't support the `site_id` parameter. They will always return the same result regardless of what site ID is passed.

### `all` and `search` operations

[](#all-and-search-operations)

When querying one of the `all` or `search` endpoints, the client will return a Generator that you can iterate through. These endpoints are paged and return 50 results per page. The client will check the `total_pages` property in the first response and make sure every page gets loaded. The next page will only get loaded once the iterator gets to that point.

Call [`iterator_to_array` (?)](https://www.php.net/manual/en/function.iterator-to-array.php) to convert the Generator to an array and load all pages immediately.

Additionally, you may provide a `$firstPage` or `$untilPage` on these operations to change from which page on and/or until which page the data should be loaded (provided it's less than the total number of pages).

Note: The `site` and `location` services are not paged and do not feature the `$firstPage` or `$untilPage` arguments.

```
$bookings = $tripleseat->booking->search([
    'query' => 'Birthday',
    'order' => 'created_by'
]);

foreach($bookings as $booking) {
    // do something with $booking
}

// convert from Generator to array
$bookingsArray = iterator_to_array($bookings);
```

### `count` operation

[](#count-operation)

For services that return a Generator for paginated results a method exists to get the total number of pages.

```
$pageCount = $tripleseat->lead->pageCount();
```

### Other operations

[](#other-operations)

Service`get(id)``create(payload)``update(id, payload)``delete(id)`Account✅✅✅✅Booking✅✅✅✅Contact✅✅✅✅Event✅✅✅✅Lead✅✅ [(?)](https://support.tripleseat.com/hc/en-us/articles/205161948-Lead-Form-API-endpoint)❌✅Location❌❌❌❌Site❌❌❌❌User✅❌❌❌```
$user = $tripleseat->user->get(1);

$tripleseat->lead->create([
    'first_name' => 'john',
    'last_name' => 'doe',
    'email_address' => 'johndoe@example.com',
    'phone_number' => '123-123-1234',
    'company' => 'Example Inc.',
    'event_description' => 'the event desc',
    'event_date' => '11/19/2020',
    'start_time' => '3pm',
    'end_time' => '5pm',
    'guest_count' => '50',
    'additional_information' => 'some more info',
    'location_id' => '1',
]);

$leadForms = $tripleseat->lead->forms();
```

#### Create and update payloads

[](#create-and-update-payloads)

Pass in the actual payload and the client will automatically wrap this with the correct key for the type. You can also provide an array with the payload already wrapped, this will not be wrapped again.

```
// Calling ...
$tripleseat->contact->create([
    'account_id' => '',
    'first_name' => 'John',
    'last_name' => 'Doe',
    'email_addresses' => [
        [
            'address' => 'johndoe@example.com'
        ]
    ]
]);

// will send the request as ...

[
    'contact' => [
        'account_id' => '',
        'first_name' => 'John',
        'last_name' => 'Doe',
        'email_addresses' => [
            [
                'address' => 'johndoe@example.com'
            ]
        ]
    ]
]
```

### Exceptions

[](#exceptions)

All exceptions thrown by this library implement the `Tripleseat\Exceptions\TripleseatException` interface.

### HTTP Client Compatibilities

[](#http-client-compatibilities)

You could use any [PSR-18](https://www.php-fig.org/psr/psr-18/) compatible client to use with this library. No additional configurations are required. A list of compatible HTTP clients and client adapters can be found at [php-http.org](http://docs.php-http.org/en/latest/clients.html).

```
$httpClient = // some class implementing Psr\Http\Client\ClientInterface
$tripleseat = new Tripleseat($auth, $httpClient);
```

###  Health Score

31

↑

LowBetter than 66% of packages

Maintenance55

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

Every ~171 days

Recently: every ~214 days

Total

6

Last Release

4d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c559925007a298236e7062d74dfcc69d40c7d3b371256d3473431b66a4cc4480?d=identicon)[FelixFever](/maintainers/FelixFever)

---

Top Contributors

[![bonroyage](https://avatars.githubusercontent.com/u/4411748?v=4)](https://github.com/bonroyage "bonroyage (9 commits)")[![dahousecat](https://avatars.githubusercontent.com/u/3747820?v=4)](https://github.com/dahousecat "dahousecat (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/felixfever-tripleseat/health.svg)

```
[![Health](https://phpackages.com/badges/felixfever-tripleseat/health.svg)](https://phpackages.com/packages/felixfever-tripleseat)
```

###  Alternatives

[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

1003.9M50](/packages/getbrevo-brevo-php)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)[florianv/exchanger

PHP exchange rate provider layer for currency conversion: 30+ services, chain fallback, and caching.

1865.0M20](/packages/florianv-exchanger)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

758.5M9](/packages/chargebee-chargebee-php)[razorpay/ifsc

Razorpay IFSC Codes Library

385205.4k](/packages/razorpay-ifsc)

PHPackages © 2026

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