ernadoo/mondial-relay

Mondial Relay API client — V2 REST (label creation) + SOAP (relay point search)

Maintainers

Package info

github.com/ErnadoO/mondial-relay

pkg:composer/ernadoo/mondial-relay

Statistics

Installs: 13

Dependents: 1

Suggesters: 0

Stars: 0

v3.0.0 2026-04-19 14:45 UTC

This package is not auto-updated.

Last update: 2026-05-03 14:56:35 UTC


README

PHP client for the Mondial Relay shipping API. Framework-agnostic.

  • Label creation — V2 REST API (production + sandbox)
  • Relay point search — V1 SOAP API (MR has not yet published a V2 REST endpoint for this)

Requirements

  • PHP 8.2+
  • ext-curl, ext-soap, ext-simplexml

Installation

composer require ernadoo/mondial-relay

Quick start

use Ernadoo\MondialRelay\MondialRelayClient;
use Ernadoo\MondialRelay\Shipment\Address;
use Ernadoo\MondialRelay\Shipment\DeliveryMode;
use Ernadoo\MondialRelay\Shipment\Parcel;
use Ernadoo\MondialRelay\Shipment\ShipmentRequest;

$client = MondialRelayClient::create(
    login:      'YOUR_LOGIN',
    password:   'YOUR_PASSWORD',
    customerId: 'YOUR_CUSTOMER_ID',
    secretKey:  'YOUR_SECRET_KEY',
    sandbox:    true, // false in production
);

$request = new ShipmentRequest(
    sender:    new Address('FR', '59510', 'Hem', '4 Av. Antoine Pinay', 'Erwan', 'Nader', mobileNo: '+33600000000'),
    recipient: new Address('FR', '75001', 'Paris', '1 Rue de la Paix', 'Jane', 'Doe', mobileNo: '+33600000001'),
    parcels:   [new Parcel(weightGrams: 500, content: 'Vêtements')],
    // deliveryLocation left empty = "Notif Destinataire":
    // Mondial Relay notifies the recipient by SMS so they choose their relay point.
);

$response = $client->createShipment($request);

echo $response->shipmentNumber; // e.g. "12345678"
echo $response->labelOutput;    // PDF URL to download the label
echo $response->trackingUrl;    // Public tracking link

Documentation

Tests

composer install
vendor/bin/phpunit