> For the complete documentation index, see [llms.txt](https://docs.liquidcommerce.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.liquidcommerce.cloud/types/loc.md). Agents can also search and read this documentation through its [MCP server](https://docs.liquidcommerce.cloud/~gitbook/mcp).

# 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:\
*<mark style="color:purple;">**\*longitude and latitude are prioritized if included in the request\***</mark>*

### LocType

<table><thead><tr><th width="231">Attribute</th><th>Description</th></tr></thead><tbody><tr><td><strong>address:</strong> <a href="#address"><mark style="color:purple;"><strong>Address</strong></mark></a></td><td>location information split out to individual values for the street, city, state, zip code and country. <strong>When using this option, all fields except country are required.</strong></td></tr><tr><td><strong>coords:</strong> <a href="#coords"><mark style="color:purple;"><strong>Coords</strong></mark></a></td><td>location information provided through an exact geospatial point by providing valid longitude and latitude coordinates values. <strong>The numbers are in decimal degrees format and range from -90 to 90 for latitude and -180 to 180 for longitude</strong></td></tr></tbody></table>

#### Address

<table><thead><tr><th width="236">Attribute</th><th>Description</th></tr></thead><tbody><tr><td><strong>id: </strong><mark style="color:blue;"><strong>string</strong></mark><strong> </strong><mark style="color:orange;"><strong>[optional]</strong></mark></td><td>identifier of the address</td></tr><tr><td><strong>one: </strong><mark style="color:blue;"><strong>string</strong></mark><strong> </strong><mark style="color:red;"><strong>[required]</strong></mark></td><td>street address</td></tr><tr><td><strong>two: </strong><mark style="color:blue;"><strong>string</strong></mark><strong> </strong><mark style="color:red;"><strong>[required]</strong></mark></td><td>apt, suite, floor, etc</td></tr><tr><td><strong>city: </strong><mark style="color:blue;"><strong>string</strong></mark><strong> </strong><mark style="color:red;"><strong>[required]</strong></mark></td><td>city</td></tr><tr><td><strong>state: </strong><mark style="color:blue;"><strong>string</strong></mark><strong> </strong><mark style="color:red;"><strong>[required]</strong></mark></td><td>state, you can use either 2 letter code or the full name</td></tr><tr><td><strong>zip: </strong><mark style="color:blue;"><strong>string</strong></mark><strong> </strong><mark style="color:red;"><strong>[required]</strong></mark></td><td>zip code</td></tr><tr><td><strong>country: </strong><mark style="color:blue;"><strong>string</strong></mark><strong> </strong><mark style="color:orange;"><strong>[optional]</strong></mark></td><td>country in which the address is located</td></tr></tbody></table>

#### Coords

<table><thead><tr><th width="241">Attribute</th><th>Description</th></tr></thead><tbody><tr><td><strong>lat: </strong><mark style="color:blue;"><strong>number</strong></mark><strong> </strong><mark style="color:red;"><strong>[required]</strong></mark></td><td>latitude, ex: 40.744860</td></tr><tr><td><strong>long: </strong><mark style="color:blue;"><strong>number</strong></mark><strong> </strong><mark style="color:red;"><strong>[required]</strong></mark></td><td>longitude, ex:  -73.985314</td></tr></tbody></table>

***

### 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. &#x20;

*<mark style="color:purple;">**\*ALL FIELDS REQUIRED FOR ON DEMAND AVAILABILITY\***</mark>*

```json
"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.&#x20;

```json
// 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`

<details>

<summary>Loc Object</summary>

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

</details>
