# com.actuallynearme.listing

> A business location: who it is, where it is and when it is open. The record key is the location ID, a TID made once when the location is created and never changed. One business account holds one of these per location.

- Kind: record
- Record key: tid
- Authority: actuallynearme.com
- Lexicon: 1
- Published by [actuallynearme-lex.bsky.social](https://lexicon.garden/identity/did:plc:ueupetp46c3gzq5x5zqnd5uu), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:ueupetp46c3gzq5x5zqnd5uu/com.actuallynearme.listing)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:ueupetp46c3gzq5x5zqnd5uu/com.actuallynearme.listing/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:ueupetp46c3gzq5x5zqnd5uu/com.actuallynearme.listing/analytics)

## Record (`com.actuallynearme.listing`)

Type: record · key tid

### Properties

- `addresses` (array, required): Places where the business operates, at least one.
  - Constraints: minLength: 1, maxLength: 5
  - `items` (ref)
    - Reference: `#typedAddress`
- `byAppointment` (boolean): True if the business operates by appointment only.
- `categories` (array): Free-text category labels, at most five. When absent, readers use the same field of the organization record (key `self`) in the same repository.
  - Constraints: maxLength: 5
  - `items` (string)
    - Constraints: maxLength: 640, maxGraphemes: 64
- `createdAt` (string · datetime, required): When this listing was first created.
- `description` (string): Short description of what the business offers. When absent, readers use the same field of the organization record (key `self`) in the same repository.
  - Constraints: maxLength: 10000, maxGraphemes: 1000
- `email` (string): Public contact email address.
  - Constraints: maxLength: 320
- `externalIds` (array): Identifiers of this business in other directories.
  - Constraints: maxLength: 10
  - `items` (ref)
    - Reference: `#externalId`
- `hours` (array): Regular weekly opening ranges.
  - Constraints: maxLength: 21
  - `items` (ref)
    - Reference: `com.actuallynearme.hours#openRange`
- `links` (array): Other public links, such as menus or social profiles.
  - Constraints: maxLength: 10
  - `items` (ref)
    - Reference: `#link`
- `movedFrom` (string · at-uri): AT URI of the listing this one was copied from, set when a location moves to another account.
- `name` (string, required): Public name of this location. It may be the same as the organization's name.
  - Constraints: maxLength: 1000, maxGraphemes: 100
- `phone` (string): Public phone number.
  - Constraints: maxLength: 64
- `specialHours` (array): Exceptions to the regular hours for specific dates.
  - Constraints: maxLength: 60
  - `items` (ref)
    - Reference: `com.actuallynearme.hours#specialDay`
- `timezone` (string, required): IANA time zone name used to interpret hours, for example America/Chicago.
  - Constraints: maxLength: 64
- `updatedAt` (string · datetime, required): When this listing was last changed.
- `website` (string · uri): Business website. When absent, readers use the same field of the organization record (key `self`) in the same repository.

## #externalId (`com.actuallynearme.listing#externalId`)

Type: object

An identifier in another directory.

### Properties

- `source` (string, required): Which directory the identifier comes from.
  - Constraints: maxLength: 64, knownValues: osm | fsq | google
- `value` (string, required): The identifier within that directory.
  - Constraints: maxLength: 256

## #link (`com.actuallynearme.listing#link`)

Type: object

A labelled public link.

### Properties

- `label` (string, required): Text shown for the link.
  - Constraints: maxLength: 400, maxGraphemes: 40
- `uri` (string · uri, required): Link target.

## #typedAddress (`com.actuallynearme.listing#typedAddress`)

Type: object

An address together with its role for the business.

### Properties

- `address` (ref, required): The postal address.
  - Reference: `community.lexicon.location.address`
- `geo` (ref): Latitude and longitude (coordinates are strings).
  - Reference: `community.lexicon.location.geo`
- `hthree` (ref): H3 hexagonal cell index of the location.
  - Reference: `community.lexicon.location.hthree`
- `role` (string, required): Role of this address for the business.
  - Constraints: maxLength: 64, knownValues: business-location | headquarters | mailing

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "externalId": {
      "description": "An identifier in another directory.",
      "properties": {
        "source": {
          "description": "Which directory the identifier comes from.",
          "knownValues": [
            "osm",
            "fsq",
            "google"
          ],
          "maxLength": 64,
          "type": "string"
        },
        "value": {
          "description": "The identifier within that directory.",
          "maxLength": 256,
          "type": "string"
        }
      },
      "required": [
        "source",
        "value"
      ],
      "type": "object"
    },
    "link": {
      "description": "A labelled public link.",
      "properties": {
        "label": {
          "description": "Text shown for the link.",
          "maxGraphemes": 40,
          "maxLength": 400,
          "type": "string"
        },
        "uri": {
          "description": "Link target.",
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "label",
        "uri"
      ],
      "type": "object"
    },
    "main": {
      "description": "A business location: who it is, where it is and when it is open. The record key is the location ID, a TID made once when the location is created and never changed. One business account holds one of these per location.",
      "key": "tid",
      "record": {
        "properties": {
          "addresses": {
            "description": "Places where the business operates, at least one.",
            "items": {
              "ref": "#typedAddress",
              "type": "ref"
            },
            "maxLength": 5,
            "minLength": 1,
            "type": "array"
          },
          "byAppointment": {
            "description": "True if the business operates by appointment only.",
            "type": "boolean"
          },
          "categories": {
            "description": "Free-text category labels, at most five. When absent, readers use the same field of the organization record (key `self`) in the same repository.",
            "items": {
              "maxGraphemes": 64,
              "maxLength": 640,
              "type": "string"
            },
            "maxLength": 5,
            "type": "array"
          },
          "createdAt": {
            "description": "When this listing was first created.",
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "description": "Short description of what the business offers. When absent, readers use the same field of the organization record (key `self`) in the same repository.",
            "maxGraphemes": 1000,
            "maxLength": 10000,
            "type": "string"
          },
          "email": {
            "description": "Public contact email address.",
            "maxLength": 320,
            "type": "string"
          },
          "externalIds": {
            "description": "Identifiers of this business in other directories.",
            "items": {
              "ref": "#externalId",
              "type": "ref"
            },
            "maxLength": 10,
            "type": "array"
          },
          "hours": {
            "description": "Regular weekly opening ranges.",
            "items": {
              "ref": "com.actuallynearme.hours#openRange",
              "type": "ref"
            },
            "maxLength": 21,
            "type": "array"
          },
          "links": {
            "description": "Other public links, such as menus or social profiles.",
            "items": {
              "ref": "#link",
              "type": "ref"
            },
            "maxLength": 10,
            "type": "array"
          },
          "movedFrom": {
            "description": "AT URI of the listing this one was copied from, set when a location moves to another account.",
            "format": "at-uri",
            "type": "string"
          },
          "name": {
            "description": "Public name of this location. It may be the same as the organization's name.",
            "maxGraphemes": 100,
            "maxLength": 1000,
            "type": "string"
          },
          "phone": {
            "description": "Public phone number.",
            "maxLength": 64,
            "type": "string"
          },
          "specialHours": {
            "description": "Exceptions to the regular hours for specific dates.",
            "items": {
              "ref": "com.actuallynearme.hours#specialDay",
              "type": "ref"
            },
            "maxLength": 60,
            "type": "array"
          },
          "timezone": {
            "description": "IANA time zone name used to interpret hours, for example America/Chicago.",
            "maxLength": 64,
            "type": "string"
          },
          "updatedAt": {
            "description": "When this listing was last changed.",
            "format": "datetime",
            "type": "string"
          },
          "website": {
            "description": "Business website. When absent, readers use the same field of the organization record (key `self`) in the same repository.",
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "name",
          "addresses",
          "timezone",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "typedAddress": {
      "description": "An address together with its role for the business.",
      "properties": {
        "address": {
          "description": "The postal address.",
          "ref": "community.lexicon.location.address",
          "type": "ref"
        },
        "geo": {
          "description": "Latitude and longitude (coordinates are strings).",
          "ref": "community.lexicon.location.geo",
          "type": "ref"
        },
        "hthree": {
          "description": "H3 hexagonal cell index of the location.",
          "ref": "community.lexicon.location.hthree",
          "type": "ref"
        },
        "role": {
          "description": "Role of this address for the business.",
          "knownValues": [
            "business-location",
            "headquarters",
            "mailing"
          ],
          "maxLength": 64,
          "type": "string"
        }
      },
      "required": [
        "role",
        "address"
      ],
      "type": "object"
    }
  },
  "id": "com.actuallynearme.listing",
  "lexicon": 1
}
```
