PHPackages                             james-and-james-fulfilment/amazon-sp-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. james-and-james-fulfilment/amazon-sp-api

ActiveLibrary[API Development](/categories/api)

james-and-james-fulfilment/amazon-sp-api
========================================

v1.1.3(7mo ago)016.0k↓27.7%proprietaryPHPPHP &gt;=8.1CI failing

Since Mar 9Pushed 7mo ago5 watchersCompare

[ Source](https://github.com/JamesAndJamesFulfilment/amazon-sp-api)[ Packagist](https://packagist.org/packages/james-and-james-fulfilment/amazon-sp-api)[ Docs](http://swagger.io)[ RSS](/packages/james-and-james-fulfilment-amazon-sp-api/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (4)Versions (6)Used By (0)

SwaggerClient-php
=================

[](#swaggerclient-php)

The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/listings-items-api-use-case-guide/listings-items-api-use-case-guide_2021-08-01.md).

This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 2021-08-01
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen For more information, please visit

Usage
-----

[](#usage)

```
public function getAccessToken($channel_account): string
{
    $refresh_token = $channel_account->getAuthDetail('refresh_token');

    if (!$refresh_token) {
        throw new AmazonSPAPIOAuthException('Invalid refresh_token');
    }

    return AmazonSPAPIOAuth::getAccessTokenFromRefreshToken(
        $refresh_token,
        $this->client_id,
        $this->client_secret
    );
}

public function prepareRequestConfig($channel_account, $token): array
{
    $auth_details = $channel_account->getAuthDetail();
    $region_key   = $auth_details['region'];
    $region       = AmazonSPAPIRegion::$$region_key;
    $endpoint     = AmazonSPAPIEndpoint::$$region_key;
    $assumedRole  = AssumeRole::assume(
        $region,
        $this->iam_user_access_key,
        $this->iam_user_secret_key,
        $this->iam_role_arn,
    );

    $config = Configuration::getDefaultConfiguration();
    $config->setAccessToken($token);
    $config->setAccessKey($assumedRole->getAccessKeyId());
    $config->setSecretKey($assumedRole->getSecretAccessKey());
    $config->setRegion($region);
    $config->setSecurityToken($assumedRole->getSessionToken());

    return $config;
}

```

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance62

Regular maintenance activity

Popularity25

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~336 days

Total

5

Last Release

234d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.5

v1.1.2PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/76c703c3de96776eafc564cd80d9c50cbb5487a179984c2c90558233d38cda33?d=identicon)[doublejames-ah](/maintainers/doublejames-ah)

![](https://avatars.githubusercontent.com/u/110097854?v=4)[JJTechWizards](/maintainers/JJTechWizards)[@JJTechWizards](https://github.com/JJTechWizards)

---

Top Contributors

[![mikmar-jj](https://avatars.githubusercontent.com/u/82880242?v=4)](https://github.com/mikmar-jj "mikmar-jj (10 commits)")[![marcinkantarowski](https://avatars.githubusercontent.com/u/82293113?v=4)](https://github.com/marcinkantarowski "marcinkantarowski (1 commits)")[![Nocture](https://avatars.githubusercontent.com/u/6805805?v=4)](https://github.com/Nocture "Nocture (1 commits)")

---

Tags

phpapisdkswagger

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/james-and-james-fulfilment-amazon-sp-api/health.svg)

```
[![Health](https://phpackages.com/badges/james-and-james-fulfilment-amazon-sp-api/health.svg)](https://phpackages.com/packages/james-and-james-fulfilment-amazon-sp-api)
```

###  Alternatives

[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[mailchimp/transactional

529.9M19](/packages/mailchimp-transactional)[resend/resend-php

Resend PHP library.

617.2M43](/packages/resend-resend-php)[clicksend/clicksend-php

351.6M11](/packages/clicksend-clicksend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.6M13](/packages/checkout-checkout-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
