PHP code example of ewarehousing-solutions / ewhs-api-php

1. Go to this page and download the library: Download ewarehousing-solutions/ewhs-api-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/ */

    

ewarehousing-solutions / ewhs-api-php example snippets




$connector = MiddlewareConnector::create(
    'username',
    'password',
    'wmsCode',
    'CustomerCode',
    MiddlewareConnector::BASE_URL_EU_DEV,
);

$response = $connector->send(new GetArticleCollectionRequest());

$response->status(); // 200, 201, 400, 500 etc...

$response->json();


$connector = MiddlewareConnector::createWithRefreshToken(
    'refreshToken',
    'wmsCode',
    'CustomerCode',
    MiddlewareConnector::BASE_URL_EU_DEV,
);

$response = $connector->send(new GetArticleCollectionRequest());
$response->status(); // 200, 201, 400, 500 etc...
$response->json();