Official Node / TypeScript SDK for the Armada Automated Ordering API v2.
From npm (once published):
npm i @armada/sdkDirectly from the GitHub repo — no registry needed, works today:
# latest main
npm i github:armadadelivery/armada-node
# pinned to a release tag
npm i github:armadadelivery/armada-node#v0.1.0-beta.0
# pinned to a specific commit
npm i github:armadadelivery/armada-node#7e1a4f09The SDK has a prepare script, so npm automatically runs tsc on install
when fetched from git. You end up with a compiled dist/ ready to import.
import { ArmadaClient } from '@armada/sdk';
const armada = new ArmadaClient({
apiKey: process.env.ARMADA_API_KEY!,
apiSecret: process.env.ARMADA_API_SECRET!,
// defaults to https://api.armadadelivery.com — use a Test-mode API key to simulate deliveries.
});
const { data: order, rateLimit } = await armada.deliveries.create({
reference: 'order-100245',
payment: { amount: 4.5, type: 'paid' },
origin_format: 'branch_format',
origin: { branch_id: '66af6f6c2f85f4b4c36f2031' },
destination_format: 'location_format',
destination: {
contact_name: 'John Doe',
contact_phone: '+96590000000',
latitude: 29.3759,
longitude: 47.9774,
first_line: 'Salmiya, Block 5, Street 3',
},
});
console.log(order.id, 'remaining:', rateLimit.remaining);- HMAC-SHA256 request signing (
x-armada-timestamp+x-armada-signature) - Rate-limit headers parsed into
response.rateLimit - Error responses surfaced as typed
ArmadaErrorwith.status,.code,.rateLimit - Works with Node 18+ — no browser target
client.deliveries.create / get / cancel / retry / estimate / estimateStaticclient.branches.list / create / get / update / deleteclient.wallet.getclient.invoices.list / get
The default base URL is production (https://api.armadadelivery.com).
The recommended integration path is:
- Create a key in the business app at business.armadadelivery.com with Test mode ON.
- Every order that key creates is simulated end-to-end — bot driver, ~30 s lifecycle, no real driver, no wallet charge.
- Toggle Test mode off on the same key when you're ready to go live.
A fully-isolated sandbox deployment exists at
https://sandbox.api.armadadelivery.com — pass it as baseUrl explicitly
if you want zero overlap with your production account. For most integrations
you do not need this.