- How do I install quentinbontemps/php-mondialrelay-api?
- Install it with Composer by running composer require quentinbontemps/php-mondialrelay-api. Composer will download the library and register its autoloader, so you can use its classes immediately in plain PHP. In a Laravel application the framework's Composer autoloading works the same way, so no extra manual include is needed.
- Does this package work with Laravel?
- Yes. It is a plain PHP client, so it can be installed in Laravel through Composer and used from controllers, jobs, or services. You can bind the client in a Laravel service provider or resolve it from the container if you want dependency injection. Laravel-specific integration is minimal because the package is framework-friendly rather than tied to Laravel internals.
- What can I do with this Mondial Relay API client?
- You can create shipments, generate shipping labels, search for pickup points such as points relais, and track parcels from your application. This makes it useful for ecommerce checkout pickup-point selection, order fulfilment, and customer tracking pages. It wraps the Mondial Relay API so you do not have to build raw SOAP or HTTP requests yourself.
- How do I configure Mondial Relay API credentials?
- You will need the API credentials provided by Mondial Relay for your account, typically including a customer or account identifier and an API key or private key, plus any brand or language settings required by your contract. Pass those values to the client when you instantiate it or through your application configuration. Keep credentials out of source control and load them from environment variables in Laravel.
- How do I find pickup points (points relais) with this package?
- Use the library's pickup point search method with the destination country and a postcode, city, or address. The response gives you available points relais with identifiers, addresses, and opening hours so you can show them to customers. Store the chosen pickup point ID and send it when creating the shipment.
- Can I create shipments and generate Mondial Relay labels?
- Yes. The client is designed to create shipments and request labels from Mondial Relay. You will usually receive label data or a label URL that you can save as a PDF and send to your warehouse or printer. Keep the returned shipment and parcel numbers with your order records for tracking.
- How do I track a Mondial Relay parcel with this library?
- Call the tracking method with the parcel or expedition number returned when the shipment was created. The API returns status information that you can map to customer-friendly tracking messages. Cache or refresh the status rather than calling the API on every page load.
- Is there a sandbox or test mode for Mondial Relay?
- Mondial Relay may provide test credentials or a sandbox endpoint depending on your account agreement, so check the official API documentation and your contract first. If no sandbox is available, test against your own account with a small real shipment or mock the client in unit tests. Never use production credentials in automated tests.
- What should I handle in production with this Mondial Relay client?
- Add timeouts, catch API exceptions, and log request failures without logging credentials. Persist labels, parcel numbers, and pickup point IDs so you can retry safely and support customer service. Also monitor response times because carrier APIs can be slow or temporarily unavailable.
- Are there alternatives to quentinbontemps/php-mondialrelay-api?
- Alternatives include calling the Mondial Relay API or WSDL directly with PHP's SOAP client, using other community packages, or routing shipments through a multi-carrier shipping platform. The best choice depends on how much of the Mondial Relay API you need and whether you want a small wrapper or a full logistics integration. Compare maintenance activity, PHP version support, and issue response before switching.