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

ActiveLibrary[API Development](/categories/api)

select-co/sage200-api-client
============================

Sage200 PHP API client

1.0.0.1(5mo ago)0131MITPHP

Since Dec 9Pushed 2mo agoCompare

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

READMEChangelog (2)Dependencies (1)Versions (4)Used By (1)

Sage 200 API Client (PHP)
=========================

[](#sage-200-api-client-php)

A lightweight PHP client for the Sage 200 REST API. It wraps Guzzle with sensible defaults (auth headers, site/company headers, JSON, error handling), provides a request/response abstraction, and includes a fluent OData query builder for constructing query strings.

- Package: `select-co/sage200-api-client`
- License: MIT
- Minimum PHP: 7.2.5+

Links

- Source:
- Issues:

Features
--------

[](#features)

- Simple connector with Bearer token auth and default Sage base URL
- Optional `X-Site` and `X-Company` headers
- Request/Response abstraction over Guzzle
- OData query builder for `$select`, `$filter`, `$orderby`, `$top`, `$skip`, `$expand`, `$count`
- Meaningful exceptions for common HTTP error codes
- Optional endpoint helpers when paired with `select-co/sage200-api-endpoints`

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

[](#installation)

Install via Composer:

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

If you also want a typed set of endpoint/resource helpers, install the companion package (if available publicly) or include it as a path repo like in this repo's `composer.json`:

```
{
  "repositories": [
    { "type": "path", "url": "../sage200-api-endpoints" }
  ],
  "require": {
    "select-co/sage200-api-client": "^1.0",
    "select-co/sage200-api-endpoints": "^1.0"
  }
}
```

Quick start
-----------

[](#quick-start)

```
