Autocomplete

Provides address suggestions based on user input

Endpoint Details

POST /address/autocomplete

Headers

Header
Value

Content-Type

application/json

Authorization

Bearer <YOUR_ACCESS_TOKEN>

Body

Parameter
Type
Description
Required

input

string

Partial address input for autocomplete suggestions

key

string

Your Google Places API key

refresh

boolean

When set to true, a new access token will be generated and returned

Response Details

Field
Type
Description

statusCode

number

HTTP status code of the response

message

string

A brief message describing the result of the API call

metadata

Contains metadata about the API call

auth

Authentication object, only when refresh in true

data

Array of Google Place ID objects

Metadata Object

Field
Type
Description

languages

Array<string>

List of supported languages for the response, e.g. ["en"]

timestamp

string

Unix timestamp (in milliseconds) when the response was generated

timezone

string

Timezone used for the response, always "UTC"

requestId

string

Unique identifier for the API request. Used for debugging and support

path

string

API path

version

string

API version used for the request

Google Place Object

Field
Type
Description

id

string

Google Places API location identifier

description

string

An address returned

Sample Request and Response

curl --location 'https://staging.api.liquidcommerce.cloud/address/autocomplete' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
  "input": "100 Madison Ave, New",
  "key": "<YOUR_GOOGLE_PLACES_API_KEY>"
  "refresh": false"
}'
{
    "statusCode": 200,
    "message": "Get list address according to search.",
    "metadata": {
        "languages": [
            "en"
        ],
        "timestamp": 1731592446922,
        "timezone": "UTC",
        "requestId": "reqid_123abc45def",
        "path": "/api/address/autocomplete",
        "version": "1.7.0"
    },
    "data": [
        {
            "id": "placeid_123abc456ef",
            "description": "100 Madison Ave, Morristown, New Jersey, USA"
        },
        {
            "id": "placeid_789abc456ef",
            "description": "100 Madison Ave, New York, NY, USA"
        }
    ]
}

Last updated