PHPackages                             tow-com-au/sageone-php - 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. tow-com-au/sageone-php

ActiveLibrary[API Development](/categories/api)

tow-com-au/sageone-php
======================

SageOne Accounting API Wrapper (PHP)

8902PHP

Since Oct 12Pushed 10y ago4 watchersCompare

[ Source](https://github.com/Tow-com-au/SageOne-Accounting-PHP)[ Packagist](https://packagist.org/packages/tow-com-au/sageone-php)[ RSS](/packages/tow-com-au-sageone-php/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

SageOne-Accounting-PHP
======================

[](#sageone-accounting-php)

1. Overview
-----------

[](#1-overview)

This is a simple API wrapper library for [**SageOne**](http://www.sageone.com) Accounting platform.

Official API Documentation &amp; API sign up can be found at:

Courtesy of the Tow.com.au team :) -

2. Installation
---------------

[](#2-installation)

With composer, add to your composer.json :

```
{
    "require": {
        "tow-com-au/sageone-php": "dev-master"
    }
}

```

If you are new to [composer](http://getcomposer.org/), here is some simple steps to take.

1. Download *composer.phar* from the above link
2. Create a json file named *composer.json* containing just exactly the above "require" block
3. Having *composer.phar* and *composer.json* side by side, you can run the command:

```
php ./composer.phar install

```

4. The composer will create a directory named *vendor* and download all required libraries into it.
5. In the *vendor* directory, there's also a file named *autoload.php*. This is the PHP autoloader for the libraries inside. You might need to register it to you existing autoloader, or include it manually.

3. Usage
--------

[](#3-usage)

To login to the SageOne API you will need two things. First, an 'AuthCode', which can be generated from your login details in the format base64\_encode('username:password'), and second, an API key as requested from SageOne.

#### Create client library instance

[](#create-client-library-instance)

```
// You will need to include this autoload script manually
// if you don't have any autoloader setup.
include "../path/to/vendor/autoload.php";

// Use your login to request an API key from:
// https://accounting.sageone.co.za/Marketing/DeveloperProgram.aspx
$apiKey = '{api key goes here}';
$authCode = base64_encode('username:password');

// SageOne will provide you with a localised endpoint url:
$apiEndpoint = 'https://accounting.sageone.com.au/api/1.1.1';

$companyId = false; // We don't have this yet

$debug = true;
$client = new Sage($apiEndpoint, $apiKey, $authCode, $companyId, $debug);

```

#### List your Company entities

[](#list-your-company-entities)

```
$result = $client->listItems('Company');
if (!empty($result)) {
	// grab the first Company ID
	$companyId = $result[0]['ID'];
	// re-instantiate with $companyId
	$client = new Sage($apiEndpoint, $apiKey, $authCode, $companyId, $debug);
}

```

#### Create a Customer entity

[](#create-a-customer-entity)

```
// Create a customer
$customer_details = [
    'Name' => 'Test Customer',
    'Mobile' => '555-555',
    'CommunicationMethod' => 0,
    'Email' => 'test@test.com',
    'PostalAddress01' => '1 test street',
    'PostalAddress02' => 'testville',
    'PostalAddress03' => 'QLD',
    'PostalAddress04' => 4000,
    'PostalAddress05' => 'Australia',
    'TaxReference' => 'Customer 1',
];

// Save Customer entity
$result = $client->saveItem('Customer', $customer_details);

```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/943685f953e36e96bfd8a6c4f9516288bc99d79ed67cf76229cf0d0e5eb255ed?d=identicon)[Sharnw](/maintainers/Sharnw)

---

Top Contributors

[![Sharnw](https://avatars.githubusercontent.com/u/916375?v=4)](https://github.com/Sharnw "Sharnw (5 commits)")

### Embed Badge

![Health badge](/badges/tow-com-au-sageone-php/health.svg)

```
[![Health](https://phpackages.com/badges/tow-com-au-sageone-php/health.svg)](https://phpackages.com/packages/tow-com-au-sageone-php)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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