API Reference · v1

Build with the Light Speed API

Programmatically create shipments, query status, and subscribe to real-time delivery events. RESTful, JSON, well-documented.

Quick start

Create your first shipment in three lines. Replace sk_live_... with your API key (find it in your dashboard under Settings → API).

curl
curl https://api.lightspeedlgc.com/v1/shipments \
  -H "Authorization: Bearer sk_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "from": { "name": "North & Pine", "address": "412 Alder St, Sacramento, CA" },
    "to":   { "name": "Casey Park",  "address": "1820 Maple Ave, Sacramento, CA" },
    "package": { "weight_oz": 24, "dims": "10x8x4" },
    "service": "same_day"
  }'

Successful requests return a 201 Created with the new shipment object:

json · 201 Created
{
  "id": "shp_01HX9KJM3VQR8P2FZTBN7C4WSY",
  "status": "queued",
  "courier_eta": null,
  "service": "same_day",
  "created_at": "2026-04-21T18:42:15Z"
}

Authentication

All requests must include a bearer token in the Authorization header. Tokens come in two flavors:

  • sk_test_... — sandbox keys. No real shipments dispatched. Free to use.
  • sk_live_... — production keys. Real packages, real money.

Never expose live keys in browser code. Use restricted keys (read-only or scoped) where possible.

Base URL

All endpoints sit under a single base URL. The API is versioned via path prefix.

base
https://api.lightspeedlgc.com/v1

Shipments

The core resource. Every package moving through the network is a shipment.

POST /v1/shipments Create a shipment
GET /v1/shipments/{id} Retrieve one shipment
GET /v1/shipments List shipments (paginated)
POST /v1/shipments/{id}/cancel Cancel before dispatch
POST /v1/shipments/{id}/reschedule Move to a new delivery window

Shipment object

FieldTypeDescription
idstringUnique identifier, prefixed shp_
statusenumqueued, dispatched, in_transit, delivered, exception, cancelled
serviceenumsame_day, next_day, standard
fromobjectPickup address & contact
toobjectDelivery address & contact
packageobjectweight_oz, dims, optional fragile
tracking_urlstringCustomer-facing tracking page
courier_etatimestampISO 8601, null until dispatched
created_attimestampWhen the shipment was created

Couriers

Read-only data about the drivers in our network. Useful for capacity planning or surfacing courier identity in your tracking pages.

GET /v1/couriers/nearby Couriers within a radius of a point
GET /v1/couriers/{id} Retrieve one courier

Webhooks

Subscribe to delivery events instead of polling. We POST a JSON payload to your URL, sign it with HMAC-SHA256, and retry with exponential backoff on non-2xx responses.

POST /v1/webhooks Register a webhook endpoint
GET /v1/webhooks List your webhook endpoints
DELETE /v1/webhooks/{id} Remove a webhook endpoint

Event types

EventWhen it fires
shipment.createdA shipment is created via API or dashboard
shipment.dispatchedAssigned to a courier
shipment.in_transitCourier picked up the package
shipment.out_for_deliveryCourier is on the final leg
shipment.deliveredProof-of-delivery captured
shipment.exceptionAddress issue, refused, damaged, etc.
shipment.cancelledCancelled before dispatch

Example payload

json · webhook
{
  "event": "shipment.delivered",
  "id": "evt_01HX9KKZ4M5N6Q7R8S9T0U1V2W",
  "created": 1745244135,
  "data": {
    "shipment_id": "shp_01HX9KJM3VQR8P2FZTBN7C4WSY",
    "delivered_at": "2026-04-21T20:14:55Z",
    "courier": { "id": "crr_5821", "name": "M. Tate" },
    "proof_of_delivery": "https://cdn.lightspeedlgc.com/pod/shp_01HX9KJM3.jpg"
  }
}

Errors

We use conventional HTTP status codes. Error responses always include a JSON body with error.code and error.message.

CodeStatusMeaning
200OKRequest succeeded
201CreatedResource created
400Bad RequestInvalid parameters
401UnauthorizedMissing or invalid API key
403ForbiddenAuthenticated but not allowed
404Not FoundResource doesn't exist
409ConflictDuplicate or state conflict
429Too Many RequestsRate limited — back off
5xxServer ErrorOur problem. Safe to retry.

Rate limits

Every response includes X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset (Unix timestamp). Limits scale with your plan:

PlanRequests / hourConcurrent webhooks
Sandbox5002
Starter1,0004
Growth5,00016
Scale50,000Unlimited

Ready to start building?

Sandbox keys are free. No credit card. Live in five minutes.