Download the PHP package goedgepickt/spapi-php without Composer
On this page you can find all versions of the php package goedgepickt/spapi-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package spapi-php
SPAPI
spapi-php is a http client for Amazon's Selling Partner API
Author: Lyubomir Slavilov
Before you start
Spapi is released as Composer package double-break/spapi-php
with no warranties or promises.
There are couple classes (such as Signer
, Credentials
) which are essential for the API calls to work. Most of the issues will live here.
All of the actual API clients are autogenerated and given the disclaimer above - not heavily tested.
Requirements
- php 7.3 (never tested on lower version)
- composer
- a lot of time reading Amazon SP API documentation
Install and update
Now you are ready to do
Package updates
Once you have successfully installed the package, the updates are simple as normal Composer package updates. Just execute:
Configuration
Name | Description | Type |
---|---|---|
http |
Contains all the Guzzle configuration |
GuzzleConfiguration |
LWA configuration | ||
refresh_token |
Value of the refresh token issued by the Seller authorizing the application | string |
client_id |
The client id which is generated in the Seller Apps console | string |
client_secret |
The client secret with which the client will identify itself | string |
access_token_longevity |
The longevity in seconds of the token. It is basically the time period in which the token will be kept in the TokenStorage |
integer Default: 3600 |
STS configuration | ||
access_key |
The IAM role access key | string |
secret_key |
The IAM role secret key | string |
role_arn |
The ARN of the IAM role | string |
sts_session _longevity |
The longevity of the STS session which will be created | integer Default: 3600 |
API configuration | ||
region |
The region identifier for the region you are going to execute your calls against | string Example: eu-west-1 |
host |
The region specific host of the Selling Partner API | string Example: sellingpartnerapi-eu.amazon.com |
Examples
Simple use
Feed API usage
For Feed API, user can follow Feeds API Use Case Guide.
And in this guide for step 2. Encrypt and upload the feed data: user can use below example:
And for Step 6. Download and decrypt the feed processing report: user can use below example:
Debugging responses
Accessing response headers
📝Accessing headers by using client's getLastHttpResponse()
is available since v1.0.5
Debugging 4xx and 5xx response headers
📝Accessing headers by using client's getLastHttpResponse()
is available since v1.0.5
Migrating authorization from Amazon Marketplace Web Service to Selling Partner Api
Please, see more details in Selling Partner Api docs
Authorization for Grantless Operations in Selling Partner API
Please, see more details in Selling Partner Api docs
Working with Restricted Data APIs
For more information see the Amazons's use case documentation about this topic: https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/tokens-api-use-case-guide/tokens-API-use-case-guide-2021-03-01.md
All versions of spapi-php with dependencies
guzzlehttp/psr7 Version ^2.1
ext-simplexml Version *
ext-json Version *
ext-zlib Version *