Download the PHP package hkonnet/selling-partner-api without Composer

On this page you can find all versions of the php package hkonnet/selling-partner-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package selling-partner-api

Selling Partner API for PHP

A PHP library for connecting to Amazon's Selling Partner API.

Sponsors

Powering companies like...


If you've found this library useful, please consider becoming a Sponsor, or making a one-time donation via the button below. I appreciate any and all support you can provide!

paypal

Features

Installation

composer require jlevers/selling-partner-api

Getting Started

Prerequisites

You need a few things to get started:

If you're looking for more information on how to set those things up, check out this blog post. It provides a detailed walkthrough of the whole setup process.

Setup

The Configuration constructor takes a single argument: an associative array with all the configuration information that's needed to connect to the Selling Partner API:

If you created your Selling Partner API application using an IAM role ARN instead of a user ARN, pass that role ARN in the configuration array:

Getter and setter methods exist for the Configuration class's lwaClientId, lwaClientSecret, lwaRefreshToken, awsAccessKeyId, awsSecretAccessKey, and endpoint properties. The methods are named in accordance with the name of the property they interact with: getLwaClientId, setLwaClientId, getLwaClientSecret, etc.

$config can then be passed into the constructor of any SellingPartnerApi\Api\*Api class. See the Example section for a complete example.

Configuration options

The array passed to the Configuration constructor accepts the following keys:

Example

This example assumes you have access to the Seller Insights Selling Partner API role, but the general format applies to any Selling Partner API request.

Supported API segments

Seller APIs

Vendor APIs

Uploading and downloading documents

The Feeds and Reports APIs include operations that involve uploading and downloading documents to and from Amazon. Amazon encrypts all documents they generate, and requires that all uploaded documents be encrypted. The SellingPartnerApi\Document class handles all the encryption/decryption, given an instance of one of the Model\Reports\ReportDocument, Model\Feeds\FeedDocument, or Model\Feeds\CreateFeedDocumentResponse classes. Instances of those classes are in the response returned by Amazon when you make a call to the getReportDocument, getFeedDocument, and createFeedDocument endpoints, respectively.

Downloading a report document

Uploading a feed document

Models

Most operations have one or more models associated with it. These models are classes that contain the data needed to make a certain kind of request to the API, or contain the data returned by a given request type. All of the models share the same general interface: you can either specify all the model's attributes during initialization, or use setter methods to set each attribute after the fact. Here's an example using the Service API's Buyer model (docs, (source).

The Buyer model has four attributes: buyer_id, name, phone, and is_prime_member. (If you're wondering how you would figure out which attributes the model has on your own, check out the docs link above.) To create an instance of the Buyer model with all those attributes set:

Alternatively, you can create an instance of the Buyer model and then populate its fields:

Each model also has the getter methods you might expect:

Models can (and usually do) have other models as attributes:


All versions of selling-partner-api with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^6.2|^6.5|^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hkonnet/selling-partner-api contains the following files

Loading the files please wait ....