πŸ—ΊοΈAddress API

The LiquidCommerce Address API provides comprehensive address validation, standardization, and geocoding services optimized for beverage alcohol delivery and shipping

Address API Overview

It leverages Google Places API to offer address autocomplete functionality and retrieve geographical coordinates, enhancing the accuracy of shipping addresses and enabling location-based services.

Key Features

  • Address autocomplete using Google Places API

  • Geocoding to obtain latitude and longitude for addresses

  • Validation of shipping addresses

  • Support for international addresses

Authentication

Before using the API, you need to obtain an access token from the Authentication API. Include this token in the Authorization header of all API requests:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Error Handling

The API uses standard HTTP response codes to indicate the success or failure of requests. In case of an error, the response body will contain a JSON object with more details about the error.

Rate Limiting

The API is subject to rate limiting to ensure fair usage and maintain performance. If you exceed the rate limit, you'll receive a 429 (Too Many Requests) response.

Best Practices

  1. Use the autocomplete endpoint to provide real-time suggestions as users type their address.

  2. Always use the place ID returned by the autocomplete endpoint to fetch detailed address information.

  3. Store both the formatted address and the geocoding data (latitude and longitude) for each validated address.

  4. Implement proper error handling to manage cases where address validation fails.

Google Places API Key

circle-info

A Google Places API Key is required to use this service. You need to include this key in your requests to the Address API. For instructions on how to obtain a Google Places API Key, please refer to the Google Maps Platform documentationarrow-up-right

Required Google Cloud Configuration

Your Google Cloud API key must:

  1. Have Places API enabled

  2. Be authorized for the required SKUs

  3. Have appropriate key restrictions configured (recommended: restrict to Places API only)

In Google Cloud Console:

  • Go to APIs & Services β†’ Credentials

  • Edit your API key

  • Under API restrictions, select:

    • βœ… Places API (or Places API (New) depending on your configuration)

Required Billing SKUs

The following Google billing SKUs are required for the Address API endpoints:

1️⃣ Autocomplete Endpoint

Used by: POST /api/address/autocomplete

Google SKU: Places Autocomplete – Per Request (Legacy Essentials SKU) https://developers.google.com/maps/billing-and-pricing/sku-details#places_autocomplete-per-request-legacy-ess-sku


2️⃣ Place Details Endpoint

Used by: GET /api/address/details

Google SKU: Place Details – ID Refresh (Legacy Essentials SKU) https://developers.google.com/maps/billing-and-pricing/sku-details#place-details-id-refresh-legacy-ess-sku

Support

Our dedicated support team is available to assist you with API integration and usage. For any questions or issues, please contact [email protected]envelope.

Last updated