123Kurier API client implemetation. See 123Kurier official API documentation for details.
Install the latest version using composer require riesenia/kurier123
Create API with username and password
use Riesenia\Kurier123\Api;
$api = new Api($username, $password);
$data = [
'clientOrderNumber' => 12345678,
'sender' => [
'id' => 1
],
'recipient' => [
'name' => 'John Doe',
'street' => 'Foo',
'city' => 'Bar',
...
],
...
];
if (!$api->createShipment($shipment)) {
echo $api->getErrors();
}
$data = [
// Order numbers
'60221080912166',
'60221080912167'
];
$data = $api->generateTickets($data, 'A4');
if (!$data) {
echo $api->getErrors();
}
$data = [
// Order numbers
'60221080912166',
'60221080912167'
];
$history = $api->statusHistory($data);
if (!$history) {
echo $api->getErrors();
}