PHPackages                             kkuzar/prhfibis - 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. kkuzar/prhfibis

AbandonedArchivedLibrary[API Development](/categories/api)

kkuzar/prhfibis
===============

A wrapper component for Prh.fi BIS v1 api

032PHP

Since Feb 18Pushed 6y agoCompare

[ Source](https://github.com/kkuzar/php-prhfi-bis)[ Packagist](https://packagist.org/packages/kkuzar/prhfibis)[ RSS](/packages/kkuzar-prhfibis/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

php-prhfi-bis
=============

[](#php-prhfi-bis)

A wrapper component for Prh.fi BIS v1 api *original document* for the API =&gt; [avoindata.prh.fi](https://avoindata.prh.fi/ytj_en.html)

Table of Contents
=================

[](#table-of-contents)

1. [How to Install](#install)
2. [API functions](#api-functions)
3. [Helper Function](#helper-functions)

install
-------

[](#install)

install from composer:

```
$> composer require kkuzar/prhfibis
```

init
----

[](#init)

construct the new class:

```
$bis = new kuzar\BisV1Api();
```

default options:

```
protected $defaultOption = [
      "hostname" => "avoindata.prh.fi",
      "port" => 443,
      "path" => "/bis/v1",
      "method" => "GET",
      "protocol" => "https"
 ];
// this class can take any config in this format
```

get a template for options

```
 kuzar\BisV1Api()::getOptionTemplate();

 public static function getOptionTemplate()
    {
        return [
            "hostname" => "",
            "port" => 0,
            "path" => "",
            "method" => "",
            "protocol" => ""
        ];
    }
```

API Functions
-------------

[](#api-functions)

### Full Wrapper for Bis v1 API.

[](#full-wrapper-for-bis-v1-api)

#### fetch by Business Id `queryCompanyDetailWithBusinessId(intput: string)`

[](#fetch-by-business-id-querycompanydetailwithbusinessidintput-string)

fetch Company Full Detail with Finnish Business Id

```
$bis = new kuzar\BisV1Api();
$bis->queryCompanyDetailWithBusinessId($id);
```

this function will return a detail JSON as BIS website shows.

#### fetch using query param `queryCompanyDetailWithParam(Array inputObj)`

[](#fetch-using-query-param-querycompanydetailwithparamarray-inputobj)

```
$bis = new kuzar\BisV1Api();
$bis->queryCompanyDetailWithParam([
    "name" => "KES",
     // etc
]);
```

this function will return a detail JSON as BIS website shows. This if the query is detail enough this function will return one full detail other wise it will return a list of potential company, more detail on BIS document in above link.

e.g.

```
{
  "type": "fi.prh.opendata.bis",
  "version": "1",
  "totalResults": -1,
  "resultsFrom": 0,
  "previousResultsUri": null,
  "nextResultsUri": "http://avoindata.prh.fi/opendata/bis/v1?totalResults=false&maxResults=10&resultsFrom=10&name=KES&companyRegistrationFrom=2014-02-28",
  "exceptionNoticeUri": null,
  "results": [
    {
      "businessId": "3114031-3",
      "name": "Kestimestarit Oy",
      "registrationDate": "2020-01-24",
      "companyForm": "OY",
      "detailsUri": "http://avoindata.prh.fi/opendata/bis/v1/3114031-3"
    },
    {
      "businessId": "3109375-6",
      "name": "Kesar Oy",
      "registrationDate": "2020-01-07",
      "companyForm": "OY",
      "detailsUri": "http://avoindata.prh.fi/opendata/bis/v1/3109375-6"
    },
    ...
  ]
}
```

### Custom JSON return

[](#custom-json-return)

```
// Custom return body format
  return [
            "name" => null,
            "businessId" => null,
            "companyForm" => null,
            "website" => null,
            "latestAddr" => null,
            "latestPost" => null,
            "latestCity" => null,
            "latestBusinessCode" => null,
            "latestBusinessLine" => null,
            "latestAuxiliaryNames" => null,
        ];
```

#### fetch Company Brief Structed Information with Business ID `getCompanyStructedDataWithBusinessId(inputObj: object)`

[](#fetch-company-brief-structed-information-with-business-id-getcompanystructeddatawithbusinessidinputobj-object)

```
$bis = new kuzar\BisV1Api();
$bis->getCompanyStructedDataWithBusinessId("2299022-8");
```

#### fetch Company Brief Structed Information with Params `getCompanyStructedDataWithParam(inputObj: object)`

[](#fetch-company-brief-structed-information-with-params-getcompanystructeddatawithparaminputobj-object)

```
$bis = new kuzar\BisV1Api();
$bis->getCompanyStructedDataWithParam([
    "name" => "KES",
     // etc
]);
```

#### example return for Structed Information:

[](#example-return-for-structed-information)

```
[
  {
    name: 'Suomen Ajoneuvotekniikka Oy',
    businessId: '3099016-4',
    companyForm: 'OY',
    website: '0400643313',
    latestAddr: 'Marjahaankierto 2-4',
    latestPost: 'IISALMI',
    latestCity: null,
    latestBusinessCode: '45112',
    latestBusinessLine: 'Retail sale of cars and light motor vehicles',
    latestAuxiliaryNames: 'Keski-Suomen Rengas'
  },
  {
    name: 'Kestävä Kollektiivi Oy',
    businessId: '3093045-2',
    companyForm: 'OY',
    website: 'www.kestava.net',
    latestAddr: 'Husares 1853, depto 302 1428   CABA ARGENTINA',
    latestPost: null,
    latestCity: null,
    latestBusinessCode: '71121',
    latestBusinessLine: 'Town and city planning',
    latestAuxiliaryNames: ''
  },
  ...
]

```

Helper Functions
----------------

[](#helper-functions)

### getQueryBodyTemplate `getQueryTemplate()`

[](#getquerybodytemplate-getquerytemplate)

example code snippet

```
kuzar\BisV1Api()::getQueryTemplate();
```

This helper will return a query object type has strutrue as following:

```
public static function getQueryTemplate()
{
    return [
        "totalResults" => "false",
        "maxResults" => "10",
        "resultsFrom" => "0",
        "name" => "",
        "businessId" => "",
        "registeredOffice" => "",
        "streetAddressPostCode" => "",
        "companyForm" => "",
        "businessLine" => "",
        "businessLineCode" => "",
        "companyRegistrationFrom" => "",
        "companyRegistrationTo" => ""
    ];
}
```

For now it will only validate the `companyForm` , `companyRegistrationFrom`, `companyRegistrationTo` and `businessId`.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/65ab00b1ef49d89fff34490ae3cb1281e0d442fb85eaeedae76b0009a19bdb36?d=identicon)[kuzar.k](/maintainers/kuzar.k)

---

Top Contributors

[![kkuzar](https://avatars.githubusercontent.com/u/3980562?v=4)](https://github.com/kkuzar "kkuzar (1 commits)")

### Embed Badge

![Health badge](/badges/kkuzar-prhfibis/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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