PHPackages                             satishsinghdevbha/amazon-mws-laravel - 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. satishsinghdevbha/amazon-mws-laravel

ActiveLibrary[API Development](/categories/api)

satishsinghdevbha/amazon-mws-laravel
====================================

A Laravel library for Amazon's MWS web services, supporting Laravel 5-7+

8.0.7(4y ago)1588Apache-2.0PHPPHP &gt;=7.3

Since Apr 29Pushed 4y ago1 watchersCompare

[ Source](https://github.com/satish-singh-devbha/amazon-mws-laravel)[ Packagist](https://packagist.org/packages/satishsinghdevbha/amazon-mws-laravel)[ RSS](/packages/satishsinghdevbha-amazon-mws-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (8)Versions (58)Used By (0)

[![Build Status](https://camo.githubusercontent.com/cd1d8205d4cba5e33677ac1cbafe56e3f760129a22eaf04cda17c54e98616d86/68747470733a2f2f7472617669732d63692e6f72672f6b656974686272696e6b2f616d617a6f6e2d6d77732d6c61726176656c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/keithbrink/amazon-mws-laravel) [![StyleCI](https://camo.githubusercontent.com/402df580e97aba144365b3fc02e03e19f0a6dc1e27f8255bc4805a07f27af7b0/68747470733a2f2f7374796c6563692e696f2f7265706f732f3133333539393139372f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/133599197)

Amazon MWS for Laravel
======================

[](#amazon-mws-for-laravel)

============

Planning to migrate to the new Selling Partner API? Have a look at our [PHP SDK for Amazon's Selling Partner API](https://github.com/jasara/php-amzn-selling-partner-api), as well as our [Laravel wrapper](https://github.com/jasara/laravel-selling-partner-api).

A Laravel package to connect to Amazon's Merchant Web Services (MWS).

If you are using Laravel 6 or lower, use version 5.0. On Laravel 7, use version 7.0+.

This is **NOT** for Amazon Web Services (AWS) - Cloud Computing Services.

Installation
------------

[](#installation)

Install the package using `composer require keithbrink/amazon-mws-laravel`.

For Laravel 5.5 and up, the package will be automatically discovered. For other versions, you can add `KeithBrink\AmazonMws\MwsServiceProvider` to your `config/app.php` file.

Run `php artisan vendor:publish --provider="KeithBrink\AmazonMws\MwsServiceProvider" --tag="config"` to add the `amazon-mws.php` config file to your config directory.

Usage
-----

[](#usage)

The general work flow for using one of the objects is this:

1. Create an object for the task you need to perform.
2. Load it up with parameters, depending on the object, using *set\_\_\_\_* methods.
3. Submit the request to Amazon. The methods to do this are usually named *fetch\_\_\_\_* or *submit\_\_\_\_* and have no parameters.
4. Reference the returned data, whether as single values or in bulk, using *get\_\_\_\_* methods.
5. Monitor the performance of the library using the built-in logging system.

Note that if you want to act on more than one Amazon store, you will need a separate object for each store.

Also note that the objects perform best when they are not treated as reusable. Otherwise, you may end up grabbing old response data if a new request fails.

If you want to learn how to use a specific function, the best way is to read the comments above the function; they are detailed and helpful.

Dynamic Config
--------------

[](#dynamic-config)

If you would like to change the configuration info used in an Amazon call to something other than the info in the config file, you can add the `setConfig($config)` function to any call. The `$config` parameter should be an array following this template:

```
$config = [
    'merchantId' => '',
    'marketplaceId' => '',
    'keyId' => '',
    'secretKey' => '',
    'amazonServiceUrl' => '',
];
```

Example Usage
-------------

[](#example-usage)

Here are a couple of examples of the library in use.

Here is an example of a function used to get all warehouse-fulfilled orders from Amazon updated in the past 24 hours:

```
use KeithBrink\AmazonMws\AmazonOrderList;

function getAmazonOrders() {
    $amz = new AmazonOrderList("myStore"); //store name matches the array key in the config file
    $amz->setLimits('Modified', "- 24 hours");
    $amz->setFulfillmentChannelFilter("MFN"); //no Amazon-fulfilled orders
    $amz->setOrderStatusFilter(
        array("Unshipped", "PartiallyShipped", "Canceled", "Unfulfillable")
        ); //no shipped or pending
    $amz->setUseToken(); //Amazon sends orders 100 at a time, but we want them all
    $amz->fetchOrders();

    $orders = [];
    foreach($amz->getList() as $order) {
        $orders = $order->getData();
    }
    return $orders;
}
```

This example shows a function used to send a previously-created XML feed to Amazon to update Inventory numbers, and includes an example of a dynamic config:

```
use KeithBrink\AmazonMws\AmazonFeed;

function sendInventoryFeed($feed) {
    $config = [
        'merchantId' => '',
        'marketplaceId' => '',
        'keyId' => '',
        'secretKey' => '',
        'amazonServiceUrl' => '',
    ];

    $amz = new AmazonFeed("myStore"); //store name matches the array key in the config file
    $amz->setConfig($config);
    $amz->setFeedType("_POST_INVENTORY_AVAILABILITY_DATA_"); //feed types listed in documentation
    $amz->setFeedContent($feed);
    $amz->submitFeed();
    return $amz->getResponse();
}
```

Credits
-------

[](#credits)

This package was forked from:

which was forked from:

which was forked from:

who is the original creator of this package.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~43 days

Recently: every ~26 days

Total

57

Last Release

1622d ago

Major Versions

3.0.2 → v4.0.02018-05-16

v4.1.4 → 5.0.02019-09-06

5.0.1 → 7.0.02020-03-12

5.x-dev → 7.x-dev2020-08-24

7.2.1 → 8.x-dev2020-09-08

PHP version history (4 changes)1.0.0PHP &gt;=5.4.0

2.0.0PHP &gt;=5.5.9

7.0.0PHP &gt;=7.2

8.x-devPHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/35d89c0f59ccd733c3c4c310534603ed899167d2a7adeabdb45a4d118b876c98?d=identicon)[satish\_singh\_devbha](/maintainers/satish_singh_devbha)

---

Top Contributors

[![keithbrink](https://avatars.githubusercontent.com/u/15267205?v=4)](https://github.com/keithbrink "keithbrink (121 commits)")[![Peardian](https://avatars.githubusercontent.com/u/2624085?v=4)](https://github.com/Peardian "Peardian (74 commits)")[![carl689](https://avatars.githubusercontent.com/u/619419?v=4)](https://github.com/carl689 "carl689 (40 commits)")[![przemekperon](https://avatars.githubusercontent.com/u/169778?v=4)](https://github.com/przemekperon "przemekperon (40 commits)")[![tomcoonen](https://avatars.githubusercontent.com/u/988013?v=4)](https://github.com/tomcoonen "tomcoonen (8 commits)")[![MondstaubUG](https://avatars.githubusercontent.com/u/67374033?v=4)](https://github.com/MondstaubUG "MondstaubUG (5 commits)")[![ruskiyos](https://avatars.githubusercontent.com/u/1847403?v=4)](https://github.com/ruskiyos "ruskiyos (4 commits)")[![mikevrind](https://avatars.githubusercontent.com/u/594341?v=4)](https://github.com/mikevrind "mikevrind (4 commits)")[![pdbreen](https://avatars.githubusercontent.com/u/1670907?v=4)](https://github.com/pdbreen "pdbreen (3 commits)")[![EliasKotlyar](https://avatars.githubusercontent.com/u/9529505?v=4)](https://github.com/EliasKotlyar "EliasKotlyar (2 commits)")[![zjbarg](https://avatars.githubusercontent.com/u/26728749?v=4)](https://github.com/zjbarg "zjbarg (2 commits)")[![fromthecove](https://avatars.githubusercontent.com/u/796606?v=4)](https://github.com/fromthecove "fromthecove (2 commits)")[![mohamedziada](https://avatars.githubusercontent.com/u/845253?v=4)](https://github.com/mohamedziada "mohamedziada (1 commits)")[![ennnnny](https://avatars.githubusercontent.com/u/9587073?v=4)](https://github.com/ennnnny "ennnnny (1 commits)")[![erayalakese](https://avatars.githubusercontent.com/u/782514?v=4)](https://github.com/erayalakese "erayalakese (1 commits)")[![forgueam](https://avatars.githubusercontent.com/u/224097?v=4)](https://github.com/forgueam "forgueam (1 commits)")[![gitmastro](https://avatars.githubusercontent.com/u/1649046?v=4)](https://github.com/gitmastro "gitmastro (1 commits)")[![jeyasithar](https://avatars.githubusercontent.com/u/3623998?v=4)](https://github.com/jeyasithar "jeyasithar (1 commits)")[![a349944418](https://avatars.githubusercontent.com/u/4004002?v=4)](https://github.com/a349944418 "a349944418 (1 commits)")[![satish-singh-devbha](https://avatars.githubusercontent.com/u/83682732?v=4)](https://github.com/satish-singh-devbha "satish-singh-devbha (1 commits)")

---

Tags

phpapilaravelamazonmws

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/satishsinghdevbha-amazon-mws-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/satishsinghdevbha-amazon-mws-laravel/health.svg)](https://phpackages.com/packages/satishsinghdevbha-amazon-mws-laravel)
```

###  Alternatives

[resend/resend-laravel

Resend for Laravel

1191.4M6](/packages/resend-resend-laravel)[sonnenglas/laravel-amazon-mws

Use Amazon's MWS web services with Laravel ^7.x. Based on creacoon/amazon-mws-laravel package and modified to make it compatible with latest Laravel releases (+ bugfixes).

644.5k](/packages/sonnenglas-laravel-amazon-mws)[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)

PHPackages © 2026

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