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

TypeScript · npm
npm install @dz-delivery/core
PHP · Composer
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

OptionValueNotes
apiKeyAPI key of your Elogistia accountSent in the URL (Elogistia’s design)
email[email protected] by defaultSent as mail, required by Elogistia

Elogistia in TypeScript / Node.js

TypeScript
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

PHP
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

MethodSupportNotes
createParcelyesHome or office delivery (Elogistia picks the office).
trackyesUnified status + history.
getFeesyesHome / office rates per wilaya.
getWilayas / getCommunesyesElogistia spelling, spelling-tolerant lookup.
getStopDesksNOT_SUPPORTEDNo office list in the API.
listParcelsNOT_SUPPORTEDNo parcel list in the API.
cancelParcelNOT_SUPPORTEDNo cancellation through the API: use the dashboard.
healthCheckyesChecks 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 labelUnified status
retour, returnreturned
annul, cancel, supprimcancelled
livreur, en livraison, sortie, transit, expédi, dispatch, vers wilaya, en cours, échec, tentativein_transit
livré, delivereddelivered
attente, créé, nouveau, pendingpending
no known keywordunknown

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_FOUND on tracking until Elogistia has some history for it.
  • Status labels are not documented: they are recognized by keywords (« livré », « retour », « annulé », « en livraison »…).
  • The baseUrl must 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…).