Quick Installation

Get started with Sage 50 (US) in PHP in under a minute

Terminal
composer require apideck-libraries/sdk-php
<?php
require_once 'vendor/autoload.php';

use Apideck\Unify;
use Apideck\Unify\Models\Operations;

$sdk = Unify\Apideck::builder()
    ->setConsumerId('user-123')
    ->setAppId('YOUR_APP_ID')
    ->setSecurity(getenv('APIDECK_API_KEY'))
    ->build();

// Connections to Sage 50 (US)
$connections = $sdk->vault->connections->list(
    api: 'accounting'
);

// List invoices from Sage 50 (US)
$responses = $sdk->accounting->invoices->list(
    request: new Operations\AccountingInvoicesAllRequest(
        serviceId: 'sage-50-us',
    ),
);

foreach ($responses as $response) {
    print_r($response);
}

Why use the PHP SDK?

Type Safety

Full type definitions for PHP. Catch errors at compile time, not runtime.

Auto-generated

SDK is auto-generated from our OpenAPI spec, always up-to-date with the latest API.

Error Handling

Built-in error types and retry logic. Handle rate limits and errors gracefully.

Pagination

Automatic pagination handling. Iterate through large datasets effortlessly.

Authentication

OAuth, API keys, and consumer tokens handled automatically.

Documentation

Comprehensive docs with examples for every endpoint and method.

Sage 50 (US) available in all SDKs

Choose your preferred language

Launch accounting integrations in weeks, not months

Get started for free