trulioo/trulioo-sdk

Trulioo PHP SDK

This package's canonical repository appears to be gone and the package has been frozen as a result.

1.0.3 2021-05-25 21:12 UTC

This package is auto-updated.

Last update: 2022-03-26 19:46:43 UTC


README

Attention!

This SDK is for Developer Hub API only.

Trulioo PHP SDK

  • Package version: 1.0.3
  • API version: v1
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

Installation

With Composer

PHP 7.2 or later is required.

Run composer require trulioo/trulioo-sdk in the root directory of your project, or add this dependency to composer.json:

{
  "require": {
    "trulioo/trulioo-sdk": "^1.0.3"
  }
}

Sample Application

Check out our sample application for this SDK in the sample-app folder.

Getting Started

Example of testing authentication

require_once(__DIR__ . '/vendor/autoload.php');

use Trulioo\SDK\Configuration;
use Trulioo\SDK\ApiException;
use Trulioo\SDK\Api\ConnectionApi;

$config = Configuration::getDefaultConfiguration()

// Configure API key authorization
$config->setApiKey('x-trulioo-api-key', 'YOUR-X-TRULIOO-API-KEY');

// Configure mode: 'trial' or 'live'
$mode = 'trial';

// Construct instance of ConnectionApi with default HTTP client and config
$connectionApi = new ConnectionApi(null, $config);

// Call ConnectionApi#testAuthentication
try {
    $result = $connectionApi->testAuthentication($mode);
    echo $result;
} catch (ApiException $e) {
    echo "Exception when calling ConnectionApi#testAuthentication\n";
    echo "Status code:      " . $e->getCode() . "\n";
    echo "Reason:           " . $e->getResponseBody() . "\n";
    echo "Response headers: " . json_encode($e->getResponseHeaders()) . "\n";
}

Testing

Install dependencies with Composer by running composer install, then run:

./run-tests.sh

Documentation for APIs

All URIs are relative to https://gateway.trulioo.com.

Class Method HTTP request Description
BusinessApi getBusinessSearchResult GET /{mode}/business/v1/search/transactionrecord/{id} Get Business Search Result
BusinessApi search POST /{mode}/business/v1/search Search
ConfigurationApi getBusinessRegistrationNumbers GET /{mode}/configuration/v1/businessregistrationnumbers/{countryCode}/{jurisdictionCode} Get Business Registration Numbers
ConfigurationApi getConsents GET /{mode}/configuration/v1/consents/{configurationName}/{countryCode} Get Consents
ConfigurationApi getCountryCodes GET /{mode}/configuration/v1/countrycodes/{configurationName} Get Country Codes
ConfigurationApi getCountrySubdivisions GET /{mode}/configuration/v1/countrysubdivisions/{countryCode} Get Country Subdivisions
ConfigurationApi getDatasources GET /{mode}/configuration/v1/datasources/{configurationName}/{countryCode} Get Datasources
ConfigurationApi getDetailedConsents GET /{mode}/configuration/v1/detailedConsents/{configurationName}/{countryCode} Get Detailed Consents
ConfigurationApi getDocumentTypes GET /{mode}/configuration/v1/documentTypes/{countryCode} Get Document Types
ConfigurationApi getFields GET /{mode}/configuration/v1/fields/{configurationName}/{countryCode} Get Fields
ConfigurationApi getRecommendedFields GET /{mode}/configuration/v1/recommendedfields/{configurationName}/{countryCode} Get Recommended Fields
ConfigurationApi getTestEntities GET /{mode}/configuration/v1/testentities/{configurationName}/{countryCode} Get Test Entities
ConnectionApi connectionAsyncCallbackUrl POST /{mode}/connection/v1/async-callback Connection Async Callback Url
ConnectionApi sayHello GET /{mode}/connection/v1/sayhello/{name} Say Hello
ConnectionApi testAuthentication GET /{mode}/connection/v1/testauthentication Test Authentication
VerificationsApi documentDownload GET /{mode}/verifications/v1/documentdownload/{transactionRecordId}/{fieldName} Document Download
VerificationsApi getTransactionRecord GET /{mode}/verifications/v1/transactionrecord/{id} Get Transaction Record
VerificationsApi getTransactionRecordAddress GET /{mode}/verifications/v1/transactionrecord/{id}/withaddress Get Transaction Record Address
VerificationsApi getTransactionRecordDocument GET /{mode}/verifications/v1/transactionrecord/{transactionRecordID}/{documentField} Get Transaction Record Document
VerificationsApi getTransactionRecordVerbose GET /{mode}/verifications/v1/transactionrecord/{id}/verbose Get Transaction Record Verbose
VerificationsApi getTransactionStatus GET /{mode}/verifications/v1/transaction/{id}/status Get Transaction Status
VerificationsApi verify POST /{mode}/verifications/v1/verify Verify

Documentation for Models

Documentation for Authorization

ApiKeyAuth

  • Type: API key
  • API key parameter name: x-trulioo-api-key
  • Location: HTTP header