CourierDZ
CourierDZ is a PHP client designed to simplify the integration of Algerian shipping providers
Install / Use
/learn @PiteurStudio/CourierDZREADME
CourierDZ
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.
Features
- Multi-Provider Support: Integrate with popular Algerian shipping services such as:
Yalidine,YalitecMayesto DeliveryProcolis(Zr Express)Ecotrack(DHD,Conexlog/UPSand 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.
Requirements
- PHP 8.2 or higher
- cURL extension
Installation
You can install the package via composer:
composer require piteurstudio/courierdz
Current Supported Methods
| 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.
Usage
Initialize the shipping provider and set your credentials.
// 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
Create a parcel ( order )
/*
* 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();
Retrieving a label ( order )
/*
* 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.
Contribution
We welcome all contributions! Please follow these guidelines:
- Document any changes in behavior — ensure
README.mdupdated accordingly. - Write tests to cover any new functionality.
- Please ensure that your pull request passes all tests.
Testing
composer test
Issues & Suggesting Features
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.
Provider not yet included?
Request Provider and provide the following information:
- Provider Name
- Provider Website
- API Documentation
- Any other relevant information
Future Planned Features
- [ ] 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)
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
Disclaimer
- 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.
⭐ Support
If you find this package helpful, please consider giving it a ⭐ on GitHub ! Your support encourages us to keep improving the project. Thank you!
License
The MIT License (MIT). Please see License File for more information.
Related Skills
clearshot
Structured screenshot analysis for UI implementation and critique. Analyzes every UI screenshot with a 5×5 spatial grid, full element inventory, and design system extraction — facts and taste together, every time. Escalates to full implementation blueprint when building. Trigger on any digital interface image file (png, jpg, gif, webp — websites, apps, dashboards, mockups, wireframes) or commands like 'analyse this screenshot,' 'rebuild this,' 'match this design,' 'clone this.' Skip for non-UI images (photos, memes, charts) unless the user explicitly wants to build a UI from them. Does NOT trigger on HTML source code, CSS, SVGs, or any code pasted as text.
openpencil
2.1kThe world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.
openpencil
2.1kThe world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.
ui-ux-designer
Use this agent when you need to design, implement, or improve user interface components and user experience flows. Examples include: creating new pages or components, improving existing UI layouts, implementing responsive designs, optimizing user interactions, building forms or dashboards, analyzing existing UI through browser snapshots, or when you need to ensure UI components follow design system standards and shadcn/ui best practices.\n\n<example>\nContext: User needs to create a new dashboard page for team management.\nuser: "I need to create a team management dashboard where users can view team members, invite new members, and manage roles"\nassistant: "I'll use the ui-ux-designer agent to design and implement this dashboard with proper UX considerations, using shadcn/ui components and our design system tokens."\n</example>\n\n<example>\nContext: User wants to improve the user experience of an existing form.\nuser: "The signup form feels clunky and users are dropping off. Can you improve it?"\nassistant: "Let me use the ui-ux-designer agent to analyze the current form UX and implement improvements using our design system and shadcn/ui components."\n</example>\n\n<example>\nContext: User wants to evaluate and improve existing UI.\nuser: "Can you take a look at our pricing page and see how we can make it more appealing and user-friendly?"\nassistant: "I'll use the ui-ux-designer agent to take a snapshot of the current pricing page, analyze the UX against Notion-inspired design principles, and implement improvements using our design tokens."\n</example>
