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

ActiveLibrary[API Development](/categories/api)

looxis/laravel-amazon-mws
=========================

Simple Amazon MWS API Package for Laravel

0.3.0(4y ago)3218.7k↓43.9%9[3 issues](https://github.com/looxis/laravel-amazon-mws/issues)MITPHPPHP ^8.0

Since Mar 5Pushed 4y ago4 watchersCompare

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

READMEChangelog (10)Dependencies (5)Versions (21)Used By (0)

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

[](#laravel-amazon-mws)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Latest Version on Packagist](https://camo.githubusercontent.com/053e1dcbac611efea700abb329e9d0259976f5c2b3cf4dc002c64fd6508a6f69/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6f6f7869732f6c61726176656c2d616d617a6f6e2d6d77732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/looxis/laravel-amazon-mws)[![Build Status](https://camo.githubusercontent.com/c0333f15bc2277b692f77ff452fb1e1dd9e67f51c0e33e8f9c0db55d4bdcf007/68747470733a2f2f7472617669732d63692e6f72672f6c6f6f7869732f6c61726176656c2d616d617a6f6e2d6d77732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/looxis/laravel-amazon-mws)[![StyleCI](https://camo.githubusercontent.com/db46bfe7a01199786b2c286016ad30f3dcc19b44b25d0d3b1f1caa5b0a084806/68747470733a2f2f7374796c6563692e696f2f7265706f732f3234323737373932312f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/242777921)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7f66bf9be7116a778b12f2bc30801597f94eb0150892a0b7fcfd2461039788e0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c6f6f7869732f6c61726176656c2d616d617a6f6e2d6d77732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/looxis/laravel-amazon-mws/?branch=master)

Simple Amazon Marketplace Web Service API Package for Laravel

This package is under development. Currently we have only implemented the endpoints we are using. Feel free to add the endpoints you need ([contribute](#contributing)). A List of all available endpoints you can see under the endpoint [road map](#road-map).

🚨 Amazon Introduced a new [Selling Partner API](https://developer.amazonservices.com/)A modernized suite of REST APIs utilizing standards. [Github Docs](https://github.com/amzn/selling-partner-api-docs)The laravel-amazon-mws package provides only methods for the Amazon MWS service. We will add a laravel package for the SP-Api next year (2021).

Contents
--------

[](#contents)

- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
    - [Authentication](#authentication)
    - [Marketplaces](#marketplaces)
    - [Orders](#orders)
        - [List Orders](#list-orders)
        - [Get Order](#get-order)
        - [List Order Items](#list-order-items)
    - [Feeds](#feeds)
        - [Submit Feed](#submit-feed)
        - [Submit Invoice Feed](#submit-invoice-feed)
        - [Get Feed Submission Result](#get-feed-submission-result)
    - [Merchant Fulfillment](#merchant-fulfillment)
        - [Get Eligible Shipping Services](#get-eligible-shipping-services)
        - [Get Shipment](#get-shipment)
        - [Create Shipment](#create-shipment)
        - [Cancel Shipment](#cancel-shipment)
        - [Get Additional Seller Inputs](#get-additional-seller-inputs)
        - [Get Service Status](#get-merchant-fulfillment-service-status)
    - [Responses](#responses)
    - [Exceptions](#exceptions)
- [Road Map](#road-map)
- [Testing](#testing)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Security](#security)
- [License](#license)

Link to the [Official Amazon MWS Documentation](https://docs.developer.amazonservices.com/en_US/dev_guide/index.html)

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

[](#installation)

This package requires PHP 7.3 and Laravel 8.0 or higher. For older laravel versions install the latest 0.1.x version.

Require the package using composer:

```
composer require looxis/laravel-amazon-mws
```

The package will automatically register itself.

Add your Environment Variables for MWS to your .env File. The variable names are listed in the amazon-mws.php [config file](#configuration).

Configuration
-------------

[](#configuration)

To successfully authenticate with the Amazon Marketplace Web Service you need to add the Environment variables to your `.env` File. The variable names are listed in the amazon-mws.php [config file](#configuration). Also you can set a default marketplace.

You can optionally publish the configuration with:

```
$ php artisan vendor:publish --provider="Looxis\LaravelAmazonMWS\AmazonMWSServiceProvider" --tag="config"
```

This will create an `amazon-mws.php` in your config directory.

Config file content with the env variables:

```
 'XXX-XXXXXXX-XXXXXXX', //Amazon Order Id
    'invoicenumber' => 'R21-1234', //Your Invoice Number
    'documenttype' => 'Invoice'
];

// Generate Feed Option metadata from params
$feedOptions = collect($params)->map(function($param, $key) {
            return "metadata:{$key}={$param}";
        })->values()->implode(';');

// Submit
$response = AmazonMWS::feeds()
                ->setType("_UPLOAD_VAT_INVOICE_")
                ->setContent($invoiceFileContent)
                ->setParams([
                    'FeedOptions' => $feedOptions
                ])
                ->submit();
```

##### Throttling

[](#throttling-4)

For the feed type *UPLOAD\_VAT\_INVOICE*, the throttle limit is 1 invoice upload per 3 seconds, or 20 invoices per minute, or 1200 invoices per hour, or 28800 invoices per day.

##### Responses

[](#responses)

The Amazon MWS XML responses are parsed and will be casted into a convenient array structure. For checking if the Feed was successful you need to check the result via the [GetSubmissionFeedResult](https://docs.developer.amazonservices.com/en_US/feeds/Feeds_GetFeedSubmissionResult.html) endpoint.

SubmitFeedResponse Example:

```
[
    "request_id" => "e86f7299-9712-43e3-b290-b659da85b527"
    "data" => [
        "FeedSubmissionId" => "2291326430"
        "FeedType" => "_POST_ORDER_ACKNOWLEDGEMENT_DATA_"
        "SubmittedDate" => "2020-03-04T14:54:14+00:00"
        "FeedProcessingStatus" => "_SUBMITTED_"
    ]
]
```

#### Get Feed Submission Result

[](#get-feed-submission-result)

Returns the feed processing report and the Content-MD5 header.

Pass the Feed Submission Id as a parameter to retrieve the feed result Amazon MWS Description [GetFeedSubmissionResult](https://docs.developer.amazonservices.com/en_US/feeds/Feeds_GetFeedSubmissionResult.html)

*Warning: Invoice Feed Submission Results are returning blank strings instead of a SubmitFeedResponse*

```
$response = AmazonMWS::feeds()
                ->getFeedSubmissionResult($feedSubmissionId);
```

##### Throttling

[](#throttling-5)

- maximum request quota of 15 and a restore rate of one request every minute.
- Hourly request quote: 60 [MWS Throttling Algorithm](https://docs.developer.amazonservices.com/en_US/dev_guide/DG_Throttling.html)
- Throws a ServerException with `Request is throttled`

##### Responses

[](#responses-1)

The Feed Submission Result responses are parsed and will be casted into a convenient structure.

SubmitFeedResponse Example:

```
[
    "status_code" => "Complete",
    "processing_summary" => [
        "MessagesProcessed" => "2"
        "MessagesSuccessful" => "2"
        "MessagesWithError" => "0"
        "MessagesWithWarning" => "0"
    ],
    "result" => null
]
```

### Merchant Fulfillment

[](#merchant-fulfillment)

With the Merchant Fulfillment service, you can build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services.

[Amazon MWS Merchant Fulfillment Documentation Overview](https://docs.developer.amazonservices.com/en_US/merch_fulfill/MerchFulfill_Overview.html)

#### Get Eligible Shipping Services

[](#get-eligible-shipping-services)

Returns a list of shipping service offers. [MWS Get Eligible Shipping Services Documentation](https://docs.developer.amazonservices.com/en_US/merch_fulfill/MerchFulfill_GetEligibleShippingServices.html)

Fill the params with the [ShipmentRequestDetails](https://docs.developer.amazonservices.com/en_US/merch_fulfill/MerchFulfill_Datatypes.html#ShipmentRequestDetails) and the [ShippingOfferingFilter](https://docs.developer.amazonservices.com/en_US/merch_fulfill/MerchFulfill_Datatypes.html#ShippingOfferingFilter)

```
$params = [
    'ShipmentRequestDetails' => [...],
    'ShippingOfferingFilter' => [...]
];
$response = AmazonMWS::merchantFulfillment()->getEligibleShippingServices($params);
```

##### Throttling

[](#throttling-6)

- maximum request quota of 10 and a restore rate of 5 requests every second. [MWS Throttling Algorithm](https://docs.developer.amazonservices.com/en_US/dev_guide/DG_Throttling.html)
- Throws a ServerException with `Request is throttled`

#### Get Shipment

[](#get-shipment)

Returns an existing shipment for a given identifier. [MWS Get Shipment Documentation](https://docs.developer.amazonservices.com/en_US/merch_fulfill/MerchFulfill_GetShipment.html)

```
$response = AmazonMWS::merchantFulfillment()->getShipment($shipmentId);
```

##### Throttling

[](#throttling-7)

- maximum request quota of 10 and a restore rate of 5 requests every second. [MWS Throttling Algorithm](https://docs.developer.amazonservices.com/en_US/dev_guide/DG_Throttling.html)
- Throws a ServerException with `Request is throttled`

#### Create Shipment

[](#create-shipment)

The CreateShipment operation purchases shipping and returns PDF, PNG, or ZPL document data for a shipping label, depending on the carrier. [MWS Create Shipment Documentation](https://docs.developer.amazonservices.com/en_US/merch_fulfill/MerchFulfill_CreateShipment.html)

```
$data = [
    'ShippingServiceId' => 'shipment-service-id', //get the shipment id with getEligibleShippingServices()
    'ShipmentRequestDetails' => [...],
];
$response = AmazonMWS::merchantFulfillment()->createShipment($data);
```

##### Throttling

[](#throttling-8)

- maximum request quota of 10 and a restore rate of 5 requests every second. [MWS Throttling Algorithm](https://docs.developer.amazonservices.com/en_US/dev_guide/DG_Throttling.html)
- Throws a ServerException with `Request is throttled`

#### Cancel Shipment

[](#cancel-shipment)

Cancels an existing shipment. [MWS Cancel Shipment Documentation](https://docs.developer.amazonservices.com/en_US/merch_fulfill/MerchFulfill_CancelShipment.html)

```
$shipmentId = '1234xx1231xx1234';
$response = AmazonMWS::merchantFulfillment()->cancelShipment($shipmentId);
```

##### Throttling

[](#throttling-9)

- maximum request quota of 10 and a restore rate of 5 requests every second. [MWS Throttling Algorithm](https://docs.developer.amazonservices.com/en_US/dev_guide/DG_Throttling.html)
- Throws a ServerException with `Request is throttled`

#### Get Additional Seller Inputs

[](#get-additional-seller-inputs)

Returns a list of additional seller inputs that are required from the seller to purchase the shipping service that you specify. [MWS Get Additional Seller Inputs Documentation](https://docs.developer.amazonservices.com/en_US/merch_fulfill/MerchFulfill_GetAdditionalSellerInputs.html)

```
$data = [
    'OrderId' => 'XXX-XXXXXXX-XXXXXXX',
    'ShippingServiceId' => 'shipment-service-id', //get the shipment id with getEligibleShippingServices()
    'ShippingFromAddress' => [...],
];
$response = AmazonMWS::merchantFulfillment()->getAdditionalSellerInputs($data);
```

##### Throttling

[](#throttling-10)

- maximum request quota of 10 and a restore rate of 5 requests every second. [MWS Throttling Algorithm](https://docs.developer.amazonservices.com/en_US/dev_guide/DG_Throttling.html)
- Throws a ServerException with `Request is throttled`

#### Get Service Status

[](#get-service-status)

Returns the operational status of the Merchant Fulfillment service. [MWS Get Service Status Documentation](https://docs.developer.amazonservices.com/en_US/merch_fulfill/MWS_GetServiceStatus.html)

```
$response = AmazonMWS::merchantFulfillment()->getServiceStatus();
```

##### Throttling

[](#throttling-11)

- maximum request quota of 2 and a restore rate of 1 request every 5 seconds. [MWS Throttling Algorithm](https://docs.developer.amazonservices.com/en_US/dev_guide/DG_Throttling.html)
- Throws a ServerException with `Request is throttled`

### General Responses

[](#general-responses)

[Response Format Documentation](https://docs.developer.amazonservices.com/en_US/dev_guide/DG_ResponseFormat.html)The Amazon MWS XML responses are parsed and will be casted into a convenient array structure. GetOrder Response Example:

```
[
    "request_id" => "be781aff-3c63-485a-aec8-951ed3be2ba4",
    "data" => [
        "AmazonOrderId" => "902-3159896-1390916",
        ...
    ]
]
```

### Exceptions

[](#exceptions)

The Laravel Amazon MWS package does not catch the Exceptions returned by guzzle. For Example for throttling ServerExceptions or missing Parameter Client Exceptions.

Endpoint Road map
-----------------

[](#endpoint-road-map)

Laravel Amazon MWS is still under development. We have only added the endpoints we currently are using ourselfs. We decided to ship it in this early stage so you can help to add some endpoits or use the already existing.

Endpoint List:

- Orders ([MWS Documentation Overview](https://docs.developer.amazonservices.com/en_US/orders-2013-09-01/Orders_Overview.html))
    - ListOrders
    - ListOrdersByNextToken
    - GetOrder
    - ListOrderItems
    - ListOrderItemsByNextToken
    - GetServiceStatus
    - Orders Datatypes
- Feeds ([MWS Documentation Overview](https://docs.developer.amazonservices.com/en_US/feeds/Feeds_Overview.html))
    - SubmitFeed
    - Submit Invoice VAT Feed
    - GetFeedSubmissionList
    - GetFeedSubmissionListByNextToken
    - GetFeedSubmissionCount
    - CancelFeedSubmissions
    - GetFeedSubmissionResult
- Easy Ship ([MWS Documentation Overview](https://docs.developer.amazonservices.com/en_US/easy_ship/EasyShip_Overview.html))
- Finances ([MWS Documentation Overview](https://docs.developer.amazonservices.com/en_US/finances/Finances_Overview.html))
- FulFillment Inbound Shipment ([MWS Documentation Overview](https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_Overview.html))
- FulFillment Inventory ([MWS Documentation Overview](https://docs.developer.amazonservices.com/en_US/fba_inventory/FBAInventory_Overview.html))
- FulFillment Outbound Shipment ([MWS Documentation Overview](https://docs.developer.amazonservices.com/en_US/fba_outbound/FBAOutbound_Overview.html))
- Merchant Fulfillment ([MWS Documentation Overview](https://docs.developer.amazonservices.com/en_US/merch_fulfill/MerchFulfill_Overview.html))
    - GetEligibleShippingServices
    - GetAdditionalSellerInputs
    - CreateShipment
    - GetShipment
    - CancelShipment
    - GetServiceStatus
- Products ([MWS Documentation Overview](https://docs.developer.amazonservices.com/en_US/products/Products_Overview.html))
- Recommendations ([MWS Documentation Overview](https://docs.developer.amazonservices.com/en_US/recommendations/Recommendations_Overview.html))
- Reports ([MWS Documentation Overview](https://docs.developer.amazonservices.com/en_US/reports/Reports_Overview.html))
- Sellers ([MWS Documentation Overview](https://docs.developer.amazonservices.com/en_US/sellers/Sellers_Overview.html))
- Shipment Invoicing ([MWS Documentation Overview](https://docs.developer.amazonservices.com/en_US/shipment_invoicing/ShipmentInvoicing_Overview.html))
- Subscriptions ([MWS Documentation Overview](https://docs.developer.amazonservices.com/en_US/subscriptions/Subscriptions_Overview.html))

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Christian Stefener](https://github.com/ChrisSFR)
- [Jannik Malken](https://github.com/mannikj)
- [All Contributors](../../contributors)

About us
--------

[](#about-us)

LOOXIS GmbH based in Minden, Germany.

LOOXIS is a manufacturer of personalised gift articles, which are sold throughout Europe in (photo) specialist shops and via our online shop under [www.looxis.com](https://looxis.de).

License
-------

[](#license)

[MIT](./LICENSE.md)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 96.6% 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 ~25 days

Recently: every ~51 days

Total

19

Last Release

1801d ago

PHP version history (2 changes)0.1.0PHP ^7.3

0.3.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/cbb2b81c139ed56113959ca27efc131af8d86a5dc5fb3f12b400100572d5d2d7?d=identicon)[Looxis](/maintainers/Looxis)

---

Top Contributors

[![krizzdev](https://avatars.githubusercontent.com/u/5312693?v=4)](https://github.com/krizzdev "krizzdev (85 commits)")[![rdfito](https://avatars.githubusercontent.com/u/5650220?v=4)](https://github.com/rdfito "rdfito (2 commits)")[![LooxisDev](https://avatars.githubusercontent.com/u/25901673?v=4)](https://github.com/LooxisDev "LooxisDev (1 commits)")

---

Tags

amazonmwslooxisamazon-mwslaravel-amazon-mws

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[weengsapp/amazon-mws-client

PHP client for Amazon MWS API

1551.7k](/packages/weengsapp-amazon-mws-client)[thiagomarini/amazon-mws-client

PHP client for Amazon MWS API

151.4k](/packages/thiagomarini-amazon-mws-client)

PHPackages © 2026

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