1. Go to this page and download the library: Download fulfillment/api-wrapper 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/ */
fulfillment / api-wrapper example snippets
use Fulfillment\Api\Api;
$data = [
'endpoint' => $endPoint,
'clientId' => $clientId,
'clientSecret' => $clientSecret,
'accessToken' => $accessToken,
'username' => $username,
'password' => $password
];
$apiClient = new Api($data);
$newPostageClient = [
'email' => '[email protected]',
'clientId' => 2
];
$returnedUser = $apiClient->post('users', $newPostageClient); //POST request with body as json
$apiClient->get('users', ['clientId' => '2']); //GET request with query string ?clientId=2