CourierDZ is a PHP client designed to simplify the integration of Algerian shipping providers into your applications. Whether you're working on an e-commerce platform or logistics solution, and provides a unified and easy-to-use interface for managing orders, tracking shipments.
- Multi-Provider Support: Integrate with popular Algerian shipping services such as:
Yalidine
,Yalitec
Mayesto Delivery
Procolis
(Zr Express
)Ecotrack
(DHD
,Conexlog/UPS
and many more... )
- Unified API: A consistent interface to interact with all supported providers.
- Order Management: Create, update, and cancel shipping orders effortlessly.
- Extensible Design: Easily add new providers or customize existing ones.
- PHP 8.2 or higher
- cURL extension
You can install the package via composer:
composer require piteurstudio/courierdz
Provider/Feature | Yalidine | Procolis | Ecotrack | Maystro Delivery |
---|---|---|---|---|
testCredentials | ✅ | ✅ | ✅ | ✅ |
getRates | ❌ | ✅ | ✅ | ❔ |
getRates(null , $to_wilaya_id) | ❌ | ✅ | ✅ | ❌ |
getRates($from_wilaya_id , $to_wilaya_id) | ✅ | ❌ | ❌ | ❌ |
getCreateValidationRules | ✅ | ✅ | ✅ | ✅ |
createOrder | ✅ | ✅ | ✅ | ✅ |
getOrder | ✅ | ✅ | ❔ | ✅ |
updateOrder | ❔ | ❔ | ❔ | ❔ |
cancelOrder | ❔ | ❔ | ❔ | ❔ |
orderLabel | ✅ | ❌ | ✅ | ✅ |
createProduct | ❌ | ❌ | ❌ | ✅ |
- ✅ Implemented
- ❌ Unsupported by the provider
- ⌛ In Progress
- ❔ Not implemented yet ( unknown if supported or not )
Note : Unsupported method can be implemented in the future by using user and password instead of API.
// Ecotrack providers
$credentials = ['token' => '****'];
// Procolis providers ( ZREXPRESS )
$credentials = ['id' => '****', 'token' => '****'];
// Yalidine providers
$credentials = ['token' => '****', 'key' => '****'];
// Mayestro Delivery providers
$credentials = ['token' => '****'];
$shipping_provider = CourierDZ::provider(ShippingProvider::ZREXPRESS, $credentials);
// or
$shipping_provider = new XyzProvider($credentials); // where Xyz is the provider name
/*
* return array of provider response
* Note : results may vary depending on the provider
*/
$result = $shipping_provider->createOrder([
'Tracking' => 'CourierDz-123',
'TypeLivraison' => 1,
'TypeColis' => 0,
'Confrimee' => 0,
'Client' => 'Mohamed',
'MobileA' => '0990909090',
'MobileB' => '0880808080',
'Adresse' => 'Rue 39',
'IDWilaya' => "09",
'Commune' => 'Maraval',
'Total' => "2000",
'Note' => 'test test',
'TProduit' => 'Article1',
"id_Externe" => 'CourierDz-123',
"Source" => 'CourierDz',
]))
To know the required fields for the order creation depend on the provider requirements, use
$rules = $shipping_provider->getCreateOrderValidationRules();
/*
* return array of label data ( base64 encoded string or url )
*/
$label = $shipping_provider->orderLabel('CourierDz-123');
Output :
[
[type] => 'pdf'
[data] => 'base64 encoded string'
]
-- OR --
[
[type] => 'url'
[url] => 'https://example.com/label.pdf'
]
More examples and methods can be found in the DOCUMENTATION.md file.
We welcome all contributions! Please follow these guidelines:
- Document any changes in behavior — ensure
README.md
updated accordingly. - Write tests to cover any new functionality.
- Please ensure that your pull request passes all tests.
composer test
If you encounter any issues or have ideas for new features, please open an issue.
We appreciate your feedback and contributions to help improve this package.
Request Provider and provide the following information:
- Provider Name
- Provider Website
- API Documentation
- Any other relevant information
- Add more methods
- Add more tests
- Add more examples
- Add more documentation
- Add more shipping providers ( eg : Elogistia, E-Com Delivery, Abex Express , Flash Delivery, E-Send , WIN DELIVERY , COLILOG EXPRESS, GODYMA EXPRESS , LETS GO DELIVERY, LEOPARD EXPRESS , MR LIVREUR, EL AMANA DELIVERY, ALLO LIVRAISON, COLIRELI , Yalitec , GuepEX , Zimou Express)
Please see CHANGELOG for more information on what has changed recently.
Please review our security policy on how to report security vulnerabilities.
- This package is not officially affiliated with or endorsed by any shipping providers.
- Names, logos, and trademarks are the property of their respective owners.
- Before using any shipping provider, ensure it is authorized by ARPCE. ( Check the approved list here. )
- This package may include providers not listed by ARPCE; verify their compliance before use.
If you find this package helpful, please consider giving it a ⭐ on GitHub ! Your support encourages us to keep improving the project. Thank you!
The MIT License (MIT). Please see License File for more information.