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

ActiveLibrary

glitzhub/amazon-mws
===================

Library to interface with Amazon MWS

12PHP

Since Jun 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/xudongding/amazon-mws)[ Packagist](https://packagist.org/packages/glitzhub/amazon-mws)[ RSS](/packages/glitzhub-amazon-mws/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Amazon Marketplace Web Service
==============================

[](#amazon-marketplace-web-service)

Library to interface with Amazon Marketplace Web Service (Amazon MWS).

### Installation

[](#installation)

```
$ composer require glitzhub/amazon-mws
```

### Usage

[](#usage)

Instantiate MWS client

```
$mwsClient = new GlitzHub\MWSClient([
    'accessKeyId' => 'AWS_ACCESS_KEY_ID',   // AWSAccessKeyId
    'secretKey' => 'SECRET_KEY',            // Secret Key
    'marketplaceId' => 'MARKETPLACE_ID',    // MarketplaceId
    'sellerId' => 'SELLER_ID',              // SellerId
    'authToken' => 'MWS_AUTH_TOKEN',        // MWSAuthToken
]);
```

List orders

```
$orders = $mwsClient->listOrders(
    time() - 3600,
    null,
    ['Unshipped', 'PartiallyShipped'],
    ['AFN', 'MFN']
);
```

List order items

```
$items = $mwsClient->listOrderItems('AMAZON_ORDER_ID');
```

Get order by Amazon order ID

```
$order = $mwsClient->getOrder('AMAZON_ORDER_ID');
$orders = $mwsClient->getOrder(['AMAZON_ORDER_ID_1', 'AMAZON_ORDER_ID_2']);
```

Send order fulfillment feed

```
$feedType = '_POST_ORDER_FULFILLMENT_DATA_';
$feedContent = [
    'MessageType' => 'OrderFulfillment',
    'Message' => [
        [
            'MessageID' => 1,
            'OperationType' => 'Update',
            'OrderFulfillment' => [
                'AmazonOrderID' => 'AMAZON_ORDER_ID',
                'FulfillmentDate' => date(DATE_W3C, time()),
                'FulfillmentData' => [
                    'CarrierName' => 'CARRIER_NAME',
                    'ShippingMethod' => 'SHIPPING_METHOD',
                    'ShipperTrackingNumber' => 'TRACKING_NUMBER',
                ],
                'Item' => [
                    [
                        'AmazonOrderItemCode' => 'AMAZON_ORDER_ITEM_CODE_1',
                        'Quantity' => 'QUANTITY_1'
                    ],
                    [
                        'AmazonOrderItemCode' => 'AMAZON_ORDER_ITEM_CODE_2',
                        'Quantity' => 'QUANTITY_2'
                    ]
                ]
            ]
        ]
    ]
];
$response = $mwsClient->submitFeed($feedType, $feedContent);
```

Send inventory feed

```
$feedType = '_POST_INVENTORY_AVAILABILITY_DATA_';
$feedContent = [
    'MessageType' => 'Inventory',
    'Message' => [
        [
            'MessageID' => 1,
            'OperationType' => 'Update',
            'Inventory' => [
                'SKU' => 'SKU_1',
                'Quantity' => 'QUANTITY_1'
            ]
        ],
        [
            'MessageID' => 2,
            'OperationType' => 'Update',
            'Inventory' => [
                'SKU' => 'SKU_2',
                'Quantity' => 'QUANTITY_2'
            ]
        ]
    ]
];
$response = $mwsClient->submitFeed($feedType, $feedContent);
```

Request report

```
$requestReportId = $mwsClient->requestReport(
    '_GET_AFN_INVENTORY_DATA_',
    strtotime('2020-05-01 00:00'),
    strtotime('2020-06-01 00:00')
);
```

Get report

```
$report = $mwsClient->getReport('REQUEST_REPORT_ID');
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

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.

### Community

Maintainers

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

### Embed Badge

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

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

PHPackages © 2026

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