{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://objectsgrid.com/.well-known/objects-catalog/Place/v1/schema.json",
  "title": "Place",
  "description": "Objects Grid Place Object. Modeled in compliance with https://schema.org/Place.",
  "type": "object",
  "properties": {
    "id": {
      "description": "Object unique identifier",
      "type": [
        "string",
        "null"
      ],
      "minLength": 0,
      "maxLength": 50
    },
    "at_context": {
      "description": "Schema context",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "https://schema.org"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "at_type": {
      "description": "The object type",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "Place"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "at_id": {
      "description": "This Place's ObjectsGrid URL, https://apis.objectsgrid.com/<path>/<id>: its JSON-LD @id, which References point to. Set by the service.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "readOnly": true
    },
    "identifier": {
      "description": "The unique identifier for Object",
      "type": [
        "string",
        "null"
      ],
      "minLength": 0,
      "maxLength": 50
    },
    "image": {
      "description": "image URL",
      "type": [
        "string",
        "null"
      ],
      "minLength": 0,
      "format": "uri"
    },
    "name": {
      "description": "The Object Name",
      "type": "array",
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/LanguageTaggedString/v1/schema.json"
      },
      "minItems": 1
    },
    "alternateName": {
      "description": "An alias for the item",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/LanguageTaggedString/v1/schema.json"
      }
    },
    "description": {
      "description": "The Object Description",
      "type": "array",
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/LanguageTaggedString/v1/schema.json"
      }
    },
    "sameAs": {
      "description": "URL of a reference Web page that unambiguously indicates the item's identity",
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "url": {
      "description": "This Object URL",
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "minLength": 1
    },
    "additionalType": {
      "description": "The kind of place: LocalBusiness or a Schema.org subtype of it (Store, Restaurant, Hotel...), a venue (EventVenue, StadiumOrArena, Museum...), a sports facility or a residence (ApartmentComplex): its JSON-LD @type. None for a Place.",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "LocalBusiness",
            "AnimalShelter",
            "AutomotiveBusiness",
            "AutoDealer",
            "AutoRepair",
            "ChildCare",
            "Dentist",
            "DryCleaningOrLaundry",
            "EmergencyService",
            "EmploymentAgency",
            "EntertainmentBusiness",
            "FinancialService",
            "BankOrCreditUnion",
            "FoodEstablishment",
            "Bakery",
            "BarOrPub",
            "Brewery",
            "CafeOrCoffeeShop",
            "Distillery",
            "FastFoodRestaurant",
            "IceCreamShop",
            "Restaurant",
            "Winery",
            "GovernmentOffice",
            "HealthAndBeautyBusiness",
            "BeautySalon",
            "DaySpa",
            "HairSalon",
            "NailSalon",
            "HealthClub",
            "HomeAndConstructionBusiness",
            "InternetCafe",
            "LegalService",
            "Library",
            "LodgingBusiness",
            "BedAndBreakfast",
            "Campground",
            "Hostel",
            "Hotel",
            "Motel",
            "Resort",
            "MedicalBusiness",
            "Pharmacy",
            "Physician",
            "ProfessionalService",
            "RadioStation",
            "RealEstateAgent",
            "RecyclingCenter",
            "SelfStorage",
            "ShoppingCenter",
            "SportsActivityLocation",
            "Store",
            "AutoPartsStore",
            "BikeStore",
            "BookStore",
            "ClothingStore",
            "ComputerStore",
            "ConvenienceStore",
            "DepartmentStore",
            "ElectronicsStore",
            "Florist",
            "FurnitureStore",
            "GardenStore",
            "GroceryStore",
            "HardwareStore",
            "HobbyShop",
            "HomeGoodsStore",
            "JewelryStore",
            "LiquorStore",
            "MensClothingStore",
            "MobilePhoneStore",
            "MovieRentalStore",
            "MusicStore",
            "OfficeEquipmentStore",
            "OutletStore",
            "PawnShop",
            "PetStore",
            "ShoeStore",
            "SportingGoodsStore",
            "TireShop",
            "ToyStore",
            "WholesaleStore",
            "TelevisionStation",
            "TouristInformationCenter",
            "TravelAgency",
            "EventVenue",
            "StadiumOrArena",
            "MusicVenue",
            "PerformingArtsTheater",
            "MovieTheater",
            "NightClub",
            "Museum",
            "ConventionCenter",
            "ExerciseGym",
            "SportsClub",
            "GolfCourse",
            "TennisComplex",
            "PublicSwimmingPool",
            "BowlingAlley",
            "SkiResort",
            "ApartmentComplex",
            "GatedResidenceCommunity",
            "Residence",
            "AutoBodyShop",
            "AutoRental",
            "AutoWash",
            "GasStation",
            "MotorcycleDealer",
            "MotorcycleRepair",
            "VacationRental"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "address": {
      "description": "The physical address of the item.",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/PostalAddress/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "aggregateRating": {
      "description": "The overall rating, based on a collection of reviews or ratings, of the item.",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/AggregateRating/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "additionalProperty": {
      "description": "A property-value pair representing an additional characteristic of the Place.",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/PropertyValue/v1/schema.json"
      }
    },
    "amenityFeature": {
      "description": "An amenity feature (e.g. a characteristic or service) of the Accommodation.",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/LocationFeatureSpecification/v1/schema.json"
      }
    },
    "branchCode": {
      "description": "A short textual code (also called 'store code') that uniquely identifies a place of business.",
      "type": [
        "string",
        "null"
      ]
    },
    "containedInPlace": {
      "description": "The basic containment relation between a place and one that contains it.",
      "x-objectsgrid-rangeIncludes": [
        "Place"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "containsPlace": {
      "description": "The basic containment relation between a place and another that it contains. Computed, read-only: the objects whose Place.containedInPlace points to this object, listed from that type; never stored or written.",
      "x-objectsgrid-inverseOf": "Place.containedInPlace",
      "readOnly": true
    },
    "event": {
      "description": "Upcoming or past events associated with this place or organization.",
      "x-objectsgrid-rangeIncludes": [
        "Event"
      ],
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
      }
    },
    "faxNumber": {
      "description": "The fax number.",
      "type": [
        "string",
        "null"
      ]
    },
    "geo": {
      "description": "The geo coordinates of the place.",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/GeoCoordinates/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "globalLocationNumber": {
      "description": "The global location number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place.",
      "type": [
        "string",
        "null"
      ]
    },
    "hasDriveThroughService": {
      "description": "Indicates whether the place has a drive-through service.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "hasGS1DigitalLink": {
      "description": "Indicates whether the place supports the specified digital link.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "hasMap": {
      "description": "A URL to a map of the place.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "isAccessibleForFree": {
      "description": "A flag to signal that the Place is accessible for free.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "isicV4": {
      "description": "The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place.",
      "type": [
        "string",
        "null"
      ]
    },
    "keywords": {
      "description": "Keywords or tags used to describe this place. Multiple entries in a keywords list are typically delimited by commas.",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "latitude": {
      "description": "The latitude of a location. For example 37.42242 (WGS 84).",
      "type": [
        "number",
        "null"
      ],
      "minimum": -90,
      "maximum": 90
    },
    "logo": {
      "description": "An associated logo.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "longitude": {
      "description": "The longitude of a location. For example -122.08585 (WGS 84).",
      "type": [
        "number",
        "null"
      ],
      "minimum": -180,
      "maximum": 180
    },
    "maximumAttendeeCapacity": {
      "description": "The total number of individuals that may attend an event or venue.",
      "type": [
        "integer",
        "null"
      ]
    },
    "openingHoursSpecification": {
      "description": "The opening hours of a certain place.",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/OpeningHoursSpecification/v1/schema.json"
      }
    },
    "publicAccess": {
      "description": "A flag to signal that the Place is open to public visitors.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "parentOrganization": {
      "description": "LocalBusiness: the Organization the business belongs to, e.g. the chain of a store",
      "x-objectsgrid-rangeIncludes": [
        "Organization"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "hasOfferCatalog": {
      "description": "LocalBusiness: the catalogs of the services or products the business offers",
      "x-objectsgrid-rangeIncludes": [
        "OfferCatalog"
      ],
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
      },
      "maxItems": 20
    },
    "makesOffer": {
      "description": "LocalBusiness: the Offers the business makes. Computed, read-only: the objects whose Offer.offeredBy points to this object, listed from that type; never stored or written.",
      "x-objectsgrid-inverseOf": "Offer.offeredBy",
      "readOnly": true
    },
    "paymentAccepted": {
      "description": "LocalBusiness: the payment methods accepted, e.g. 'Cash, Credit Card'",
      "type": [
        "string",
        "null"
      ]
    },
    "priceRange": {
      "description": "LocalBusiness: the price range, e.g. '$$' or '10-30 EUR'",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 100
    },
    "currenciesAccepted": {
      "description": "LocalBusiness: the currencies accepted, ISO 4217 codes, e.g. 'EUR, USD'",
      "type": [
        "string",
        "null"
      ]
    },
    "review": {
      "description": "A review of the item. Computed, read-only: the objects whose Review.itemReviewed points to this object, listed from that type; never stored or written.",
      "x-objectsgrid-inverseOf": "Review.itemReviewed",
      "readOnly": true
    },
    "slogan": {
      "description": "A slogan or motto associated with the item.",
      "type": "array",
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/LanguageTaggedString/v1/schema.json"
      }
    },
    "smokingAllowed": {
      "description": "Indicates whether smoking is allowed.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "specialOpeningHoursSpecification": {
      "description": "The special opening hours of a certain place.",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/OpeningHoursSpecification/v1/schema.json"
      }
    },
    "telephone": {
      "description": "The telephone number.",
      "type": [
        "string",
        "null"
      ]
    },
    "tourBookingPage": {
      "description": "A page providing information on how to book a tour of some place.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "tags": {
      "description": "Tags an ABAC policy can decide on. A name may repeat; the same name and value appear once. Every stored object has them: created empty when not sent, kept by a replacement (PUT) that does not mention them, unchanged by a patch that does not mention them, cleared by null or [].",
      "type": "array",
      "default": [],
      "uniqueItems": true,
      "maxItems": 50,
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Tag/v1/schema.json"
      }
    },
    "checkinTime": {
      "description": "LodgingBusiness: the check-in time, HH:MM",
      "type": [
        "string",
        "null"
      ],
      "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
    },
    "checkoutTime": {
      "description": "LodgingBusiness: the check-out time, HH:MM",
      "type": [
        "string",
        "null"
      ],
      "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
    },
    "numberOfRooms": {
      "description": "LodgingBusiness: the number of rooms or units",
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "starRating": {
      "description": "LodgingBusiness: its official star rating, a Rating (ratingValue, and its author, the rating body)",
      "x-objectsgrid-rangeIncludes": [
        "Rating"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "petsAllowed": {
      "description": "LodgingBusiness: whether pets are allowed",
      "type": [
        "boolean",
        "null"
      ]
    },
    "availableLanguage": {
      "description": "LodgingBusiness: the languages its staff speak, BCP 47",
      "type": [
        "array",
        "null"
      ],
      "maxItems": 20,
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$"
      }
    },
    "audience": {
      "description": "LodgingBusiness: who it is meant for, e.g. families, business travellers",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Audience/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "hasMenu": {
      "description": "FoodEstablishment: its menus",
      "x-objectsgrid-rangeIncludes": [
        "Menu"
      ],
      "type": [
        "array",
        "null"
      ],
      "maxItems": 20,
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
      }
    },
    "areaServed": {
      "description": "The areas where the business works: a name (text, e.g. 'Berlin'), a GeoCircle (a radius around a point) or a GeoShape, each with its at_type. Stored and returned, not searchable.",
      "type": [
        "array",
        "null"
      ],
      "maxItems": 50,
      "items": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          {
            "$ref": "https://objectsgrid.com/.well-known/objects-catalog/GeoCircle/v1/schema.json"
          },
          {
            "$ref": "https://objectsgrid.com/.well-known/objects-catalog/GeoShape/v1/schema.json"
          }
        ]
      }
    },
    "containsAccommodation": {
      "description": "The Accommodations it contains: a hotel's rooms, a building's apartments. Computed, read-only: the objects whose Accommodation.containedInPlace points to this object, listed from that type; never stored or written. ObjectsGrid's, beyond Schema.org: Schema.org's containsPlace would hold them, but here it lists Places only; left out of JSON-LD documents.",
      "x-objectsgrid-inverseOf": "Accommodation.containedInPlace",
      "readOnly": true,
      "x-objectsgrid-extension": true
    }
  },
  "required": [
    "name"
  ],
  "allOf": [
    {
      "if": {
        "required": [
          "additionalType"
        ],
        "properties": {
          "additionalType": {
            "enum": [
              "LodgingBusiness",
              "BedAndBreakfast",
              "Campground",
              "Hostel",
              "Hotel",
              "Motel",
              "Resort",
              "VacationRental"
            ]
          }
        }
      },
      "else": {
        "not": {
          "anyOf": [
            {
              "required": [
                "checkinTime"
              ]
            },
            {
              "required": [
                "checkoutTime"
              ]
            },
            {
              "required": [
                "numberOfRooms"
              ]
            },
            {
              "required": [
                "starRating"
              ]
            },
            {
              "required": [
                "petsAllowed"
              ]
            },
            {
              "required": [
                "availableLanguage"
              ]
            },
            {
              "required": [
                "audience"
              ]
            }
          ]
        }
      }
    },
    {
      "if": {
        "required": [
          "additionalType"
        ],
        "properties": {
          "additionalType": {
            "enum": [
              "FoodEstablishment",
              "Bakery",
              "BarOrPub",
              "Brewery",
              "CafeOrCoffeeShop",
              "Distillery",
              "FastFoodRestaurant",
              "IceCreamShop",
              "Restaurant",
              "Winery"
            ]
          }
        }
      },
      "else": {
        "not": {
          "anyOf": [
            {
              "required": [
                "hasMenu"
              ]
            }
          ]
        }
      }
    }
  ]
}
