PHPackages                             jouwweb/sendcloud - 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. jouwweb/sendcloud

ActiveLibrary[API Development](/categories/api)

jouwweb/sendcloud
=================

Provides a client to interact with the Sendcloud API in an object-oriented way.

v5.7.1(5mo ago)16256.9k↓23.8%17[1 PRs](https://github.com/Webador/sendcloud/pulls)1MITPHPPHP &gt;=8.1.0

Since May 7Pushed 5mo ago3 watchersCompare

[ Source](https://github.com/Webador/sendcloud)[ Packagist](https://packagist.org/packages/jouwweb/sendcloud)[ Docs](https://github.com/Webador/sendcloud)[ RSS](/packages/jouwweb-sendcloud/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (38)Used By (1)

Sendcloud
=========

[](#sendcloud)

This is a PHP library that provides a simple way to communicate with the Sendcloud API. It was created because there were no simple alternatives that follow good object-oriented code practices.

> NOTE: This library does not implement all Sendcloud API functionality. If you require functionality that is missing please request it through a GitHub issue or pull request.

Example
-------

[](#example)

```
use JouwWeb\Sendcloud\Client;
use JouwWeb\Sendcloud\Model\Address;
use JouwWeb\Sendcloud\Model\Parcel;
use JouwWeb\Sendcloud\Model\ParcelItem;
use JouwWeb\Sendcloud\Model\WebhookEvent;
use JouwWeb\Sendcloud\Exception\SendcloudRequestException;

$client = new Client(
    publicKey: 'your_public_key',
    secretKey: 'your_secret_key',
);

// Print prices for all enabled shipping methods that ship to the Netherlands
foreach ($client->getShippingMethods() as $shippingMethod) {
    $price = $shippingMethod->getPriceForCountry('NL');
    if ($price) {
        echo $shippingMethod->getName() . ': €' . ($price / 100) . PHP_EOL;
    }
}

// Create a parcel and label
try {
    // Most of these arguments are optional and will fall back to defaults configured in Sendcloud
    $parcel = $client->createParcel(
        shippingAddress: new Address(
            name: 'John Doe',
            companyName: 'Big Box Co.',
            addressLine1: 'Office Street 2834A',
            city: 'Metropolis',
            postalCode: '9999ZZ',
            countryCode: 'NL',
            emailAddress: 'john@bigbox.co',
            phoneNumber: '+31612345678'
        ),
        servicePointId: null,
        orderNumber: '20190001',
        weight: 2500, // 2.5kg
        // Below options are only required when shipping outside the EU
        customsInvoiceNumber: 'CI-8329823',
        customsShipmentType: Parcel::CUSTOMS_SHIPMENT_TYPE_COMMERCIAL_GOODS,
        items: [
            new ParcelItem('green tea', 1, 123, 15.20, '090210', 'EC'),
            new ParcelItem('cardboard', 3, 50, 0.20, '090210', 'NL'),
        ],
        postNumber: 'PO BOX 42',
    );

    $parcel = $client->createLabel(
        parcel: $parcel,
        shippingMethod: 8,
        senderAddress: null, // Default sender address.
    );

    $pdf = $client->getLabelPdf($parcel, Parcel::LABEL_FORMAT_A4_BOTTOM_RIGHT);

    var_dump($parcel, $pdf);
} catch (SendcloudRequestException $exception) {
    echo $exception->getMessage();
}

// Verify and parse a webhook request
$webhookEvent = $client->parseWebhookRequest($request);
if ($webhookEvent->getType() === WebhookEvent::TYPE_PARCEL_STATUS_CHANGED) {
    $parcel = $webhookEvent->getParcel();
}
```

### Retieve a list of service points

[](#retieve-a-list-of-service-points)

```
use JouwWeb\Sendcloud\ServicePointsClient;
use JouwWeb\Sendcloud\Exception\SendcloudRequestException;

$client = new ServicePointsClient('your_public_key', 'your_secret_key');

try {
    // Search for service points in the Netherlands.
    $servicePoints = $client->searchServicePoints('NL');

    var_dump($servicePoints[0]->isActive()); // bool(true)
    var_dump($servicePoints[0]->getName()); // string(7) "Primera"
    var_dump($servicePoints[0]->getCarrier()); // string(6) "postnl"
    var_dump($servicePoints[0]->getDistance()); // NULL ↓

    // If we want Sendcloud to calculate the distance between us and each service point, we need to supply latitude and
    // longitude.
    $servicePointsWithDistance = $client->searchServicePoints(
        country: 'NL',
        latitude: 51.4350511,
        longitude: 5.4746339
    );

    var_dump($servicePointsWithDistance[0]->getName()); // string(14) "Pakketautomaat"
    var_dump($servicePointsWithDistance[0]->getDistance()); // int(553)

    // Obtain a specific service point by ID.
    $servicePoint = $client->getServicePoint(1);
} catch (SendcloudRequestException $exception) {
    echo $exception->getMessage();
}
```

Installation
------------

[](#installation)

`composer require jouwweb/sendcloud`

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance70

Regular maintenance activity

Popularity46

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 70.1% 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 ~79 days

Recently: every ~88 days

Total

36

Last Release

170d ago

Major Versions

v0.1.0 → v1.0.02018-05-25

v1.0.1 → v2.0.02018-06-18

v2.1.0 → v3.0.02019-03-19

v3.11.0 → v4.0.02023-06-18

v4.0.0 → v5.0.02023-07-04

PHP version history (7 changes)v0.1.0PHP &gt;=7.1

v3.0.0PHP &gt;=7.2

v3.0.2PHP &gt;=7.1.3

v3.7.0PHP &gt;=7.2.5

v3.10.2PHP &gt;=7.4.0

v4.0.0PHP &gt;=8.0.2

v5.2.0PHP &gt;=8.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca21233cea84cc055bcc3678608a64bcf30b3da970a5fab96f54590ae3506125?d=identicon)[roelvanduijnhoven](/maintainers/roelvanduijnhoven)

![](https://www.gravatar.com/avatar/01a3e1034b26bd108985705a0e5292850bf1ee7d234d4676c8735d6feeebf85f?d=identicon)[koenkivits](/maintainers/koenkivits)

![](https://www.gravatar.com/avatar/43792f8b224d7de339a848cd799635fa8e062eea3fb669e3ca7a1d1e2cff756d?d=identicon)[unreal4u](/maintainers/unreal4u)

![](https://www.gravatar.com/avatar/212c27b557d8126e053ac3ed5491944ec8bccd1b8bb910e807934786233f3020?d=identicon)[Villermen](/maintainers/Villermen)

---

Top Contributors

[![villermen](https://avatars.githubusercontent.com/u/1106303?v=4)](https://github.com/villermen "villermen (117 commits)")[![AlexisPPLIN](https://avatars.githubusercontent.com/u/82219937?v=4)](https://github.com/AlexisPPLIN "AlexisPPLIN (24 commits)")[![Valerie-Tylski-Vincent](https://avatars.githubusercontent.com/u/80036331?v=4)](https://github.com/Valerie-Tylski-Vincent "Valerie-Tylski-Vincent (10 commits)")[![odraska](https://avatars.githubusercontent.com/u/775571?v=4)](https://github.com/odraska "odraska (4 commits)")[![lukas-jansen](https://avatars.githubusercontent.com/u/33984099?v=4)](https://github.com/lukas-jansen "lukas-jansen (3 commits)")[![ivan-white](https://avatars.githubusercontent.com/u/59926224?v=4)](https://github.com/ivan-white "ivan-white (3 commits)")[![julienbruitte](https://avatars.githubusercontent.com/u/25368295?v=4)](https://github.com/julienbruitte "julienbruitte (2 commits)")[![Web10-Joris](https://avatars.githubusercontent.com/u/129582223?v=4)](https://github.com/Web10-Joris "Web10-Joris (2 commits)")[![linaori](https://avatars.githubusercontent.com/u/1754678?v=4)](https://github.com/linaori "linaori (1 commits)")[![roelvanduijnhoven](https://avatars.githubusercontent.com/u/91910?v=4)](https://github.com/roelvanduijnhoven "roelvanduijnhoven (1 commits)")

---

Tags

apiclientjouwwebparcelphpsendcloudsendcloud-apiwebhookapiclientwebhookparcelsendcloudjouwweb

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jouwweb-sendcloud/health.svg)

```
[![Health](https://phpackages.com/badges/jouwweb-sendcloud/health.svg)](https://phpackages.com/packages/jouwweb-sendcloud)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[resend/resend-php

Resend PHP library.

574.7M21](/packages/resend-resend-php)[picqer/sendcloud-php-client

A PHP Client for the SendCloud API

45400.4k1](/packages/picqer-sendcloud-php-client)[crowdin/crowdin-api-client

PHP client library for Crowdin API v2

611.5M5](/packages/crowdin-crowdin-api-client)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)[markrogoyski/numverify-api-client-php

Numverify API Client for PHP

1220.9k](/packages/markrogoyski-numverify-api-client-php)

PHPackages © 2026

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