PHPackages                             zero1/magento2-rest-client - 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. zero1/magento2-rest-client

ActiveLibrary[API Development](/categories/api)

zero1/magento2-rest-client
==========================

PHP rest client for Magento 2

1.2.0(5y ago)42.1k1[2 PRs](https://github.com/zero1limited/magento2-rest-client/pulls)MITPHP

Since Oct 28Pushed 3y ago3 watchersCompare

[ Source](https://github.com/zero1limited/magento2-rest-client)[ Packagist](https://packagist.org/packages/zero1/magento2-rest-client)[ RSS](/packages/zero1-magento2-rest-client/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (3)Dependencies (6)Versions (26)Used By (0)

magento2-rest-client
====================

[](#magento2-rest-client)

PHP rest client for Magento 2

Examples
--------

[](#examples)

More examples can be found in the [examples](/examples) directory.

```
$magento = new Magento2\Client(
    'https://www.mysite.com',
    'username',
    'password'
);

$products = $magento->getProducts([
    [['type_id', 'simple', 'eq']],
    [['status', 1, 'eq']],
    [['visibility', 1, 'gt']]
]);
```

*get all simple, enabled and visible products*

Changelog
---------

[](#changelog)

- 1.0.0
    Initial commit
- 1.0.1
    Added the methods:

    - getStockItem
    - getCategories
    - getStoreViews
    - getStoreGroups
    - getCmsPages
- 1.0.2

    - Added method getStoreConfiguration
    - added to docs
    - moved examples
    - added example
- 1.0.3 Added the methods:

    - getProductBySku($sku)
    - setStockLevelForSku($sku, $quantity, $item\_id)
    - loadOrder($id)
    - getOrders($filter)
    - getCustomer($id)
    - addOrderComment($orderId, $status, $message, $notify)
    - getAllProducts($filters)
    - getStockInfo($sku\_or\_product\_id)
    - updateStock($sku\_or\_id, $stockdata)
    - getAllGiftCards
    - updateGiftCard($code, $balance, $expiry = null)
    - getGiftCardFromOrder($order\_id)
- 1.0.5 Added the methods:

    - getAllCategories($orderBy, $page, $limit)
    - getCustomer($customer\_id)
    - getOrder($order\_id)
    - getOrders($where, $orderBy, $page, $limit)
    - getProductBySku($sku)
    - setStockLevelForSku(($sku, $quantity, $item\_id)
- 1.0.6 Added the methods:

    - getStockStatuses($sku)
    - shipOrder($orderId, $items = \[\], $notify = true, $appendComment = true, $comment = \[\], $tracks = \[\], $packages = \[\], $arguments = \[\])
    - getOrderItems($where = \[\], $orderBy = null, $page = 1, $limit = 100)
    - Added the ability to supply custom configuration to the guzzle client
- 1.0.7

    - Bumped Guzzle version to support newer apps.
- 1.0.10 Replaced attribute methods:

    - getProductAttributeOptions($attribute = 'string')
    - getProductAttribute($attribute = 'string')
    - addProductAttributeLabel($attribute = 'string', $label = 'string')
    - deleteProductAttributeLabel($attribute = 'string', int $label\_id)
- 1.0.18

    - Refactor to allow use with custom endpoints, see [example11](/examples/example11.php)
- 1.0.19

    - Addition of "entity not found" exception, see [example12](/examples/example12.php)
- 1.0.20

    - Added update product example
    - Added get product attribute options example
    - Added update product function
- 1.1.0

    - Added ability to pass in token manager, see [example15](/examples/example15.php)
    - bug fix: getAllCategories will now recursively get all categories instead of just the first page
    - bug fix: getCategories invalid url endpoint resolved
    - feature: getProductAttributeOptions can now have a store code passed in
    - feature: addProductAttributeLabel can now be passed a list of "store labels" which should be added to the new attribute option
    - bug fix: setWebsiteForProduct invalid url endpoint resolved
    - feature: Tier prices can now be managed through: getTierPrices, removeTierPrices, setTierPrices
    - feature: products can now be added to categories via addProductToCategory
    - feature: media gallery entries can now be managed through: getMediaGalleryEntries, addMediaGalleryEntry, updateMediaGalleryEntry, deleteMediaGalleryEntry

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~24 days

Recently: every ~15 days

Total

23

Last Release

1868d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b08c35b603becab270a53db6ec969f48be0c353a20ee2985bb1a8ec5a9b64e9?d=identicon)[zero1](/maintainers/zero1)

---

Top Contributors

[![ssx](https://avatars.githubusercontent.com/u/254889?v=4)](https://github.com/ssx "ssx (19 commits)")[![adamzero1](https://avatars.githubusercontent.com/u/6369163?v=4)](https://github.com/adamzero1 "adamzero1 (16 commits)")[![callum-zero1](https://avatars.githubusercontent.com/u/22055276?v=4)](https://github.com/callum-zero1 "callum-zero1 (3 commits)")

---

Tags

apimagentomagento 2rest-client

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zero1-magento2-rest-client/health.svg)

```
[![Health](https://phpackages.com/badges/zero1-magento2-rest-client/health.svg)](https://phpackages.com/packages/zero1-magento2-rest-client)
```

PHPackages © 2026

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