PHPackages                             myparcelbe/sdk - 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. myparcelbe/sdk

AbandonedArchivedLibrary[API Development](/categories/api)

myparcelbe/sdk
==============

This package is designed to send and receive data from MyParcel by means of an API.

v1.3.11(7y ago)01.8k1GPL-3.0-or-laterPHPPHP &gt;=5.6.5

Since Aug 22Pushed 6y ago1 watchersCompare

[ Source](https://github.com/myparcelbe/sdk)[ Packagist](https://packagist.org/packages/myparcelbe/sdk)[ Docs](https://www.sendmyparcel.be)[ RSS](/packages/myparcelbe-sdk/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (1)Versions (44)Used By (0)

MyParcel SDK
============

[](#myparcel-sdk)

---

- [Installation](#installation)
- [Installation without composer](#installation-without-composer)
- [Requirements](#requirements)
- [Quick start and examples](#quick-start-and-examples)
- [Available Methods](#available-methods)
- [Contribute](#contribute)

---

Please, star this repository if you use this repository. ⭐

### Installation with composer

[](#installation-with-composer)

This SDK uses composer.

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

For more information on how to use/install composer, please visit:

To install the MyParcel SDK into your project, simply

```
$ composer require myparcelbe/sdk

```

### Installation without composer

[](#installation-without-composer)

If you don't have experience with composer, it is possible to use the SDK without using composer.

You can download the zip on the projects [releases](https://github.com/myparcelbe/sdk/releases) page.

1. Download the package zip (SDKvx.x.x.zip).
2. Unzip the contents of the zip, and upload the vendor directory to your server.
3. In your project, require the file src/AutoLoader.php
4. You can now use the SDK in your project

### Requirements

[](#requirements)

The MyParcel SDK works on php versions 5.6, 7.x. Also the php curl extension needs to be installed.

### Quick start and examples

[](#quick-start-and-examples)

```
$myParcelCollection = new \MyParcelBE\Sdk\src\Helper\MyParcelCollection();

$consignment = (new \MyParcelBE\Sdk\src\Model\Repository\MyParcelConsignmentRepository())
    ->setApiKey('api_key_from_MyParcel_backoffice')
    ->setReferenceId('Order 1203')
    ->setCountry('BE')
    ->setPerson('Piet Hier')
    ->setCompany('Piet BV')
    ->setFullStreet('Plein 1945 55b')
    ->setPostalCode('2231JE')
    ->setCity('Amsterdam')
    ->setEmail('test@test.nl');

$myParcelCollection
    ->addConsignment($consignment)
    ->setPdfOfLabels()
    ->downloadPdfOfLabels()
    ->setUserAgent('name_of_cms', '1.0');
```

Available Methods
-----------------

[](#available-methods)

```
$myParcelCollection = new \MyParcelBE\Sdk\src\Helper\MyParcelCollection();

$consignment = (new \MyParcelBE\Sdk\src\Model\Repository\MyParcelConsignmentRepository())
    ->setApiKey('api_key_from_MyParcel_backoffice')
    ->setReferenceId('Order 1203')
    ->setCountry('BE')
    ->setPerson('Piet Hier')
    ->setCompany('Piet BV')
    ->setFullStreet('Plein 1945 55b')
    ->setPostalCode('2231JE')
    ->setPackageType(1)
    ->setCity('Amsterdam')
    ->setEmail('test@test.nl')
    ->setPhone('+31 (0)634213465')
    ->setLargeFormat(true)
    ->setOnlyRecipient(true)
    ->setSignature(true)
    ->setReturn(true)
    ->setInsurance(250)
    ->setLabelDescription('Order 10034');

$myParcelCollection
    ->addConsignment($consignment)
```

### User-agent

[](#user-agent)

To give us insight into which CMS system you make a connection from, you should send a User-Agent. If you're using a known CMS system it's required. You must send the name of the CMS system followed by a version number. A version is not required.

```
    ->setUserAgent('name_of_cms', '1.0')

```

### Submitting full address

[](#submitting-full-address)

```
    ->setFullStreet('Plein 1945 55b')

```

### Submitting address in pieces

[](#submitting-address-in-pieces)

```
    ->setStreet('Plein 1945')
    ->setNumber((string)55)
    ->setBoxNumber('b')
```

#### Create concept

[](#create-concept)

```
$myParcelCollection->createConcepts();
```

#### Download labels

[](#download-labels)

```
$myParcelCollection->setPdfOfLabels();
$myParcelCollection->downloadPdfOfLabels();
```

#### Get label link

[](#get-label-link)

```
$myParcelCollection
    ->setLinkOfLabels()
    ->getLinkOfLabels()
```

#### MyParcel consignment id

[](#myparcel-consignment-id)

If you don't use `setReferenceId()`, you can also use the MyParcelConsignmentId when you create a concept: After `setPdfOfLabels()`, `setLinkOfLabels()` and `createConcepts()`, you can save the api id to your database. With this id you can easily retrieve the latest status.

```
$consignment->getMyParcelConsignmentId();
```

#### Get status

[](#get-status)

After `setPdfOfLabels()`, `setLinkOfLabels()` and `createConcepts()` you can get the status.

```
$status = $consignment->getStatus();
```

#### Get barcode

[](#get-barcode)

The barcode is available after `setPdfOfLabels()` and `setLinkOfLabels()`

```
$barcode = $consignment->getBarcode();
```

#### Multiple shipments

[](#multiple-shipments)

To create multiple consignments or get one pdf with multiple consignments, set multiple consignments. It's faster and cleaner.

```
$myParcelCollection = new \MyParcelBE\Sdk\src\Helper\MyParcelCollection();

foreach ($yourShipments as $yourShipment) {

    $consignment = (new \MyParcelBE\Sdk\src\Model\Repository\MyParcelConsignmentRepository())
        ->setApiKey('api_key_from_MyParcel_backoffice')
        ->setReferenceId($yourShipment->getOrderId()
        ->setName('Piet Hier');
        /** @todo; set all info */

    $myParcelCollection
        ->setUserAgent('name_of_cms', '1.0')
        ->addConsignment($consignment)
}
```

#### Later on

[](#later-on)

In a new request, you can get all the data again.

```
$consignment = (new \MyParcelBE\Sdk\src\Model\Repository\MyParcelConsignmentRepository())
    ->setApiKey('api_key_from_MyParcel_backoffice')
    ->setReferenceId('Order 1203'); // or setMyParcelConsignmentId(123456)

$myParcelCollection
    ->addConsignment($consignment)
    ->setLatestData();

$consignments = $myParcelCollection
    ->getConsignments();

$firstConsignment = $consignments[0];

$status = $firstConsignment->getStatus();
$barcode = $firstConsignment->getBarcode();
```

### Contribute

[](#contribute)

1. Check for open issues or open a new issue to start a discussion around a bug or feature.
2. Fork the repository on GitHub to start making your changes.
3. Write one or more tests for the new feature or that expose the bug.
4. Make code changes to implement the feature or fix the bug.
5. Send a pull request to get your changes merged and published.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 70.6% 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 ~23 days

Recently: every ~90 days

Total

41

Last Release

2635d ago

Major Versions

v0.2.12 → v1.0.02017-06-21

PHP version history (4 changes)0.2.2PHP ~5.6.5

v0.2.7PHP &gt;=5.6.5 &lt;7.1

v1.1.10PHP &gt;=5.6.5 &lt;7.2

v1.3.8PHP &gt;=5.6.5

### Community

Maintainers

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

---

Top Contributors

[![RichardPerdaan](https://avatars.githubusercontent.com/u/11389731?v=4)](https://github.com/RichardPerdaan "RichardPerdaan (36 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (6 commits)")[![Cornelis21](https://avatars.githubusercontent.com/u/30620801?v=4)](https://github.com/Cornelis21 "Cornelis21 (5 commits)")[![LeonidasJP](https://avatars.githubusercontent.com/u/11160833?v=4)](https://github.com/LeonidasJP "LeonidasJP (3 commits)")[![dam-man](https://avatars.githubusercontent.com/u/4890193?v=4)](https://github.com/dam-man "dam-man (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/myparcelbe-sdk/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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