Developers — Laneo

Build on Laneo

A REST API for your fleet, and webhooks that tell your systems the moment something happens — a trip delivered, a job completed, a purchase order received.

How access works

Every request carries two independent secrets, and neither is useful on its own.

X-Laneo-Token

Your account's token. One per account, held by you and not handed out per integration. Rotating it cuts off every integration at once.

Authorization: Bearer

An API key, one per integration, with its own scopes and revocable on its own.

An API key gets pasted into configs, copied into CI and emailed to developers — that is the normal life of a credential held by somebody else. Requiring the account token as well means a leaked key opens nothing on its own.

Getting started

  1. 1

    Enable the Public API access add-on

    Available on any Laneo plan, from your subscription settings. Without it, the API answers api_not_enabled.

  2. 2

    Issue your tenant token and an API key

    Both from Integrations inside Laneo. Each is shown once and stored hashed — if lost, it is replaced rather than recovered.

  3. 3

    Call the API

    curl https://YOUR-SUBDOMAIN.laneo.africa/api/public/v1/whoami   -H "X-Laneo-Token: trxt_..."   -H "Authorization: Bearer trx_..."
    

JavaScript SDK

No build step, no dependencies, and a webhook verifier that compares in constant time so you do not have to get that right yourself.

const laneo = new Laneo({
  tenant: "acme",
  tenantToken: process.env.LANEO_TENANT_TOKEN,
  apiKey: process.env.LANEO_API_KEY,
})

const { data } = await laneo.vehicles.list({ limit: 100 })

// Verify a webhook before trusting it
const ok = await Laneo.verifyWebhook(rawBody, signatureHeader, secret)
Download laneo.js

Webhook events

trip.createdtrip.status_changedtrip.dispatchedtrip.completedtrip.closedtrip.cancelledtrip.deliveredload.createdload.status_changedload.plannedload.deliveredload.invoicedmaintenance.completedwork_order.completedservice_reminder.dueinvoice.sentinvoice.paidpurchase_order.approvedpurchase_order.receivedfuel.recordeddocument_pack.readydocument_pack.generateddocument_pack.sentdocument_pack.acknowledged

Every delivery is signed with X-Laneo-Signature, an HMAC-SHA256 of the raw body. Return any 2xx to acknowledge; a 5xx or a timeout is retried five times over roughly an hour.

Read the API reference Create an account