定制 grip/pakketdienstqls 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

grip/pakketdienstqls

最新稳定版本:1.0.0

Composer 安装命令:

composer require grip/pakketdienstqls

包简介

Pakketdienst QLS API Client

README 文档

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

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2025-07-05