Quickstart

Quickstart

Choose the API you want to get started with:

AV / Ride-Hail Analytics

Make your first analytics API call in under 2 minutes.

Prerequisites

  • An Autolane account with at least one active site
  • An API key with analytics:read permission (create one here)

1. Get today’s metrics

$curl -s -H "Authorization: Bearer YOUR_API_KEY" \
> "https://api.goautolane.com/api/analytics/metrics?siteId=YOUR_SITE_ID&period=today" | jq

Example response:

1{
2 "status": "success",
3 "data": {
4 "autolane_sessions": {
5 "total": 142,
6 "change_percentage": 12.5,
7 "change_type": "increase"
8 },
9 "average_occupancy": {
10 "percentage": 67.3,
11 "change_percentage": -3.1,
12 "change_type": "decrease"
13 },
14 "average_dwell_time": {
15 "minutes": 4,
16 "seconds": 30,
17 "total_seconds": 270,
18 "change_percentage": 5.0,
19 "change_type": "increase"
20 }
21 }
22}
$curl -s -H "Authorization: Bearer YOUR_API_KEY" \
> "https://api.goautolane.com/api/analytics/occupancy-trends?siteId=YOUR_SITE_ID&period=today&granularity=hour" | jq

3. Explore the API Reference

See the full API Reference for all available endpoints, query parameters, and response schemas.

Common query parameters

All analytics endpoints accept these parameters:

ParameterTypeDefaultDescription
siteIdUUIDrequiredSite to query
periodstringtodaytoday, week, or month
startDateISO 8601Custom range start (pair with endDate)
endDateISO 8601Custom range end (pair with startDate)

Direct Delivery

Quote and create your first delivery in under 2 minutes. The flow is two-step: quote first, then create.

Prerequisites

  • An Autolane API key with deliveries:write permission (create one here)
  • Your site UUID (the x-retailer-id value), available in the Autolane Portal under your store’s settings

1. Request a quote

$curl -s -X POST https://api.goautolane.com/dd/v1/deliveries/quote \
> -H "Authorization: Bearer YOUR_API_KEY" \
> -H "x-retailer-id: a1b2c3d4-e5f6-7890-1234-567890abcdef" \
> -H "Content-Type: application/json" \
> -d '{
> "external_delivery_id": "QUICKSTART-001",
> "customer": {
> "phone": "+15551234567"
> },
> "delivery_address": {
> "street": "123 Main St",
> "city": "Austin",
> "state": "TX",
> "zip": "78701"
> },
> "ready_by": "YOUR_FUTURE_ISO8601_UTC_TIMESTAMP",
> "order_items": [
> { "name": "Widget", "quantity": 1 }
> ]
> }' | jq

Example response:

1{
2 "success": true,
3 "data": {
4 "external_delivery_id": "QUICKSTART-001",
5 "available": true,
6 "pickup_eta": "2030-01-01T12:15:00Z",
7 "delivery_eta": "2030-01-01T12:30:00Z",
8 "delivery_fee_cents": 599,
9 "currency": "USD",
10 "expires_at": "2030-01-01T11:55:00Z"
11 }
12}

The quote is valid for 5 minutes. If available is false, the response includes an unavailable_reason (e.g., OUT_OF_SERVICE_AREA) and you cannot promote it to a delivery.

2. Create the delivery

Use the same external_delivery_id to convert the quote into an active delivery:

$curl -s -X POST https://api.goautolane.com/dd/v1/deliveries \
> -H "Authorization: Bearer YOUR_API_KEY" \
> -H "x-retailer-id: a1b2c3d4-e5f6-7890-1234-567890abcdef" \
> -H "Content-Type: application/json" \
> -d '{
> "external_delivery_id": "QUICKSTART-001",
> "customer": {
> "first_name": "Jane",
> "last_name": "Doe",
> "email": "jane@example.com"
> }
> }' | jq

The locked terms (price, ETAs) carry over from the quote.

3. Check delivery status

$curl -s -H "Authorization: Bearer YOUR_API_KEY" \
> -H "x-retailer-id: a1b2c3d4-e5f6-7890-1234-567890abcdef" \
> "https://api.goautolane.com/dd/v1/deliveries/QUICKSTART-001" | jq

4. Set up webhooks (optional)

Register a webhook to receive real-time delivery status updates instead of polling:

$curl -s -X POST https://api.goautolane.com/dd/v1/webhooks \
> -H "Authorization: Bearer YOUR_API_KEY" \
> -H "x-retailer-id: a1b2c3d4-e5f6-7890-1234-567890abcdef" \
> -H "Content-Type: application/json" \
> -d '{
> "url": "https://your-server.com/webhooks/autolane",
> "events": ["pickup_status.changed"]
> }' | jq

Save the secret from the response — you will need it to verify webhook signatures.

5. Explore the API Reference

See the full Direct Delivery API Reference and Overview for authentication details, the delivery lifecycle, error codes, and webhook documentation.