Elogistia API for Node.js and PHP
Elogistia publishes no API documentation. dz-delivery rebuilt it from a production integration and checked it live: the elogistia provider works like every other one.
Install
npm install @dz-delivery/core
composer require dz-delivery/sdk
Node.js ≥ 18 (zero dependencies) or PHP ≥ 8.2 (Guzzle 7). Every carrier implements the same interface, so the same code works with the others once the client is configured; some operations are not available on every carrier and throw NOT_SUPPORTED (see the capability matrix).
Elogistia credentials
| Option | Value | Notes |
|---|---|---|
apiKey | API key of your Elogistia account | Sent in the URL (Elogistia’s design) |
email | [email protected] by default | Sent as mail, required by Elogistia |
Elogistia in TypeScript / Node.js
import { createClient, isShippingError } from '@dz-delivery/core'; const elogistia = createClient('elogistia', { apiKey: process.env.ELOGISTIA_API_KEY!, }); try { const quote = await elogistia.getFees({ toWilayaId: 16, isStopDesk: true }); const parcel = await elogistia.createParcel({ recipientName: 'Mohamed Amine', phone: '0550123456', address: 'Cité 221 lots, n°98', wilayaId: 16, communeName: 'Bab Ezzouar', productName: 'T-shirt', price: 2500, orderId: 'ORDER-1001', }); const { parcel: current, events } = await elogistia.track(parcel.trackingNumber); } catch (err) { if (isShippingError(err)) console.error(err.code, err.message); }
Elogistia in PHP / Laravel
use DzDelivery\ClientFactory; use DzDelivery\Errors\ShippingError; $elogistia = ClientFactory::create('elogistia', [ 'apiKey' => getenv('ELOGISTIA_API_KEY'), ]); try { $parcel = $elogistia->createParcel([ 'recipientName' => 'Mohamed Amine', 'phone' => '0550123456', 'address' => 'Cité 221 lots, n°98', 'wilayaId' => 16, 'communeName' => 'Bab Ezzouar', 'productName' => 'T-shirt', 'price' => 2500, 'orderId' => 'ORDER-1001', ]); $result = $elogistia->track($parcel->trackingNumber); } catch (ShippingError $e) { echo "{$e->code}: {$e->getMessage()}"; }
Full PHP guide (Laravel, errors, testing): PHP guide.
Supported methods
| Method | Support | Notes |
|---|---|---|
createParcel | yes | Home or office delivery (Elogistia picks the office). |
track | yes | Unified status + history. |
getFees | yes | Home / office rates per wilaya. |
getWilayas / getCommunes | yes | Elogistia spelling, spelling-tolerant lookup. |
getStopDesks | NOT_SUPPORTED | No office list in the API. |
listParcels | NOT_SUPPORTED | No parcel list in the API. |
cancelParcel | NOT_SUPPORTED | No cancellation through the API: use the dashboard. |
healthCheck | yes | Checks the key (real call). |
Elogistia statuses → unified statuses
Elogistia does not document its status labels. The SDK looks for keywords in Statut (or, when it is missing, in Log), ignoring case, accents and spaces, in the order of the table: the first matching rule wins.
| Keyword in the Elogistia label | Unified status |
|---|---|
retour, return | returned |
annul, cancel, supprim | cancelled |
livreur, en livraison, sortie, transit, expédi, dispatch, vers wilaya, en cours, échec, tentative | in_transit |
livré, delivered | delivered |
attente, créé, nouveau, pending | pending |
| no known keyword | unknown |
If you receive real labels, please report them on GitHub so this table can become exact. Full list of unified statuses and what they mean: SDK statuses.
Good to know about the Elogistia API
- Tested live (October 2026, read-only): wilayas, communes, fees, unknown parcel, errors.
- The API key travels in the URL (Elogistia’s choice): avoid logging full URLs.
- A freshly created parcel can return
NOT_FOUNDon tracking until Elogistia has some history for it. - Status labels are not documented: they are recognized by keywords (« livré », « retour », « annulé », « en livraison »…).
- The
baseUrlmust use HTTPS.
Detailed native mapping (endpoints, fields, statuses): PROVIDERS.md.
Elogistia FAQ
Does Elogistia have API documentation?
Not publicly. The SDK follows a production integration, checked live: you don’t have to reverse-engineer it yourself.
How do I choose the pickup office?
Elogistia assigns it itself: pass isStopDesk: true (with any stopDeskId value).
Why an email address?
Elogistia requires a mail field on every order. Pass the email option to use your own.
Other carriers
Same interface, same normalized statuses (pending, in_transit, delivered…).