1. Go to this page and download the library: Download mehr-it/sp-api-sdk 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/ */
mehr-it / sp-api-sdk example snippets
use MehrIt\AmazonSellingPartner\Marketplace;
use MehrIt\AmazonSellingPartner\Regions;
use MehrIt\AmazonSellingPartner\SellingPartnerSDK;
use Buzz\Client\Curl;
use MehrIt\AmazonSellingPartner\Exception\ApiException;
use MehrIt\AmazonSellingPartner\Configuration;
use Monolog\Handler\StreamHandler;
use Monolog\Logger;
use Nyholm\Psr7\Factory\Psr17Factory;
$factory, $configuration, $logger);
$accessToken = $sdk->oAuth()->exchangeRefreshToken('seller_oauth_refresh_token');
try {
$item = $sdk->catalogItem()->getCatalogItem(
$accessToken,
Regions::NORTH_AMERICA,
$marketplaceId = Marketplace::US()->id(),
$asin = 'B07W13KJZC'
);
dump($item);
} catch (ApiException $exception) {
dump($exception->getMessage());
}