PHP code example of palpalani / magento2-rest-api-client
1. Go to this page and download the library: Download palpalani/magento2-rest-api-client 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/ */
palpalani / magento2-rest-api-client example snippets
vice = new \Experius\Magento2ApiClient\Service\RestApi();
$service->setUsername('username');
$service->setPassword('password');
$service->setUrl('https://www.example.com/index.php/rest/%storecode/V1/');
// OPTIONAL > default = all
$service->setStoreCode('default');
$service->init();