php-baselinker is a PHP library for accessing the BaseLinker service.
Currently the library has BETA status
Library not implement each of method from BaseLinker API Documentation yet.
To install php-baselinker, install Composer and issue the following command:
composer require solizion/php-baselinker
Create a client object and pass as parameters api url and generated api key. To generate an api key, you must first have an existing baselinker account, and then go to "My account" -> "API" -> type name of application and click "Generate token".
use BaselinkerClient\Client;
$apiUrl = "https://api.baselinker.com/connector.php";
$apiKey = "verySecretApiKey"
$client = new Client($apiUrl, $apiKey);
Get logs kind of "create new order", "change order status" from the journal.
use BaselinkerClient\Client;
use BaselinkerClient\Journal\GetJournalListParameters;
$apiUrl = "https://api.baselinker.com/connector.php";
$apiKey = "verySecretApiKey"
$client = new Client($apiUrl, $apiKey);
$parameters = new GetJournalListParameters(
1, // last_log_id
[
GetJournalListParameters::CREATE_ORDER,
GetJournalListParameters::REMOVE_ORDER,
], // log_types
null, // order_id
);
$journal = $client->getJournalList($parameters);
BaseLinker return field "status" with values "SUCCESS" or "ERROR".
When status is "ERROR" then fields error_message
and error_code
are added to the response.
Name | Description |
---|---|
GetJournalList | Get list of events |
Versioning is based on semver.
New version is release by a new tag.
This library is distributed under the BSD 3 Licence, see LICENSE for more information.
Authors of this library are Kamil Ciekalski, Dawid Miklas and Marcisz Szczot
If you want to help with development it - fork me!