APAPI

Base SDK class

Base SDK class to access AutoPal API functions. A company identifier, API private key and user identifier are required in order to successfully send requests to the AutoPal API.

Example:

 $APAPI = new APAPI\APAPI(
     'your company identifier',
     'your API private key',
     'your user identifier');

Now you can interact with the API using the $APAPI object, through one of the available modules:

 $result = $APAPI->loan->summary('1');

Methods

Constructor

__construct(string $pxCompany, string $pxPrivate, string $pxUser, bool $pxDemo = false) : self

Create a new instance and assign it the default url endpoint

Arguments

$pxCompany

string

Company identifier

$pxPrivate

string

Private API key

$pxUser

string

User identifier

$pxDemo

bool

Whether this is a demo account

Response

self

__get magic function

__get(string $pxKey) : mixed

Invoked automatically to get objects prefixed with 'APModule'. These are the API modules such as 'loan', 'calc' and 'company' and are the main communication channel to interact with the API.

Arguments

$pxKey

string

The requested field

Response

mixed

Properties

companyId

companyId

privateKey

privateKey

userId

userId

gets

gets

demo

demo

URL endpoint

url

Use this property to get / set the API url endpoint. It is initialized to its default value in the class constructor