API

Make calls to eKansio API

Set connection

$Api = $this->get('api', Array(
    'host' => $domain,
    'password' => $password,
    'username' => $username
));

Get record:

$customer = $Api->get('table/customer/record/'.$id)->getResponseData();

Get multiple records

Get name of 10 newest active customers:

$customers = $Api->get('table/customer/records',Array(
  'select'  => 'id,name,created_at',
  'where'   => Array(
     'status' => 'Active'
   )
  'order'   => 'created_at newest',
  'limit'   => 10
))->getResponseData();

Create record

$customer = $Api->post('table/customer/record/addnew',Array(
    'data' => Array(
        'name'  => 'Customer name'
    )
));

Modify record

$customer = $Api->post('table/customer/record/'.$id,Array(
    'data' => Array(
        'name'  => 'Customer new name'
    )
));