1. Go to this page and download the library: Download wasico/sdk-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wasico / sdk-php example snippets
"wasico/sdk-php": ">=0.0.1"
\Wasi\SDK\Configuration::set([
'v' => 1, //API version here
'id_company' => 123456, //Your id_company here
'wasi_token' => 'AbCd_eFgH_IjKl_MnOp', //Your WasiToken here
]);
#Replace 123456 with the id_property
$property = \Wasi\SDK\Models\Property::find(123456);
#Use API filters in the 'where' method
$properties = \Wasi\SDK\Models\Property::where('title', 'Hotel')->get();
$customer = new \Wasi\SDK\Models\Customer();
$customer->id_user = 123;
$customer->id_country = 1;
$customer->id_region = 26;
$customer->id_city = 63;
$customer->first_name = "Jose W";
$customer->save()
#Now you can get id_client:
$id_client = $customer->id_client;