Loc

Below find the loc object reference for Liquid Commerce's location based configurations.

The loc parameter provides 2 different options for location based information through the following parameters, at least 1 is required: *longitude and latitude are prioritized if included in the request*

LocType

Attribute
Description

address: Address

location information split out to individual values for the street, city, state, zip code and country. When using this option, all fields except country are required.

coords: Coords

location information provided through an exact geospatial point by providing valid longitude and latitude coordinates values. The numbers are in decimal degrees format and range from -90 to 90 for latitude and -180 to 180 for longitude

Address

Attribute
Description

id: string [optional]

identifier of the address

one: string [required]

street address

two: string [required]

apt, suite, floor, etc

city: string [required]

city

state: string [required]

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

zip: string [required]

zip code

country: string [optional]

country in which the address is located

Coords

Attribute
Description

lat: number [required]

latitude, ex: 40.744860

long: number [required]

longitude, ex: -73.985314


Additional Context

Address: location information split out to individual values for the street, city, state, zip code and country. If you choose to use this option for your location, only the state is required.

*ALL FIELDS REQUIRED FOR ON DEMAND AVAILABILITY*

"address": {
  // street address
  // REQUIRED
  "one": "string"; 
  // apt, suite, floor, etc
  // REQUIRED
  "two": "string";
  // city 
  // REQUIRED
  "city": "string";
  // state, you can use either 2 letter code or the full name
  // REQUIRED
  "state": "string";
  // zip code
  // REQUIRED
  "zip": "string";
  // country
  // OPTIONAL
  "country": "string";
}

Longitude & Latitude: location information provided through an exact geospatial point by providing valid longitude and latitude coordinates values.

// The numbers are in decimal degrees format and range 
// from -90 to 90 for latitude and -180 to 180 for longitude
"coords": {
   // latitude
   // REQUIRED
   "lat": "number", // ex: 40.744860
   // longitude
   // REQUIRED
   "long": "number" // ex: -73.985314
}

Sample loc

Loc Object
{
  "address":{
    "one": "100 Madison ave",
    "two": "apt 1707",
    "city": "New York",
    "state": "NY",
    "zip": "10016",
    "country": "US"
  },
  "coords": {
        "lat": 40.744860,
        "long": -73.985314
  }
}

Last updated