PHPackages                             concept7/nbo-php-sdk - 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. concept7/nbo-php-sdk

ActiveLibrary[API Development](/categories/api)

concept7/nbo-php-sdk
====================

An SDK written in PHP to work with the NieuwbouwOffice API

0.0.2(2w ago)06541MITPHPPHP ^8.3CI passing

Since May 20Pushed 2w agoCompare

[ Source](https://github.com/concept7/nbo-php-sdk)[ Packagist](https://packagist.org/packages/concept7/nbo-php-sdk)[ Docs](https://github.com/concept7/nbo-php-sdk)[ GitHub Sponsors](https://github.com/concept7)[ RSS](/packages/concept7-nbo-php-sdk/feed)WikiDiscussions 0.x Synced 1w ago

READMEChangelog (2)Dependencies (4)Versions (13)Used By (1)

NieuwbouwOffice PHP SDK
=======================

[](#nieuwbouwoffice-php-sdk)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f187ae74b8c0181c898f56072595155decb0c94f6308335e164726faca8b47c0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6e63657074372f6e626f2d7068702d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/concept7/nbo-php-sdk)[![Tests](https://camo.githubusercontent.com/babdc356b2677eccc3c53bb46b5175b9107bbab534aa627d818d533930f557ea/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636f6e63657074372f6e626f2d7068702d73646b2f72756e2d74657374732e796d6c3f6272616e63683d302e78266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/concept7/nbo-php-sdk/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/c00ef745b428a712ff14bd935f0ea6d0094d18979332bc3dafcd8b063443e9e5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6e63657074372f6e626f2d7068702d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/concept7/nbo-php-sdk)

A PHP SDK for the [NieuwbouwOffice](https://nieuwbouwoffice.nl) REST API. Built on [Saloon](https://docs.saloon.dev), it ships typed DTOs and enums for projects, unit types, units, and their media so you can work with the API without touching its Dutch JSON keys.

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

[](#installation)

You can install the package via composer:

```
composer require concept7/nbo-php-sdk
```

Usage
-----

[](#usage)

Instantiate the connector with your API token, then access resources off of it:

```
use NieuwbouwOffice\PhpSdk\NieuwbouwOffice;

$nbo = new NieuwbouwOffice('your-api-token');

// All projects (returns Project[])
$projects = $nbo->projects()->list();

// A single project (returns Project)
$project = $nbo->projects()->get('e00afb7a1791a22eb8bca3707687c549');
```

Each DTO exposes typed, readonly properties. Dates are parsed into `Carbon\CarbonImmutable` and categorical fields like `Project::$status` are backed by enums (see `NieuwbouwOffice\PhpSdk\Enums\ProjectStatus` and `NieuwbouwOffice\PhpSdk\Enums\UnitStatus`).

### Unit types and units

[](#unit-types-and-units)

Both are scoped to a project. `unitTypes()` returns the per-project housing types (e.g. "Tussenwoning"), and `units()` returns the individual homes within those types:

```
$unitTypes = $nbo->unitTypes($project->uuid)->list();
$unitType  = $nbo->unitTypes($project->uuid)->get($unitTypes[0]->uuid);

$units = $nbo->units($project->uuid)->list();
$unit  = $nbo->units($project->uuid)->get($units[0]->uuid);
```

### Media

[](#media)

Every project, unit type, and unit has an attached media collection (photos, plans, etc.). Each resource exposes a `media()` method that returns `Media[]`:

```
$projectMedia  = $nbo->projects()->media($project->uuid);
$unitTypeMedia = $nbo->unitTypes($project->uuid)->media($unitType->uuid);
$unitMedia     = $nbo->units($project->uuid)->media($unit->uuid);
```

### Overriding the base URL

[](#overriding-the-base-url)

The connector defaults to the production base URL. Pass a second argument to point at a staging or local environment:

```
$nbo = new NieuwbouwOffice('your-api-token', 'https://staging.nbo.nl/rest');
```

Documentation
-------------

[](#documentation)

### Resources

[](#resources)

All resources hang off the `NieuwbouwOffice` connector and return typed DTOs from `NieuwbouwOffice\PhpSdk\Data`.

CallHTTP requestReturns`$nbo->projects()->list()``GET /projects/``Project[]``$nbo->projects()->get($uuid)``GET /projects/{uuid}/``Project``$nbo->unitTypes($projectUuid)->list()``GET /projects/{projectUuid}/projectwoningen/``UnitType[]``$nbo->unitTypes($projectUuid)->get($uuid)``GET /projects/{projectUuid}/projectwoningen/{uuid}/``UnitType``$nbo->units($projectUuid)->list()``GET /projects/{projectUuid}/woningen/``Unit[]``$nbo->units($projectUuid)->get($uuid)``GET /projects/{projectUuid}/woningen/{uuid}/``Unit``$nbo->projects()->media($uuid)``GET /projects/{uuid}/media/``Media[]``$nbo->unitTypes($projectUuid)->media($uuid)``GET /projects/{projectUuid}/projectwoningen/{uuid}/media/``Media[]``$nbo->units($projectUuid)->media($uuid)``GET /projects/{projectUuid}/woningen/{uuid}/media/``Media[]`Authentication is handled by the connector via an `apikey`-prefixed `Authorization` header — pass your token to the constructor and Saloon takes care of the rest.

### DTO conventions

[](#dto-conventions)

- **Readonly value objects.** Every DTO in `src/Data/` uses `public readonly` properties; instantiate them via `Project::fromResponse($array)` (which the request classes do for you), then read.
- **One DTO per resource, list and detail.** Detail-only fields are nullable, so `list()` results return `null` for everything not in the list payload. Look up the full property set in `src/Data/Project.php`, `UnitType.php`, `Unit.php`, and `Media.php`.
- **Shared media endpoint.** All three resources reach `/.../media/` through a single decorating `GetMediaRequest` (`src/Requests/Media/GetMediaRequest.php`) that wraps the parent detail request and appends `media/`. The same `Media` DTO is used regardless of which parent the media belongs to.
- **Casting.** Numeric strings become `int` or `float`; date strings become `Carbon\CarbonImmutable`; the API's `"-1"` / `"0"` booleans become real `bool` (`-1` → `true`, `0` → `false`).
- **Errors.** The connector uses Saloon's `AlwaysThrowOnErrors` trait, so non-2xx responses raise a `Saloon\Exceptions\Request\RequestException` subclass instead of silently returning.

### Enums

[](#enums)

Categorical fields are typed where the value set is known. `tryFrom()` is used internally, so unknown values come through as `null` instead of throwing.

EnumBackingCasesUsed by`NieuwbouwOffice\PhpSdk\Enums\ProjectStatus``string` (Dutch label)9`Project::$status``NieuwbouwOffice\PhpSdk\Enums\UnitStatus``string` (Dutch label)14`Unit::$status`Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Jan Henk Hazelaar](https://github.com/jhhazelaar)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance96

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

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 ~0 days

Total

3

Last Release

20d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c8436fa940b097bc16a3da74b6d85a4070816e19070a5bdc1a6f733a61f75fc?d=identicon)[concept7](/maintainers/concept7)

---

Top Contributors

[![jhhazelaar](https://avatars.githubusercontent.com/u/215711?v=4)](https://github.com/jhhazelaar "jhhazelaar (41 commits)")

---

Tags

concept7nieuwbouw-officenbo-php-sdk

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.5M901](/packages/statamic-cms)[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k406.5k25](/packages/team-reflex-discord-php)[temporal/sdk

Temporal SDK

4082.7M22](/packages/temporal-sdk)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1122.7k](/packages/codebar-ag-laravel-docuware)

PHPackages © 2026

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