PHPackages                             select-co/module-sage200-api - 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. select-co/module-sage200-api

ActiveMagento2-module[API Development](/categories/api)

select-co/module-sage200-api
============================

Magento 2 connector to interact with Sage200 API

1.1.1(5mo ago)035MITPHP

Since Jul 25Pushed 5mo agoCompare

[ Source](https://github.com/SelectCo/magento2-module-sage200-api)[ Packagist](https://packagist.org/packages/select-co/module-sage200-api)[ RSS](/packages/select-co-module-sage200-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (3)Versions (10)Used By (0)

Magento 2 Sage200 API
=====================

[](#magento-2-sage200-api)

[![Github license](https://camo.githubusercontent.com/e83c83bf136d828eb146c70d9a2888a39d1a4a74952000663516caad76ad703d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f53656c656374436f2f6d6167656e746f322d6d6f64756c652d736167653230302d617069 "Github license")](https://github.com/SelectCo/magento2-module-sage200-api/blob/main/LICENSE)[![Open issues](https://camo.githubusercontent.com/9ddfdc1b6c186d9ea9823660422f3fdd25d2034c8d206ef4fdc20d8e289d935a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f53656c656374436f2f6d6167656e746f322d6d6f64756c652d736167653230302d617069 "Open issues")](https://github.com/SelectCo/magento2-module-sage200-api/issues)[![Open Pull Requests](https://camo.githubusercontent.com/968282f8a28e2da17c4deec27d6ac771550ae5cab22b8e03af1573d15f076d52/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f53656c656374436f2f6d6167656e746f322d6d6f64756c652d736167653230302d617069 "Open Pull Requests")](https://github.com/SelectCo/magento2-module-sage200-api/pulls)[![Last commit](https://camo.githubusercontent.com/436b472077c24e8277672529255e5cb56005af6b0d9fa2103ea564bad25f4c7a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f53656c656374436f2f6d6167656e746f322d6d6f64756c652d736167653230302d617069 "Last commit")](https://github.com/SelectCo/magento2-module-sage200-api/commits/main)

An unofficial API client to interact with the Sage200 API.

Requirements
------------

[](#requirements)

- Sage200
    - Sage200 API setup and configured.
    - Developer subscription key
    - Client ID &amp; Client Secret
- Magento 2 (tested with 2.3.5)
- PHP ^7.3

Sage 200 API Credentials Request Form
-------------------------------------

[](#sage-200-api-credentials-request-form)

Admin configuration for Refresh Token Expiry Days must match the value on Sage 200 API Credentials Request Form.

The callback URL entered on the request form must be `https://{SUBDOMAIN}.{DOMAIN}/{ADMIN_ROUTE}/s200/oauth/callback`

e.g. `https://shop.example.com/admin_5fj7t/s200/oauth/callback`

Authentication
--------------

[](#authentication)

This client uses league/oauth2-client for authentication using the Authorization Code Grant and credentials provided in Admin configuration.

For more information, please refer to the official [Sage200 API Documentation](https://developer.sage.com/200/api/).

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

[](#installation)

Add GitHub repo to your composer.json repositories.

```
{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/SelectCo/magento2-module-sage200-api.git"
    }
  ]
}
```

Require package with composer.

```
composer require select-co/module-sage200-api
```

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

[](#configuration)

Admin configurations must be set before use.

- API OAuth Details
    - Client Id
    - Client Secret
    - Developer Subscription Key
    - X-Site Id
    - X-Company Id

Default values used for:-

- Sage200 Base Url
- Authorise URL
- Access Token URL
- Resource Owner URL
- Scope Access

Token Management
----------------

[](#token-management)

Token management is done through Admin =&gt; System =&gt; Other Settings =&gt; Sage200 Token Management where you can refresh, or get a new token.

Details of a valid token are displayed here with available companies.

CLI/Console Commands
--------------------

[](#cliconsole-commands)

- sage200:token:check

    - Checks whether the current access token and refresh token are valid and reports time to expiry.
    - Usage: bin/magento sage200:token:check
- sage200:token:refresh

    - Tries to refresh the access token using the stored refresh token and outputs new expiry times.
    - Usage: bin/magento sage200:token:refresh

Cron
----

[](#cron)

- The module includes a scheduled job that:
    - Refreshes the access token automatically when it has less than 30 minutes remaining. This can be changed in the Admin configuration.
    - Sends email notifications when the access token is missing/expired or the refresh token is nearing expiry, according to Admin configuration.
- Ensure Magento cron is configured on your environment.

Usage
-----

[](#usage)

```
$results = json_decode(
    $this->connector->send(
        'sop_orders',
        'GET',
        $query
    ), true
);
```

```
$results = json_decode(
    $this->connector->send(
      'sop_orders/' . $id,
      'GET',
      $query
    ), true
);
```

Changelog
---------

[](#changelog)

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

Resources
---------

[](#resources)

[Sage 200 API Documentation](https://developer.sage.com/200/reference/)

License
-------

[](#license)

MIT. See LICENSE.

Support
-------

[](#support)

If you have a feature request or spotted a bug or a technical problem, create a GitHub issue.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance72

Regular maintenance activity

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~23 days

Recently: every ~12 days

Total

7

Last Release

159d ago

### Community

Maintainers

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

---

Top Contributors

[![adrianb11](https://avatars.githubusercontent.com/u/77499644?v=4)](https://github.com/adrianb11 "adrianb11 (45 commits)")

### Embed Badge

![Health badge](/badges/select-co-module-sage200-api/health.svg)

```
[![Health](https://phpackages.com/badges/select-co-module-sage200-api/health.svg)](https://phpackages.com/packages/select-co-module-sage200-api)
```

###  Alternatives

[smile/elasticsuite

Magento 2 merchandising and search engine built on ElasticSearch

8044.5M33](/packages/smile-elasticsuite)[mollie/magento2

Mollie Payment Module for Magento 2

1121.6M10](/packages/mollie-magento2)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[graycore/magento2-cors

A Magento 2 module that enables CORS on the GraphQL and REST Apis

99516.1k](/packages/graycore-magento2-cors)[dcblogdev/laravel-xero

A Laravel Xero package

53129.1k1](/packages/dcblogdev-laravel-xero)[elgentos/module-prismicio

Magento 2 - Prismic.io integration

39112.0k3](/packages/elgentos-module-prismicio)

PHPackages © 2026

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