The fastest path to a first shipment uses the official
PHP SDK . Integrating from another language? Follow
Request signing (HMAC) and the
cURL examples instead — the flow below is
the same.
1. Get API credentials
Log in to the Apaczka panel and create an API
application under Settings → API . You get an app_id and an
app_secret — keep the secret server-side.
2. Install the SDK
composer require alsendo/alsendo-one-sdk guzzlehttp/guzzle guzzlehttp/psr7
3. Pick a service
List the carrier services available on your account —
don't hardcode them :
<? php
require __DIR__ . '/vendor/autoload.php' ;
use AlsendoOne\SDK\AlsendoClient ;
$client = new AlsendoClient ( 'your_app_id' , 'your_app_secret' );
foreach ($client -> getServiceStructure () -> getServices () as $service) {
echo $service[ 'service_id' ] . ': ' . $service[ 'name' ] . PHP_EOL ;
}
4. Price and create an order
use AlsendoOne\SDK\DTO\Address ;
use AlsendoOne\SDK\DTO\Request\OrderRequest ;
use AlsendoOne\SDK\DTO\Request\PickupRequest ;
use AlsendoOne\SDK\DTO\Request\ShipmentRequest ;
use AlsendoOne\SDK\Type\Service ;
$order = OrderRequest :: create ()
-> setService ( Service :: from ( Service :: DpdCourier )) // from step 3
-> setSenderAddress ( new Address (
'Firma Sp. z o.o.' , 'Jan Kowalski' , '[email protected] ' , '500100200' ,
'Marszalkowska 1/10' , null , '00-001' , 'Warszawa' , 'PL'
))
-> setReceiverAddress ( new Address (
'Anna Nowak' , null , '[email protected] ' , '600300400' ,
'Dluga 15' , null , '80-831' , 'Gdansk' , 'PL'
))
-> addShipment ( new ShipmentRequest ( 'PACZKA' , 2.5 , 40 , 30 , 20 )) // kg, cm
-> setPickup ( new PickupRequest ( 'COURIER' , date ( 'Y-m-d' , strtotime ( '+1 day' )), '10:00' , '16:00' ));
// Price it first — prices come back in groszy (1 PLN = 100 gr)
$valuation = $client -> getValuation ($order);
// Create the order
$created = $client -> sendOrder ($order);
echo 'Order ' . $created -> getId () . ', waybill ' . $created -> getWaybillNumber ();
5. Download the label
$waybill = $client -> getWaybill ($created -> getId ());
file_put_contents ( 'label.pdf' , base64_decode ($waybill -> getWaybill ()));
Done — the parcel is ordered and the label is on disk.
Next steps
Last modified on October 5, 2026