SDKs & Libraries
Official client libraries for the Fleetbase API. Available for JavaScript and PHP, with a dedicated Storefront SDK for custom commerce experiences.
Official JavaScript SDK for the Fleetbase API. Works in Node.js and modern browser environments with full TypeScript support.
Official PHP SDK for server-side Fleetbase API integration. Composer installable and PSR-4 compliant.
Quick Start
Authenticate with your API key and make your first call in minutes.
1import Fleetbase from '@fleetbase/sdk';
2
3const fleetbase = new Fleetbase('flb_live_xxxx');
4
5// Create an order
6const order = await fleetbase.orders.create({
7 payload: {
8 pickup: 'place_abc123',
9 dropoff: 'place_xyz789',
10 entities: [{ name: 'Package', weight: 2.5 }],
11 },
12 type: 'delivery',
13 scheduled_at: '2026-05-01T09:00:00Z',
14});
15
16// Track a driver's live location
17const location = await fleetbase.drivers.getLocation('driver_xxx');
18console.log(location.coordinates); // [lng, lat]1use Fleetbase\FleetbaseSDK;
2
3$fleetbase = new FleetbaseSDK('flb_live_xxxx');
4
5// Create an order
6$order = $fleetbase->orders->create([
7 'payload' => [
8 'pickup' => 'place_abc123',
9 'dropoff' => 'place_xyz789',
10 ],
11 'type' => 'delivery',
12]);
13
14echo $order->tracking_number; // FB-000001
15
16// List all active drivers
17$drivers = $fleetbase->drivers->findAll(['status' => 'active']);1import Storefront from '@fleetbase/storefront-sdk';
2
3const store = new Storefront('public_key_xxxx');
4
5// Browse product categories
6const categories = await store.categories.query();
7
8// Add to cart and checkout
9await store.cart.add('product_xxx', 1);
10
11const order = await store.cart.checkout({
12 customer: { name: 'Jane Doe', phone: '+1234567890' },
13 delivery_address: 'place_xyz789',
14 payment_method: 'cash',
15});API Resources Covered
The JavaScript and PHP SDKs provide typed access to all core Fleetbase API resources.
Open Source
All Fleetbase SDKs are open-source under the AGPL-3.0 license. Read the source, file issues, or contribute improvements directly on GitHub.
Start building today
Install an SDK, grab your API key from the Developer Console, and make your first API call in minutes.