The Selling Partner API for Retail Procurement Transaction Status provides programmatic access to status information on specific asynchronous POST transactions for vendors.
This PHP package is automatically generated by the Swagger Codegen project:
- API version: v1
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen For more information, please visit https://sellercentral.amazon.com/gp/mws/contactus.html
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/popsicle/spapi.git"
}
],
"require": {
"popsicle/spapi": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/SPAPI/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Popsicle\Amazon\Api\VendorTransactionApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$transaction_id = "transaction_id_example"; // string | The GUID provided by Amazon in the 'transactionId' field in response to the post request of a specific transaction.
try {
$result = $apiInstance->getTransaction($transaction_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VendorTransactionApi->getTransaction: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to https://sellingpartnerapi-na.amazon.com/
Class | Method | HTTP request | Description |
---|---|---|---|
VendorTransactionApi | getTransaction | GET /vendor/transactions/v1/transactions/{transactionId} |
All endpoints do not require authorization.