riesenia / kurier123
123Kurier API PHP client implementation
Installs: 2 886
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=7.1
- guzzlehttp/guzzle: ^7.4
Requires (Dev)
This package is auto-updated.
Last update: 2024-11-10 13:01:54 UTC
README
123Kurier API client implemetation. See 123Kurier official API documentation for details.
Installation
Install the latest version using composer require riesenia/kurier123
Usage
Create API with username and password
use Riesenia\Kurier123\Api; $api = new Api($username, $password);
Create shipment
$data = [ 'clientOrderNumber' => 12345678, 'sender' => [ 'id' => 1 ], 'recipient' => [ 'name' => 'John Doe', 'street' => 'Foo', 'city' => 'Bar', ... ], ... ]; if (!$api->createShipment($shipment)) { echo $api->getErrors(); }
Print shipment labels
$data = [ // Order numbers '60221080912166', '60221080912167' ]; $data = $api->generateTickets($data, 'A4'); if (!$data) { echo $api->getErrors(); }
Get order status history
$data = [ // Order numbers '60221080912166', '60221080912167' ]; $history = $api->statusHistory($data); if (!$history) { echo $api->getErrors(); }