Documentation for 4.0 (pre-release). Using 3.x? See the README on main.
Skip to content

Countries (Länder) ​

Read-only API wrapper for the Billomat country list at /countries.

Access ​

php
$billomat->countries

Justpilot\Billomat\Api\CountriesApi, created lazily on first access to $billomat->countries.

Endpoints ​

MethodHTTPPath
list()GET/countries
listPage()GET/countries (page with metadata)
iterateAll()GET/countries (lazy over all pages)

Fetching a single country by ID (GET /countries/{id}) is not implemented in the SDK; the list endpoint accepts the filter code and returns the matching country directly.

Methods ​

list(): list<Country> ​

Lists all countries.

php
$countries = $billomat->countries->list();

foreach ($countries as $country) {
    echo $country->code . ': ' . $country->name . PHP_EOL;
}

Note: unlike users->list(), list() takes no filters. The Billomat endpoint does support the query parameter code (ISO 3166 alpha-2). To look up a single country, pass it to listPage() or filter the list on the client side:

php
$page = $billomat->countries->listPage(['code' => 'DE']);
$de   = $page->items[0] ?? null;

Exceptions: AuthenticationException, HttpException.

listPage(array $filters = []): Page<Country> ​

Like list(), with pagination metadata (page, perPage, total) in $page->info.

iterateAll(array $filters = [], int $pageSize = 100): Generator<int, Country> ​

Lazy iteration over all pages.

Read model: Country ​

final readonly class Justpilot\Billomat\Model\Country

PropertyTypeMapping
codestringcode (fallback: country_code)
name?stringname
id?intid
extraarray<string,mixed>Fields the SDK doesn't map yet, raw (see Read models)

Country::fromArray($data) hydrates from the wire format; Country::toArray() writes snake_case back.

Unofficial SDK, not affiliated with Billomat GmbH. Released under the Apache License 2.0.