https://github.com/synergitech/creditsafe-connect
https://github.com/synergitech/creditsafe-connect
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/synergitech/creditsafe-connect
- Owner: SynergiTech
- License: mit
- Created: 2018-12-03T12:38:52.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-17T20:38:04.000Z (almost 2 years ago)
- Last Synced: 2025-07-11T22:45:52.423Z (11 months ago)
- Language: PHP
- Homepage:
- Size: 58.6 KB
- Stars: 6
- Watchers: 9
- Forks: 16
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Creditsafe API

```
composer require synergitech/creditsafe-connect
```
## Usage
### Setting up Client
```php
$config = [
'username' => 'username',
'password' => 'password'
];
$creditsafe = new \SynergiTech\Creditsafe\Client($config);
```
### Access countries and their codes
```php
$creditsafe->countries()->access();
```
### Search criteria using country code
```php
$creditsafe->companies()->searchCriteria(['countries' => 'GB']);
```
### Company search pagination
```php
$search = $creditsafe->companies()->search(['countries' => 'GB', 'name' => 'GOOGLE UK LIMITED']);
$search->setPageSize(100);
foreach ($search as $result) {
$company = $result->get();
}
```
### Get Custom report data options
```php
$creditsafe->()->reportCustomData()->get('DE');
```
### Get company report
```php
$creditsafe->companies()->get('GB001-0-03977902');
```
### Change report language
```php
$creditsafe->companies()->get('GB001-0-03977902', 'FR');
```
### Adding reason code as extra parameter needed for German reports
```php
$creditsafe->companies()->get('GB001-0-03977902', 'DE', ['customData' => 'de_reason_code::1']);
```
## Running tests
```
vendor/bin/phpunit tests
```