All package responses are typed objects based on spatie/laravel-data. They
can be read through public properties and converted to arrays or JSON.
$array = $company->toArray();
$json = $company->toJson();
CompanyDataSingle and batch searches return CompanyData.
| Property | Type | Description |
|---|---|---|
regon |
string |
Primary REGON value |
nip |
?string |
Tax identification number |
name |
string |
Registered entity name |
city |
?string |
Address city |
postalCode |
?string |
Postal code |
street |
?string |
Street name |
buildingNumber |
?string |
Building number |
apartmentNumber |
?string |
Apartment number |
province |
?string |
Voivodeship |
district |
?string |
District |
commune |
?string |
Commune |
type |
?string |
GUS entity type |
regon14 |
?string |
14-digit REGON, when present |
nipStatus |
?string |
NIP status returned by GUS |
silo |
int |
GUS data-silo identifier |
activityEndDate |
?string |
Activity end date returned by GUS |
postCity |
?string |
Postal city |
Empty optional values returned by GUS are normalized to null.
FullCompanyReportDataFull reports contain both the basic search result and the raw, typed report rows:
$report->basicData; // CompanyData
$report->reportData; // array<int, array<string, string>>
GUS defines the keys in reportData; they differ between report types.
BulkReportData$report->date; // DateTimeImmutable
$report->reportType; // BulkReportType
$report->reportData; // array<int, string>
ServiceStatusData$status->status; // int
$status->message; // string
$status->isAvailable(); // bool
isAvailable() returns true when GUS reports status code 1.
DiagnosticsData$diagnostics->messageCode; // int
$diagnostics->message; // string
$diagnostics->sessionStatus; // int
See Service status and diagnostics for usage examples.