FleetTech

Developers and integrations.

Orders can arrive from your store, a spreadsheet or your own code. You see what we send back.

Webhook deliveriesOne order

Example data

From key to first webhook.

Four steps. Use a test key first.

  1. Get a key

    Keys start with fk_test_ or fk_live_. A key is shown once, so store it safely.

  2. Create an order

    Send the order with an Idempotency-Key header so a retry never makes a duplicate.

  3. Receive a webhook

    We post each change to your URL, as the order moves from accepted to delivered.

  4. Verify the signature

    Check X-Fleet-Signature before you trust the body.

Connect what you already use.

Seven ways in and out, from a spreadsheet to a signed webhook.

Shopify

Live

Orders arrive automatically. A cancellation in the store reaches the delivery company.

WooCommerce

Live

Orders arrive automatically. A cancellation in the store reaches the delivery company.

CSV import

Live

Upload a spreadsheet of orders and they go straight to the board.

REST API

Live

Create, list, change and cancel orders from your own system.

Webhooks

Live

Signed messages to your system when an order changes.

Google Maps

Optional

Maps and routing are free by default. Add your own Google key and switch it on per feature.

SMS to customers

Live

Customers get updates by SMS and can stop them with one reply.

Create an order in one request.

Send the order to us with your API key. If your system retries, send the same idempotency key and you get the same order back, not a second one.

  • Authenticate with your key as a bearer token.
  • Send an Idempotency-Key header on every create.
  • Send amounts as whole minor units, in a string.
curl -X POST https://api.fleettech.io/v1/jobs \
  -H "Authorization: Bearer <your API key>" \
  -H "Idempotency-Key: <unique value>" \
  -H "Content-Type: application/json" \
  -d '{
    "merchantRef": "ORD-1042",
    "branchId": "<branch uuid>",
    "customer": {
      "name": "Fatima Al-Thani",
      "phone": "+97455501234"
    },
    "dropoff": {
      "lat": 25.2854,
      "lng": 51.531,
      "zoneNo": 38,
      "streetNo": 950,
      "buildingNo": 21
    },
    "payment": {
      "type": "cod",
      "codAmountMinor": "8500"
    },
    "otpRequired": true
  }'

Example data. Full reference in your dashboard.

What the request means.

A few rules that save you a support call.

Money in minor units

The value "8500" in codAmountMinor means 85.00 Qatari riyals. Amounts are whole minor units, sent as a string.

merchantRef is required

It is your own order reference, and it is your replay key. Send the same one again and you get the same order.

The drop-off needs two things

Either the blue plate (zone, street, building) or an address text, plus a pin on the map.

A replay returns the same order

Use the Idempotency-Key header on every create, so a retry after a timeout never makes a duplicate.

Other endpoints.

The same API key works on all of them.

MethodPathWhat it does
POST/v1/jobs/multi-dropCreate 2 to 5 drops from one branch.
GET/v1/jobsList your orders.
GET/v1/jobs/{id}Read one order.
POST/v1/jobs/{id}/cancelCancel an order.
POST/v1/jobs/{id}/address/previewCheck a new address. Nothing changes.
PATCH/v1/jobs/{id}/addressChange the address.
PATCH/v1/jobs/{id}/scheduleChange the schedule.
POST/v1/jobs/{id}/reattemptAsk for another delivery attempt.
GET/v1/jobs/{id}/webhook-deliveriesSee what we sent you for this order.
GET/v1/serviceabilityCheck whether a place is inside the delivery company's zones.
GET/v1/slots/availableList the delivery slots that are open.
GET/v1/invoicesList your invoices.
GET/v1/credit-notesList your credit notes.
GET/v1/cod-statementRead your cash on delivery statement.

Webhook events.

Each event is a signed POST to your URL. These are the ones most companies use. The full list, with sample payloads, is at GET /v1/events.

EventWhen it is sent
job.createdAn order was created, by API, dashboard, CSV, a recurring template or a connected store.
job.assignedA driver was assigned to the order.
job.acceptedA driver accepted the order.
job.picked_upThe driver picked the order up.
job.deliveredThe order was delivered.
job.failedThe delivery failed.
job.cancelledThe order was cancelled.
job.cash_collectedThe driver collected the cash on delivery.
job.address_updatedThe drop-off address of the order was changed.
job.reattempt_scheduledA failed order was scheduled for another delivery attempt.

A signed payload, and how to check it.

Every delivery carries an X-Fleet-Signature header. It holds a timestamp t and one or more v1 values. Each v1 is an HMAC-SHA256 of the timestamp, a dot and the raw request body, using your webhook secret, as hex.

  • Verify against the raw body exactly as received, before you parse the JSON.
  • Reject the request if the timestamp is more than 5 minutes from your clock.
  • During a secret rotation the header holds one v1 per accepted secret. Any match passes.
  • X-Fleet-Event-Id is the id of the event. Use it to ignore a repeat.
Request your server receives
POST /your-webhook-url
Content-Type: application/json
User-Agent: FleetTech-Webhooks/1
X-Fleet-Event-Id: 0b1c2d3e-4f50-4a61-8b72-9c83d4e5f606
X-Fleet-Signature: t=1764150000,v1=<64 hex characters>

{
  "id": "0b1c2d3e-4f50-4a61-8b72-9c83d4e5f606",
  "type": "job.delivered",
  "createdAt": "2026-11-26T10:00:00.000Z",
  "data": {
    "job": {
      "id": "<order uuid>",
      "number": "10234",
      "merchantRef": "ORD-1042",
      "status": "delivered"
    }
  }
}

Example data. The real job object has more fields.

Verify it in Node
import { createHmac, timingSafeEqual } from "node:crypto";

export function verify(header, rawBody, secret, toleranceS = 300) {
  let t = null;
  const sigs = [];
  for (const part of header.split(",")) {
    const i = part.indexOf("=");
    const k = part.slice(0, i).trim();
    const v = part.slice(i + 1).trim();
    if (k === "t") t = Number(v);
    if (k === "v1") sigs.push(v);
  }
  if (!t || sigs.length === 0) return false;
  if (Math.abs(Date.now() / 1000 - t) > toleranceS) return false;

  const expected = createHmac("sha256", secret)
    .update(`${t}.${rawBody}`, "utf8")
    .digest();

  return sigs.some(
    (s) =>
      /^[0-9a-f]{64}$/.test(s) &&
      timingSafeEqual(expected, Buffer.from(s, "hex"))
  );
}

Webhooks you can trust

Every webhook is signed. Answer with any 2xx status and the delivery is done. Failed deliveries are retried, and every delivery attempt is visible to you.

After 1 minute5 minutes30 minutes2 hours6 hours

A redirect is not followed. An endpoint that keeps failing is switched off after 20 failed attempts in a row.

Keys that stay in their lane

Each key belongs to one merchant and is checked on every request. You can revoke a key instantly. Test keys and live keys are separate.

A key is shown once when it is created. After that it cannot be shown again, so store it safely.

Build on FleetTech.

Tell us what you want to connect and we will set up your keys.