PHPackages                             housemates/connect-api - 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. housemates/connect-api

ActiveLibrary

housemates/connect-api
======================

Housemate connect API php client

0.8(2y ago)029MITPHPPHP ^7.4|^8.0

Since Jul 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Housemates-Team/connect-api-php-sdk)[ Packagist](https://packagist.org/packages/housemates/connect-api)[ Docs](https://github.com/housemates/connect-api)[ RSS](/packages/housemates-connect-api/feed)WikiDiscussions development Synced 1mo ago

READMEChangelog (8)Dependencies (2)Versions (10)Used By (0)

Housemates Connect API
======================

[](#housemates-connect-api)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3f8715b5a4afb019d816e494dd7fa90bd16dcb0fc8244473a063e5ce64780605/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686f7573656d617465732f636f6e6e6563742d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/housemates/connect-api)[![Total Downloads](https://camo.githubusercontent.com/f892a0d5dd2576e1eecf52ae21a58bcd96c41e6d65faa84ba53ce4181d7e4715/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f686f7573656d617465732f636f6e6e6563742d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/housemates/connect-api)

The Housemates Connect API provides a set of endpoints to access and interact with the Housemates Connect platform. It enables developers to programmatically retrieve property and room information, manage bookings, create enquiries, and obtain various details related to cities and amenities.

Key Features
------------

[](#key-features)

- **Property Management:** Retrieve property listings and details, including amenities, location, and availability.
- **Room Management:** Access room information, including pricing, availability, and booking periods.
- **Booking Operations:** Start and complete the checkout process, including handling payment details and resident information.
- **Enquiry Management:** Create and retrieve enquiries for specific rooms or properties.
- **City Information:** Obtain university information about cities.
- **Amenity Details:** Retrieve a list of available amenities and their descriptions.

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

[](#installation)

You can install the package via composer:

Prerequisites
-------------

[](#prerequisites)

- At least PHP 7.4 installed on your system.
- Housemates Connect API credentials:
    - **Access Token**: `b2fcrSRUV8OsN6Yn79UKGIiGDCLUJtGqEL3m2aO4`
    - **API Partner ID**: `01H0N04529EXND84J5AN2ZH7CX`

```
composer require housemates/connect-api
```

Getting Started
---------------

[](#getting-started)

### Configuration

[](#configuration)

In order to use the Housemates Connect API, you must first configure the package with your API credentials. You can do so as follows;

```
$configuration = new \Housemates\ConnectApi\Configuration();
$configuration
    ->setAccessToken('b2fcrSRUV8OsN6Yn79UKGIiGDCLUJtGqEL3m2aO4')
    ->setApiPartnerId('01H0N04529EXND84J5AN2ZH7CX');

$connectApi = new Housemates\ConnectApi\ApiClient($configuration);
```

You can now use the `$connectApi` instance to access the various endpoints provided by the API.

#### Get Properties

[](#get-properties)

You can get properties by calling the `getProperties` method on the `$connectApi` instance. This method accepts an optional `$query` parameter, which can be used to filter the results. For example, to get properties in Manchester, you can do the following;

```
$filters = new \Housemates\ConnectApi\Filters\PropertyFilter();
$filters->setCityFilter('manchester')
try{
    $results = $connectApi->getProperties($filters);
    print_r($results->getData()->getItems());
} catch (\Exception $e) {
    // Handle exception
}
```

Please refer to the documentation for a full list of available filters.

#### Get Property

[](#get-property)

A single property can be retrieved by calling the `getProperty` method on the `$connectApi` instance. This method accepts a property ID as a parameter. For example, to get the property with ID `01H0N04529EXND84J5AN2ZH7CX`, you can do the following;

```
try{
    $property = $connectApi->getProperty('01H0N04529EXND84J5AN2ZH7CX');
    print_r($property->getData()->getItem());
} catch (\Exception $e) {
    // Handle exception
}
```

#### Get Rooms

[](#get-rooms)

You can get rooms by calling the `getRooms` method on the `$connectApi` instance. This method accepts an optional `$query` parameter, which can be used to filter the results. For example, to get rooms in within a certain price range e.g. £100 to £400, you can do the following;

```
$filters = new \Housemates\ConnectApi\Filters\RoomFilter();
$filters->setPriceRangeFilter('[100,400]'); // Please note that the price range must be in the format [min,max]

try{
    $results = $connectApi->getRooms($filters);
    print_r($results->getData()->getItems());
} catch (\Exception $e) {
    // Handle exception
}
```

If you want to sort the results, you can do so by passing a `Sort` object to the `getRooms` method. For example, to sort the results by price in ascending order, you can do the following;

```
$filters = new \Housemates\ConnectApi\Filters\RoomFilter();
$filters->setPriceRangeFilter('[100,400]'); // Please note that the price range must be in the format [min,max]

$sort = new \Housemates\ConnectApi\Sort();
$sort->setSortBy('price', 'asc');

try{
    $results = $connectApi->getRooms($filters, $sort);
    print_r($results->getData()->getItems());
} catch (\Exception $e) {
    // Handle exception
}
```

#### Get Room

[](#get-room)

To get a single room, you can call the `getRoom` method on the `$connectApi` instance. This method accepts a room ID as a parameter. For example, to get the room with ID `01H0N04529EXND84J5AN2ZH7CX`, you can do the following;

```
try{
    $room = $connectApi->getRoom('01H0N04529EXND84J5AN2ZH7CX');
    print_r($room->getData()->getItem());
} catch (\Exception $e) {
    // Handle exception
}
```

### Get Booking periods for a room

[](#get-booking-periods-for-a-room)

To get booking periods for a room, you can call the `getBookingPeriods` method on the `$connectApi` instance. This method accepts a room ID as a parameter. For example, to get the booking periods for the room with ID `01H0N04529EXND84J5AN2ZH7CX`, you can do the following;

```
try{
    $bookingPeriods = $connectApi->getBookingPeriods('01H0N04529EXND84J5AN2ZH7CX');
    print_r($bookingPeriods->getData()->getItems());
} catch (\Exception $e) {
    // Handle exception
}
```

### Start Checkout

[](#start-checkout)

To start the checkout process, you can call the `startCheckout` method on the `$connectApi` instance. This method accepts a room ID, booking period ID and Operator ID as parameters. For example, to start the checkout process for the room with ID `01H0N7WS7ZN1DGEJFF2C14K8NJ`, you can do the following;

```
$checkoutStartRequest = new \Housemates\ConnectApi\Requests\CheckoutStartRequest();
$checkoutStartRequest
    ->setRoomId('01H0N7WS7ZN1DGEJFF2C14K8NJ')
    ->setBookingPeriodId('01H1TQKHVCN2F00MP2D7ACX6S8')
    ->setOperatorId('9258a234-f90b-4871-b434-247087fec215');
try{
    $checkoutStartResponse = $connectApi->startCheckout($checkoutStartRequest);
    print_r($checkoutStartResponse->getData()));
} catch (\Exception $e) {
    // Handle exception
}
```

Please refer to the documentation for a full list of endpoints.

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Muhammad Ali Shah](https://github.com/housemates)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~34 days

Total

8

Last Release

780d ago

### Community

Maintainers

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

---

Top Contributors

[![hm-alishah](https://avatars.githubusercontent.com/u/93583443?v=4)](https://github.com/hm-alishah "hm-alishah (33 commits)")

---

Tags

connect apihousemates

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/housemates-connect-api/health.svg)

```
[![Health](https://phpackages.com/badges/housemates-connect-api/health.svg)](https://phpackages.com/packages/housemates-connect-api)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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