LogoLogo
  • LiquidCommerce Documentation
  • πŸ”Authentication API Integration
    • Get Access Token
  • Services
    • πŸ—ΊοΈAddress API
      • Autocomplete
      • Details
    • πŸ‘₯Users API
      • Session
      • Fetch User
      • Delete User
      • Create/Update Address
      • Delete Address
      • Add Payment
      • Update Default Payment
      • Delete Payment
    • πŸ—ƒοΈCatalog API
      • Search
      • Availability
    • πŸ›’Cart API
      • Create/Update Cart
    • πŸ›οΈCheckout API
      • Prepare
      • Complete
    • πŸ“Orders API
      • Authentication
      • Get Order
  • CLOUD SDK
    • Overview
    • Methods & Usage
  • EVENTS & ERRORS
    • Overview
    • Cart Events
    • Checkout Status Codes
  • EVENT BRIDGE (WEBHOOKS)
    • Orders
  • Types
    • Loc
    • Catalog
    • Catalog Filters
    • Product
    • Cart
    • User
    • Retailer
    • Checkout
    • Order
Powered by GitBook
On this page
  • Endpoint Details
  • Headers
  • Body
  • Response Details
  • Sample Request and Response
Export as PDF
  1. Services
  2. Address API

Details

Provides address suggestions based on user input

PreviousAutocompleteNextUsers API

Last updated 3 months ago

Endpoint Details

POST /address/details

Headers

Header
Value

Content-Type

application/json

Authorization

Bearer <YOUR_ACCESS_TOKEN>

Body

Parameter
Type
Description
Required

id

string

Google Places API location identifier for the selected address

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 address objects

Metadata Object

Address Object

Field
Type
Description

formattedAddress

string

Formatted address

coords

Address coordinates

address

Address info object

Address Type Object

Field
Type
Description

one

string

Street address

two

string

Street address

city

string

City address

state

string

state, you can use either 2 letter code or the full name

zip

string

zip code

country

string

country in which the address is located

Sample Request and Response

curl --location 'https://staging.api.liquidcommerce.cloud/address/details' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
  "id": "placeid_123abc456ef",
  "key": "<YOUR_GOOGLE_PLACES_API_KEY>"
}'
{
    "statusCode": 200,
    "message": "Get the longitude and latitude of the address you requested",
    "metadata": {
        "languages": [
            "en"
        ],
        "timestamp": 1731594349056,
        "timezone": "UTC",
        "requestId": "reqid_123abc45def",
        "path": "/api/address/details",
        "version": "1.7.0"
    },
    "data": {
        "formattedAddress": "100 Madison Avenue, Lakewood, NJ 08701",
        "coords": {
            "lat": 40.091142,
            "long": -74.2169165
        },
         "address": {
                "one": "100 Madison Avenue",
                "two": "",
                "city": "Lakewood",
                "state": "NJ",
                "zip": "08701",
                "country": "US",
            }
```
    }
}

Array<>

πŸ—ΊοΈ
metaDataObject
authObject
addressObject
coordsType
addressTypeObject
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