august6th/amzn-sp-api

Amazon Selling Partner API SDK

dev-main 2023-07-28 09:55 UTC

This package is auto-updated.

Last update: 2024-05-29 10:42:32 UTC


README

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:

This PHP package has not modified any auto-generated code, so it can easily adapt even if Amazon officially updates the model or API.

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer

Then run composer require august6th/amzn-sp-api

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/./vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php

use SellingPartnerApi\Endpoint\Endpoint;

require_once(__DIR__ . '/vendor/autoload.php');

Endpoint::$sandbox = true;

// You can create SellingPartner with specific options

//$sp = SellingPartner::withOptions([
//    [
//        'client_id' => 'xxx',
//        'client_secret' => 'xxx',
//        'refresh_token' => 'xxx',
//        'access_key_id' => 'xxx',
//        'secret_access_key' => 'xxx',
//        'role_arn' => 'xxx',
//        'endpoint' => Endpoint::NA(),
//    ]
//]);

// Or create SellingPartner with default options
// You can change defaultOptionsFunc before create SellingPartner

//SellingPartner::setDefaultOptionsFunc(function () {
//    return [
//        'client_id' => 'xxx',
//        'client_secret' => 'xxx',
//        'refresh_token' => 'xxx',
//        'access_key_id' => 'xxx',
//        'secret_access_key' => 'xxx',
//        'role_arn' => 'xxx',
//        'endpoint' => Endpoint::NA(),
//    ];
//});

$sp = SellingPartner::instance();
$res = $sp->sellersApi()->getMarketplaceParticipations();
print_r($res);

?>