PHP code example of jackmartin / api3intime

1. Go to this page and download the library: Download jackmartin/api3intime 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/ */

    

jackmartin / api3intime example snippets



use InTime\InTime3;

API_KEY');
// $intime = new InTime3('API_KEY', true, false, 30, 30);
// $intime = new InTime3('API_KEY', true, false);



use InTime\InTime3;

API_KEY');
//$intime = new InTime3('API_KEY', false); print data stdclass format 
//$intime = new InTime3('API_KEY', false, true); debug mode

print_r($intime->getCountryList());
//{"Entry_get_country_by_id":[{"id":"213","name_ua":"УЕЛЬС","name_en":"WALES","name_ru":"УЭЛЬС","short_name_ua":"УЕЛЬС","short_name_en":"WALES","short_name_ru":"УЭЛЬС","code":"000000213","last_change":"2017-08-30T21:04:00.000+03:00","status":"1"},{"id":"214","name_ua":"УЗБЕКИСТАН","name_en":"UZBEKISTAN","name_ru":"УЗБЕКИСТАН","short_name_ua":"УЗБЕКИСТАН","short_name_en":"UZBEKISTAN","short_name_ru":"УЗБЕКИСТАН","code":"000000214","last_change":"2017-05-11T21:10:00.000+03:00","status":"1"}



use InTime\InTime3;

I_KEY');

print_r($intime->getCountryId(213));


use InTime\InTime3;

API_KEY');

print_r($intime->getAreaList());


use InTime\InTime3;

API_KEY');

print_r($intime->getAreaId(1));
 

use InTime\InTime3;

PI_KEY');

print_r($intime->getAreaFilter(array(

    // 'id'        => 1,
    'area_name' => 'В',
    // 'country_id' => '215',

)));


use InTime\InTime3;

API_KEY');

print_r($intime->getDistrictList());


use InTime\InTime3;

API_KEY');

print_r($intime->getDistrictId(241));


use InTime\InTime3;

API_KEY');

print_r($intime->getDistrictFilter(array(

    // 'id' => '241',
    // 'country_id' => '215',
    'district_name' => 'Бере',

)));


use InTime\InTime3;

API_key');

print_r($intime->getLocalityList());


use InTime\InTime3;

API_KEY');

print_r($intime->getLocalityId(100));


use InTime\InTime3;

API_KEY');

print_r($intime->getLocalityFilter(array(

    // 'id' => 328,
    // 'country_id' => 215,
    // 'area_id' => 14,
    'district_id' => 416,
    // 'locality_name' => 'Сково',

)));


use InTime\InTime3;

API_KEY');

print_r($intime->getBranchList());


use InTime\InTime3;

API_KEY');

print_r($intime->getBranchId(328));


use InTime\InTime3;

API_KEY');

print_r($intime->getBranchFilter(array(

    // 'id' => 328,
    // 'country_id' => 215,
    // 'area_id' => 15,
    // 'district_id' => 40,
    // 'locality_id' => 39,
    'branch_name' => 'Воло',

)));


use InTime\InTime3;

API_KEY');

print_r($intime->getGoodsDescList());


use InTime\InTime3;

API_KEY');

print_r($intime->getGoodsDescList());


use InTime\InTime3;

API_KEY');

print_r($intime->getBoxList());


use InTime\InTime3;

API_KEY');

print_r($intime->getBoxId(50));


use InTime\InTime3;

API_KEY');

print_r(

	$intime->declarationCreate(

		[

			...

		]

	)

);



use InTime\InTime3;

API_KEY');

print_r($intime->getBranchWorkList());


use InTime\InTime3;

API_KEY');

print_r($intime->getBranchWorkId(200));


use InTime\InTime3;

API_KEY');

print_r($intime->declStatus('NUMBER_TTN'));


use InTime\InTime3;

API_KEY');

print_r($intime->getTTN('NUMBER_TTN'));