Bird Pickup & Delivery Bird Pickup & Delivery
Back to Local Delivery
Local Delivery

Local Delivery: Driving Distance Validation

Updated June 5, 2026

Configure local delivery based on actual driving distance (kilometers/miles) from your store location. Unlike radius validation which draws a straight-line circle, driving distance follows real roads — giving you more accurate delivery zone control.


Table of Contents


When to Use Driving Distance Validation

  • Urban areas with irregular road networks: Straight-line distance may include unreachable areas (rivers, highways, restricted zones).
  • Accurate delivery cost estimation: Charges based on the actual route a driver takes.
  • Areas where radius validation over- or under-includes customers: e.g., a customer 4km away in a straight line but 12km by road.

Driving Distance vs. Radius: Key Differences

💡
Feature Radius Validation Driving Distance Validation
Distance method Straight-line distance Actual road distance
Accuracy Approximate More precise
Google API required Geocoding API Routes API
Best for Simple zones, regions without postal codes (ZIP codes) Urban areas, accurate delivery costing

Prerequisites

You need a Google Maps API key with the following APIs enabled:

  1. Get API Key: Go to Google Cloud Console.
  2. Enable APIs: Enable the Places API, Geocoding API, and Routes API for your project.
  3. Billing: Set up billing for your Google Cloud project (required for API usage).
  4. Create Key: Create an API key in the Credentials section.

For detailed setup instructions, follow Google’s official documentation.


Configuration Steps

1. Configure Driving Distance Validation

  1. Navigate to Bird Settings > Delivery.
  2. Scroll to “Distance Validation Mode”.
  3. Click the “Driving distance validation (Google Maps)” radio button.

Shows the Distance Validation Mode section with the Driving distance validation (Google Maps) option highlighted

  1. Enter your Google Maps API Key in the dialog that appears.
  2. Click Save to validate and store your key.

The app validates your API key automatically. You will see green checkmarks next to Places API, Geocoding API, and Routes API once your key is valid.

Shows the Enable Google Maps Driving Distance Validation dialog with API key entered and Places API, Geocoding API, and Routes API all showing Enabled

If you see an error, check that your key has the Routes API, Places API, and Geocoding API all enabled in Google Cloud Console.

2. Set Up Store Locations

  1. Go to Bird App Settings > Configure Locations.
  2. Create or duplicate locations for different delivery zones (e.g., “Main Store”, “Downtown Zone”).

Demonstrates the Configure Locations page with multiple store locations set up for different delivery zones

3. Configure Driving Distance for Each Location

  1. Select a location and enable Local Delivery.
  2. Click “Edit Settings” in the Local Delivery section.
  3. Scroll to the “Driving distance” section.
  4. Enter the maximum driving distance in km or miles:
💡
Location Driving Distance
Main Store Location 5km
Downtown Zone 10km
Extended Zone 15km

Shows the Driving distance field set to 5.0 km with the description "Maximum driving distance from this location (actual road distance)"


How Driving Distance Validation Works

  1. Customer types their address in the delivery widget
  2. Google Maps provides address suggestions as they type
  3. Customer selects their address from the dropdown
  4. Bird App calls the Google Routes API to calculate the driving distance to each store location
  5. App assigns customer to the nearest location within driving distance limit
  6. App applies that location’s rates and delivery schedules

Shows the customer-facing delivery widget with Google Maps address autofill functionality and dropdown suggestions for address selection

Important behavior

  • Bird selects the location with the smallest driving distance limit if multiple locations overlap.
  • Each location’s delivery rate applies to all addresses within that location’s driving distance limit.
  • Customers select delivery date and time from that location’s schedule.
  • If no location is reachable by road within its limit, the customer is shown as outside the delivery zone.

Customer selecting delivery date and time from the assigned location's schedule with successful location validation


Update Input Field Labels and Validation Messages

Update the labels and validation messages for driving distance delivery zones to ensure customers enter a full address:

  1. Navigate to Bird App Settings > Text and Languages
  2. Click Edit on the language you want to modify
  3. Update the following elements:
  • Postal codes header: Change to “Enter your address to check if you are eligible for local delivery”
  • Postal codes label: Change to “Enter your address”
  • Postal codes success: Update to reflect address validation instead of postal code (optional)
  • Postal codes error: Update error message to reflect address validation instead of postal code (optional)

Test Your Configuration

Verify driving distance delivery works correctly:

  1. Test with addresses at various driving distances from store locations
  2. Verify Google Maps address autofill functionality
  3. Confirm correct location assignment based on road distance (not straight-line)
  4. Check proper rate application
  5. Test addresses that are outside all driving distance limits
  6. Verify updated labels and validation messages display correctly

Shows the checkout page with prefilled selected location and driving-distance delivery rate displayed correctly for the customer


Common Questions

How is this different from radius validation?

Radius validation measures straight-line distance. Driving distance validation uses actual road routes via the Google Routes API, so a customer 4km away in a straight line but 12km by road would be correctly evaluated against the 12km road distance.

Why do I see an error or why do the locations not show up in the frontend?

Ensure your API Key is valid and has the Routes API, Geocoding API, and Places API all enabled in the Google Cloud Console.


Was this article helpful?