NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #2594 most downloaded on Packagist
PHP client for Amazon's Selling Partner API
Latest stable
v7.4.13
Last release 24 days ago
29 Oct 2026
Ships on a steady schedule
a new release about every 2 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
143 releases · first in 2021
Drag across the ruler to compare, or tap a release to open it.
Support for Action Items, Action Plans, and Messaging v2026-04-20 APIs
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.4.12...v7.4.13
Allow Guzzle 8 (#909, thanks @mlahargou!)
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.4.11...v7.4.12
Undocumented 1amazonSellerId1 field to Shipping v2 AmazonOrderDetails (#908, thanks @colinmollenhour!)
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.4.10...v7.4.11
Regression due to excluding a file that was actually needed in #903, fixed in #906 which closes #907. Thanks @DaveLegg!
restrictedAuth() sending unfiltered dataElements (#905 fixes #859, thanks @DaveLegg!)
restrictedAuth() sending unfiltered dataElements (#905 fixes #859, thanks @DaveLegg!)Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.4.8...v7.4.9
Support for External Fulfillment API v2024-09-11
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.4.7...v7.4.8
Bug related to Saloon 4's new SSRF protection
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.4.6...v7.4.7
Laravel 13 support (#898, thanks @bashgeek!)
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.4.5...v7.4.6
Reintroduce buyerEmail orders attribute that was removed upstream
buyerEmail orders attribute that was removed upstream (#896)Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.4.4...v7.4.5
Updated from latest upstream models
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.4.3...v7.4.4
Updated from latest upstream models
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.4.2...v7.4.3
Circular schema generation issues
GET_DATE_RANGE_FINANCIAL_HOLDS_DATA report typeFull Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.4.1...v7.4.2
Deserialize optional DateTime fields properly when passed an empty string
void return type hints to middleware __invoke() methods (#876)Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.4.0...v7.4.1
Incorrect error format for getFulfillmentOrder responses
getFulfillmentOrder responses (#872)'true', 'false') properly (#873)ShippingServiceOptions->carrierWillPickUp nullable (#874)Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.3.2...v7.4.0
Handle document decoding for documents incorrectly marked as Cp1252 (#857, thanks @0xSekar!)
Cp1252 (#857, thanks @0xSekar!)Laravel 12 compatibility (#855, thanks @emielroelofsen!)
Deserializes trait definition (#854)Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.3.0...v7.3.1
Removed deprecated FBA Inbound v0 endpoints/DTOs
EmptyResponse DTO from 204 responses gracefully (#842)PrepDetails attributes nullable (#845)DateTimeInterface propertiesFull Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.2.4...v7.3.0
Add definitions for SNS reports currently missing from reports.json by @gravitiq-cm in https://github.com/jlevers/selling-partner-api/pull/808
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.2.3...v7.2.4
setPrepDetails and listPrepDetails endpoints for the FBA Inbound API v2024-03-20 (#796, thanks @iajrz!)
setPrepDetails and listPrepDetails endpoints for the FBA Inbound API v2024-03-20 (#796, thanks @iajrz!)readonly attribute from DTOs to make it easier to construct requestsrotateApplicationClientSecret endpoint with the proper grantless scopeFull Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.2.2...v7.2.3
Correct Singapore Seller Central URL in OAuth.php
https://sellercentral.amazon.sg instead of https://sellercentral.amazon.com.sg)Set OAuth token endpoint correctly
App Integrations v2024-04-01 API
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/7.1.1...v7.2.0
GetMyFeesEstimatesResponse now deserializes correctly, and more generally, array responses will be generated and deserialized correctly (#754, #759)
GetMyFeesEstimatesResponse now deserializes correctly, and more generally, array responses will be generated and deserialized correctly (#754, #759)ErrorList schemas that are supposed to be objects but are marked as array schemas in the upstream models are refactored to objects before schema generationY-m-d\TH:i\Z timestampsFull Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.1.0...7.1.1
Made $requiresAdditionalSellerInputs param to ShippingService DTO optional (#753, thanks @simonsolutions)
$requiresAdditionalSellerInputs param to ShippingService DTO optional (#753, thanks @simonsolutions)OAuth connector. Details in README.Region enum contains the three Amazon regionsMarketplace enum has helper methods for safely converting 2-letter country codes to Amazon marketplaces (fromCountryCode) and for getting a marketplace's region (toRegion)Endpoint enum's methods now make use of the Region and Marketplace enums to ensure full coverage when fetching an endpoint based on a country code, Marketplace, or RegionFull Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.0.4...v7.1.0
refinements and pagination are no longer required in ItemSearchResults (#741, thanks @KhorneHoly!)
refinements and pagination are no longer required in ItemSearchResults (#741, thanks @KhorneHoly!)x-amzn-Business-Id and FBA Inventory's x-amzn-idempotency-tokenFull Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.0.3...v7.0.4
Make it possible to disable caching altogether by passing null for the cache parameter to SellingPartnerApi::seller()/SellingPartnerApi::vendor().
null for the cache parameter to SellingPartnerApi::seller()/SellingPartnerApi::vendor().Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.0.2...v7.0.3
Cache keys for RDTs include the specific refresh token and delegatee (if applicable)
GetAccessTokenRequest doesn't send unnecessary default headers from SellingPartnerApi::defaultHeaders()Endpoint enum now has ::byCountryCode() and ::byRegion() methodsFull Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.0.1...v7.0.2
Try multiple datetime formats during deserialization before throwing an exception (#737, thanks @KhorneHoly!)
getMyFeesEstimates request properly (#736)Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v7.0.0...v7.0.1
Deprecated APIs are removed, and their connector accessor methods throw exceptions
SellingPartnerApi::make(...$options)->seller() and SellingPartnerApi::make(...$options)->vendor(), they are now accessed via SellingPartnerApi::seller(...$options) and SellingPartnerApi::vendor(...$options)authenticationClient constructor argument is now typed GuzzleHttp\Client instead of GuzzleHttp\ClientInterface for better Saloon interoperationDateTimeInterface is used for date parameters instead of DateTimeSellerConnector::orders()) are removed, since they're inevitably going to become out of datetokenCache constructor parameter allows the user to define a class that implements TokenCache for caching access tokens, which simplifies the end user's caching implementation compared to the old callback-based access token storage mechanismCONTRIBUTING.md to make it easier for others to get started making contributions'true' or 'false' instead of 1 or 0Thanks @dpash, @KhorneHoly, and @bgarret for your contributions!
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v6.0.6...v7.0.0
DateTime deserialization (#699, thanks @mickas! fixes #698)
AutomatedShippingSettings that are missing from upstream models0x0 as a default case in a deserialization match. Switched to using chr(0) so that 0 can be deserialized properly.composer/semver and highsidelabs/saloon-sdk-generator from regular dependencies to dev dependencies. This involved moving a lot of base classes, traits, and exception classes from highsidelabs/saloon-sdk-generator into the library itself, which is reflected in the code generation process.getUserAgent() method in SellingPartnerApi class (partial fix for #679)Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v6.0.5...v6.0.6
Fix createFeed example in README (#677, @spire-mike)
createFeed example in README (#677, @spire-mike)--
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v6.0.4...v6.0.5
Generate query strings like a=val1,val2 instead a=val1&a=val2. Amazon often requires, and always accepts (as far as I can tell) comma-separated query
a=val1,val2 instead a=val1&a=val2. Amazon often requires, and always accepts (as far as I can tell) comma-separated query string arrays, but often rejects the more standard format we were using before.JSON_UNESCAPED_SLASHES flag when outputting customized schema files in SchemaVersion## Fixed * #668: the Address DTO for the Orders API incorrectly had the name field set as required, but if you call getOrders/getOrder without an RDT,
Address DTO for the Orders API incorrectly had the name field set as required, but if you call getOrders/getOrder without an RDT, it won't return a name with the address.Moved composer/semver from require to require-dev in composer.json
composer/semver from require to require-dev in composer.jsonilluminate/support to require in composer.json. It was installed with dev dependencies, which means that normal Composer installations weren't working properly.library:update-version working properly. Previously the changes that were supposed to be committed were lost in a stash.crescat-io/saloon-sdk-generator was in composer.json instead of highsidelabs/saloon-sdk-generator, which led to missing files and incorrect dependenci
crescat-io/saloon-sdk-generator was in composer.json instead of highsidelabs/saloon-sdk-generator, which led to missing files and incorrect dependencies. I've released highsidelabs/saloon-sdk-generator, and updated composer.json to reflect that.> This version of the library is only compatible with PHP >=8.1.
[!WARNING] This version of the library is only compatible with PHP >=8.1.
This major release is a complete overhaul of the library. There is basically no code left at all from v5.
A quick summary of the big changes:
highsidelabs/saloon-sdk-generator, which is a fork of crescat-io/saloon-sdk-generator.docs/ section entirely, because a) the old documentation was often incomplete and/or misleading, and b) once you have a basic grasp of how this library works now, Amazon's documentation will tell you everything you need to know.All the functionality of v5 is still present: full API coverage, automatic RDT generation, document upload/download support. The syntax has changed somewhat, but the concepts are the same. It's now easier to access request and response internals, since all requests/responses have all the functionality of any other Saloon request or response.
The Configuration class has been replaced with the SellingPartnerApi class. This:
$config = new SellingPartnerApi\Configuration([
"lwaClientId" => "<LWA client ID>",
"lwaClientSecret" => "<LWA client secret>",
"lwaRefreshToken" => "<LWA refresh token>",
"awsAccessKeyId" => "<AWS access key ID>",
"awsSecretAccessKey" => "<AWS secret access key>",
// If you're not working in the North American marketplace, change
// this to another endpoint from lib/Endpoint.php
"endpoint" => SellingPartnerApi\Endpoint::NA,
]);
Now looks like this:
$connector = SellingPartnerApi::make(
clientId: 'amzn1.application-oa2-client.asdfqwertyuiop...',
clientSecret: 'amzn1.oa2-cs.v1.1234567890asdfghjkl...',
refreshToken: 'Atzr|IwEBIA...',
endpoint: Endpoint::NA, // Or Endpoint::EU, Endpoint::FE, Endpoint::NA_SANDBOX, etc.
);
To access a particular API, rather than directly instantiating an API class, like this:
$reportsApi = new ReportsV20210630Api($config);
$dfOrdersApi = new VendorDirectFulfillmentOrdersV1Api($config);
Do this:
$reportsApi = $connector()->seller()->reports();
$dfOrdersApi = $connector()->vendor()->directFulfillmentOrders();
To call an endpoint:
$response = $reportsApi->getReports(
reportTypes: ['GET_MERCHANT_ALL_LISTINGS'],
marketplaceIds: ['ATVPDKIKX0DER'],
createdAfter: new DateTime('2024-03-01'),
);
$json = $response->json();
$reports = $response->dto(); // A structured DTO
What was previously referred to as models are now called DTOs. DTOs are required to make POST/PUT/PATCH requests, similarly to how models were required for those sorts of create/update operations in v5. For an example of how to use a DTO to make a POST request, see the Working with DTOs section of the README.
To specify which data elements you want to retrieve when calling restricted endpoints (getOrder, getOrders, and getOrderItems), pass an additional dataElements parameter to SellingPartnerApi::make() rather than passing the $data_elements parameter to the restricted endpoint itself.
Any other questions about upgrading should be answerable using the README, but if you have any questions, feel free to open a discussion :)
add a CurrencyCode JPY by @tera911 in https://github.com/jlevers/selling-partner-api/pull/590
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.10.2...v5.10.3
Made PHP Spreadsheet maximum version 1.25.2 to maintain PHP 7.3 compatibility
1.25.2 to maintain PHP 7.3 compatibility (#554)EventCode 637 for Fulfillment Outbound API (#580)PrepInstruction NONE for Fulfillment Inbound APIFull Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.10.1...v5.10.2
Remove length limitation from district_or_county field in FBA Inbound API address model (#557, I forgot to include this in the v5.10.0 minor release)
district_or_county field in FBA Inbound API address model (#557, I forgot to include this in the v5.10.0 minor release)Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.10.0...v5.10.1
Improved messages when errors are thrown during automatic RDT generation
ObjectSerializer import from modelsJE_VOEC Deemed Reseller Type to Orders API (#570)Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.9.0...v5.10.0
Remove dependency on aws/aws-sdk-php by making calls to STS manually
aws/aws-sdk-php by making calls to STS manuallyRequest type to more general PSR RequestInterface type for AuthorizationSigner and RequestSigner contractsFull Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.8.4...v5.9.0
Don't auto-generate RDTs for sandbox calls
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.8.3...v5.8.4
Remove message length requirement error in no message exception in APlus Content API (#541, thanks @hnassr!)
#Fixed
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.8.2...v5.8.3
Fix double quote parsing in Document class for GET_LEDGER_SUMMARY_VIEW_DATA by @armageddon-cat in https://github.com/jlevers/selling-partner-api/pull/
-- Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.8.1...v5.8.2
Option to specify charset when uploading documents (#518, thanks @quazardous!)
FbaOutboundV20200701Api::submitFulfillmentOrderStatusUpdate operation addedCH_SUPPLIER_IMPORT (#515)PLN (#502, thanks @Inbasecom!)-- Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.7.0...v5.8.1
Fix feed upload signature matching bug by reverting the PR that allows specifying the charset when creating feed documents (#486, fixed by #497)
shipmentConfirmation endpoint for Orders API (#489)Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.6.0...v5.7.0
Specify which character set to use when uploading documents (thanks @quazardous!)
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.5.4...v5.6.0
Update model for Vendor procurement details in ListingsV20210801Api so that procurement details actually come through
ListingsV20210801Api so that procurement details actually come throughFull Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.5.3...v5.5.4
Incorrect deserialization for array types, leading to incorrectly empty field
DeemedResellerCategory from enum to string (#466)CatalogItemsV20220401Api to include new attributes from Amazon (#456)Added missing SellingPartnerApi\ApiException use statement in API classes
SellingPartnerApi\ApiException use statement in API classesAdded missing PrepInstruction enum values (#443, PR #446 -- thanks @suzol10!)
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.5.0...v5.5.1
Enable stream/resource in Document upload/download (#335 , thanks @quazardous!)
Document upload/download (#335 , thanks @quazardous!)BaseApiBaseApi::setConfig enables setting custom Configuration on any API class after instantiationFull Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.4.6...v5.5.0
### Patch release because I forgot to bump version number in composer.json for last release
composer.json for last releaseAdd NZ_VOEC to deemed reseller categories in OrderItem (#426, thanks @Alexander-Pfeffer!)
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.4.3...v5.4.4
Deserialize array types as associative arrays instead of objects (#368, #408)
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.4.2...v5.4.3
Convert arrow function to normal closure to preserve PHP 7.3 support
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.4.1...v5.4.2
Document::download() upgrades: make PHPSpreadsheet doesn't try to calculate formulas in CSV/TAB files, handle special case of quoted GET_LEDGER_DETAIL
Document::download() upgrades: make PHPSpreadsheet doesn't try to calculate formulas in CSV/TAB files, handle special case of quoted GET_LEDGER_DETAIL_VIEW_DATA report (#387, thanks @0xSekar!)Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.4.0...v5.4.1
Added AU_VOEC Deemed Reseller Category to OrdersV0 API (#382, thanks @KhorneHoly!)
AU_VOEC Deemed Reseller Category to OrdersV0 API (#382, thanks @KhorneHoly!)Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.3.0...v5.4.0
Support for the Shipping V2 API
Full Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.2.5...v5.3.0
ZPL LabelFormat option added to MerchantFulfillmentV0Api to match Amazon's API return format (#366, #365, thanks @booni3)
ZPL LabelFormat option added to MerchantFulfillmentV0Api to match Amazon's API return format (#366, #365, thanks @booni3)restricted key added to ReportType::GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_V2 (#367)MerchantFulfillmentV0 Label model (#364, thanks @booni3!)requested and scheduled keys on ReportType constants where Amazon has documented whether the report type can be scheduled and/or requestedFull Changelog: https://github.com/jlevers/selling-partner-api/compare/v5.2.4...v5.2.5
One column per quarter.