Skip to content

riesenia/kurier123

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

123Kurier API client

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();
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages