PHP code example of kahyam / api
1. Go to this page and download the library: Download kahyam/api 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/ */
kahyam / api example snippets
sh
$request = new \Kahyam\Request();
$request->setMethod(Kahyam\Request::PUT)
->setEndPoint(Kahyam\Endpoint::SALES)
->setParams('prettyPrint',true) # Setting Url Parameters
->setBody('phone','5331456147') # Setting Body Items
->setID('KHY0001638'); # Specifying Which Order
$api = new \Kahyam\API($username,$api_key); # initialization for API
$response = $api->setRequest($request)->getResponse(); # Get Response