grip/pakketdienstqls

Pakketdienst QLS API Client

Maintainers

Package info

github.com/GripOnline/php-pakketdienstqls

pkg:composer/grip/pakketdienstqls

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.1.0 2026-01-28 15:22 UTC

This package is auto-updated.

Last update: 2026-02-28 15:37:30 UTC


README

This library provides a PHP client API for QLS Pakketdienst.

Installing

The library can be installed using Composer:

$ composer require grip/pakketdienstqls

Usage

Creating a client instance and get available products

$client = new \Grip\PakketdienstQls\Client($username, $password);

// determine available products and product combinations
var_dump($client->getProductsByCompanyId($companyId));

Creating a shipment

$shipment = new \Grip\PakketdienstQls\Model\Shipment();

$receiver = new \Grip\PakketdienstQls\Model\Contact();
$receiver->setName('John Doe');
$receiver->setStreet('Main Street');
$receiver->setHouseNumber('123');
$receiver->setPostalCode('1234AB');
$receiver->setLocality('Amsterdam');
$receiver->setCountry('NL');

$shipment->setReceiverContact($receiver);
$shipment->setProductId($productId);
$shipment->setProductCombinationId($productCombinationId);
$shipment->setWeight(1000); // weight in grams
$shipment->setReference('Order #12345');

// store shipment and get PDF label url
$createdShipment = $client->createShipment($companyId, $shipment);
echo $createdShipment->getLabelPdfUrl();

Retrieving a shipment to determine its shipment status

$shipment = $client->getShipmentById($companyId, $shipmentId);
// determine shipment status
$status = $shipment->getStatus();
echo $status;

Find pickup location points near a postal code

// get service points near a postal code
$productId = 81; // PostNL Pakje Servicepunt
$servicePoints = $client->getServicePointsByProduct($companyId, $productId, 'NL', '2245AD');
var_dump($servicePoints);

Find companies to work with

$pageId = 1;
do {
    $companies = $client->getCompanies($pageId);
    foreach ($companies as $company) {
        var_dump($company);
    }
    $page++;
} while ($companies);

Get registered webhooks for a company

$webhooks = $client->getWebhooks($companyId);
var_dump($webhooks);

Determine webhook types and register a new webhook

$webhookTypes = $client->getWebhookTypes($companyId);
var_dump($webhookTypes);
$client->createWebhook($companyId, 'https://example.com/webhook', $webhookType);

History

v1.1.0

  • ObjectTranscoder now parses Dimensions and ProductCombination when parsing Shipment data

v1.0.0

  • initial release