PHPackages                             wedesignit/sendy-php-api-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. wedesignit/sendy-php-api-client

ActiveLibrary[API Development](/categories/api)

wedesignit/sendy-php-api-client
===============================

PHP Client for the Sendy API

v1.0.0(1y ago)0682MITPHPPHP ^8.0

Since Dec 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/WeDesignIt/sendy-php-api-client)[ Packagist](https://packagist.org/packages/wedesignit/sendy-php-api-client)[ RSS](/packages/wedesignit-sendy-php-api-client/feed)WikiDiscussions develop Synced yesterday

READMEChangelog (5)Dependencies (1)Versions (7)Used By (0)

Sendy API client
================

[](#sendy-api-client)

Formerly known as KeenDelivery.

Implementation according to the [docs](https://app.sendy.nl/api/docs).

Installing
----------

[](#installing)

```
composer require wedesignit/sendy-php-api-client
```

Creating the connector
----------------------

[](#creating-the-connector)

```
$client = new \WeDesignIt\Sendy\Client($apiToken);
$sendy = new \WeDesignIt\Sendy\Sendy($client);
```

After this, the `$sendy` class can return `Endpoints` which can be called.

The endpoint methods can either be called with plain arrays or the fluent `Resource` classes can be used.

Directory structure / Endpoints
-------------------------------

[](#directory-structure--endpoints)

The Endpoint directory structure follows the documentation (category) structure for easier recognition. The current main categories are:

- Carrier
- Shipment
- Company Within these categories (category folders) the actual endpoints are located.

Usage examples
--------------

[](#usage-examples)

### Always: Setting up

[](#always-setting-up)

This applies to every following example and should be prepended to every example.

```
$client = new \WeDesignIt\Sendy\Client(
    ''
);
$sendy = new \WeDesignIt\Sendy\Sendy($client);
```

### Listing your carriers

[](#listing-your-carriers)

```
$carriers = $sendy->carrier()->list();
```

### Listing a carrier's services

[](#listing-a-carriers-services)

```
// Retrieve carrier ID (if you haven't cached it yet)
$carriers = $sendy->carrier()->list();
// Pick the one you need. In this example we'll use the first one
if (array_key_exists('data', $carriers) && is_array($carriers['data']) && count($carriers['data']) > 0) {

    $carrier = $carriers['data'][0];
    $carrierId = $carrier['id'];

    $services = $sendy->service()->list($carrierId);
    // we could also filter the services by a couple of parameters..
    // either straight via array
    $filters = [
        \WeDesignIt\Sendy\Filters\Carrier\Service::COUNTRY => 'NL',
    ];
    // or via the fluent Filter class
    $filters = (new \WeDesignIt\Sendy\Filters\Carrier\Service())
                ->country('NL')
                ->toArray();

    // and use it as second parameter:
    $services = $sendy->service()->list($carrierId, $filters);
}
```

### Locating nearby parcel shops

[](#locating-nearby-parcel-shops)

```
// We will use the Filter class here too.
// Note that there's an extra advantage as your parameters will be checked in advance.
$filters = (new \WeDesignIt\Sendy\Filters\Carrier\ParcelShop())
            ->latitude(52.0792755)
            ->longitude(5.3327956)
            ->country('NL')
            ->toArray();

$parcelShops = $sendy->parcelShop()->list($filters);
```

### Listing your shops

[](#listing-your-shops)

```
$shops = $sendy->shop()->list();
```

### Creating a shipment

[](#creating-a-shipment)

```
// get your shop ID if you haven't cached it yet
$shops = $sendy->shop()->list();
// we'll take the first one in this example
if (array_key_exists('data', $shops) && is_array($shops['data']) && count($shops['data']) > 0) {

    $shop = $shops['data'][0];
    $shopId = $shops['uuid'];
}
if (!isset($shopId)) {
    throw new \Exception('No shop ID given');
}
// get your carrier's value if you haven't cached it yet
$carrierInfo = $sendy->carrier()->get(8);
$carrierId = $carrierInfo['data']['id'];
$carrierValue = $carrierInfo['data']['value'];

// get your carrier's service value if you haven't cached it yet
$serviceInfo = $sendy->service()->get($carrierId, 85);
$serviceValue = $serviceInfo['data']['value'];

// now create your shipment
$shipment = (new \WeDesignIt\Sendy\Resources\Shipment())
            ->carrier($carrierValue)
            ->service($serviceValue)
            ->shopId($shopId)
            ->reference('MS#1BOSS')
            ->companyName('Dunder Mifflin')
            ->contact('Dwight Schrute')
            ->email('assistant-regional-manager@dundermifflin.ext')
            ->street('1725 Slough Avenue')
            ->number('Suite 200')
            ->city('Pennsylvania')
            ->country('US')
            ->weight(3.14)
            ->amount(1)
            ->products([
                (new \WeDesignIt\Sendy\Resources\Shipment\Product())
                    ->description('Stapler')
                    ->netWeight(3.14)
                    ->quantity(1)
                    ->value(99.99)
            ])
            ->toArray();

$shipmentResponse = $sendy->shipment()->create($shipment);
```

### Retrieving a shipment label

[](#retrieving-a-shipment-label)

```
$shipmentId = $shipmentResponse['data']['uuid'];
if ($shipmentResponse['data']['has_labels'] && $shipmentResponse['data']['status'] !== 'generated'){
    // Labels weren't generated yet. Make the call to do that.
    $labelInfo = $sendy->shipment()->generateLabel($shipmentId);
    // Note this was an asychronous call, so you'll have to wait a little before making the following call
}

$label = $sendy->document()->get($shipmentId);
// The label is a base64 encoded PDF file

// Display the PDF. Of course you could also do other things with it (e.g. store it somewhere).
$pdf = base64_decode($label);
header('Content-Type: application/pdf');
echo $pdf;
```

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance46

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~221 days

Total

5

Last Release

418d ago

Major Versions

v0.4.0 → v1.0.02025-05-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ae5357d893c402ae052f7e1705f6071de01dfa303800e6f9ba3ef27188fbea8?d=identicon)[pvankouteren](/maintainers/pvankouteren)

---

Top Contributors

[![pvankouteren](https://avatars.githubusercontent.com/u/1055598?v=4)](https://github.com/pvankouteren "pvankouteren (23 commits)")

---

Tags

SendyWeDesignItSendy API clientKeenDeliveryKeenDelivery API client

### Embed Badge

![Health badge](/badges/wedesignit-sendy-php-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/wedesignit-sendy-php-api-client/health.svg)](https://phpackages.com/packages/wedesignit-sendy-php-api-client)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M985](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
