PHP library to connect your applications to your Sellsy account account using the Sellsy API and build your websites and your platforms on the Sellsy technology.
<?php
use GuzzleHttp\Client;
use Teknoo\Sellsy\Guzzle6\Transport\Guzzle6;
use Teknoo\Sellsy\Sellsy;
include 'vendor/autoload.php';
//Create the HTTP client
$guzzleClient = new Client();
//Create the transport bridge
$transportBridge = new Guzzle6($guzzleClient);
//Create the front object
$sellsy = new Sellsy(
'https://apifeed.sellsy.com/0/',
$userToken,
$userSecret,
$consumerKey,
$consumerSecret
);
$sellsy->setTransport($transportBridge);
//Example of request, follow the API documentation of Sellsy API.
print $sellsy->infos()->getInfos()->getResponse()['consumerdatas']['id'];
//Show your ConsumerDatas id, like 9001
print $sellsy->Infos()->getInfos()->consumerdatas->id;
//Show again your ConsumerDatas id, like 9001
$sellsy->Infos()->async()->getInfos()->then(function (\Teknoo\Sellsy\Client\ResultInterface $result) {
print $result->consumerdatas->id.PHP_EOL;
})->wait();
//Show again your ConsumerDatas id, like 9001
print $sellsy->AccountPrefs()->getCorpInfos()->getResponse()['email'];
//Show your email, like contact@teknoo.software
print $sellsy->AccountPrefs()->getCorpInfos()->email;
//Show your email, like contact@teknoo.software
$sellsy->AccountPrefs()->async()->getCorpInfos()->then(function (\Teknoo\Sellsy\Client\ResultInterface $result) {
print $result->email.PHP_EOL;
})->wait();
//Show your email, like contact@teknoo.software
$sellsy->AccountDatas()->deleteTaxe();
//Thrown an exception : Teknoo\Sellsy\Client\Exception\ParameterMissingException: id is missing
Quick How-to to learn how use this library : Startup. Manage Sellsy Rate Limiting : Rate Limiting.
This project is free and will remain free. It is fully supported by the activities of the EIRL. If you like it and help me maintain it and evolve it, don't hesitate to support me on Patreon or Github.
Thanks :) Richard.
EIRL Richard Déloge - https://deloge.io - Lead developer. SASU Teknoo Software - https://teknoo.software
Teknoo Software is a PHP software editor, founded by Richard Déloge, as part of EIRL Richard Déloge. Teknoo Software's goals : Provide to our partners and to the community a set of high quality services or software, sharing knowledge and skills.
Space is licensed under the MIT License - see the licenses folder for details.
To install this library with composer, run this command :
composer require teknoo/sellsy-client
To use the embedded Guzzle transport
composer require guzzlehttp/guzzle
This library requires :
* PHP 8.1+ (7.4 and 8.0 can works, but there are not supported)
* A PHP autoloader (Composer is recommended)
* Teknoo/Immutable.
* A PSR-7 implementation
This library requires PHP 7.4 or newer. Some change causes bc breaks :
Julien Herr julien@herr.fr : RateLimitTransport and documentation about Sellsy's rate limit in its API.
You are welcome to contribute to this project. Fork it on Github