{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://objectsgrid.com/.well-known/objects-catalog/Accommodation/v1/schema.json",
  "title": "Accommodation",
  "description": "Objects Grid Accommodation Object. A place to stay or live: a hotel room, a suite, a holiday apartment, a house for sale or to rent. Its kind is additionalType; its building is containedInPlace; it is offered by Offers (itemOffered) and booked by LodgingReservations (reservationFor), two of which can't hold one Accommodation for overlapping stays. Modeled in compliance with https://schema.org/Accommodation.",
  "type": "object",
  "properties": {
    "at_context": {
      "description": "Schema context",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "https://schema.org"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "at_type": {
      "description": "The object type",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "Accommodation"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "at_id": {
      "description": "This Accommodation'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
    },
    "id": {
      "description": "The unique identifier for Accommodation. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "minLength": 0,
      "maxLength": 50,
      "readOnly": true
    },
    "identifier": {
      "description": "The unique identifier for Accommodation. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "minLength": 0,
      "maxLength": 50,
      "readOnly": true
    },
    "url": {
      "description": "This Accommodation URL. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "minLength": 1,
      "readOnly": true
    },
    "additionalType": {
      "description": "The kind of accommodation, a Schema.org subtype of Accommodation: its JSON-LD @type. None for an Accommodation.",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "Room",
            "HotelRoom",
            "MeetingRoom",
            "Suite",
            "Apartment",
            "CampingPitch",
            "House",
            "SingleFamilyResidence"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "description": "The Accommodation name",
      "type": "array",
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/LanguageTaggedString/v1/schema.json"
      },
      "minItems": 1
    },
    "description": {
      "description": "The Accommodation description",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/LanguageTaggedString/v1/schema.json"
      }
    },
    "image": {
      "description": "Image URLs",
      "type": [
        "array",
        "null"
      ],
      "maxItems": 20,
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "accommodationCategory": {
      "description": "The category, e.g. 'Deluxe double', or a real estate category such as 'Apartment'",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 100
    },
    "occupancy": {
      "description": "How many people it takes: value the most guests, unitCode C62",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/QuantitativeValue/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "bed": {
      "description": "Its beds",
      "type": [
        "array",
        "null"
      ],
      "maxItems": 20,
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/BedDetails/v1/schema.json"
      }
    },
    "floorSize": {
      "description": "The floor area, unitCode MTK (square metres) or FTK (square feet)",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/QuantitativeValue/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "floorLevel": {
      "description": "The floor it is on, e.g. '3', 'Ground'",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 20
    },
    "numberOfRooms": {
      "description": "The number of rooms",
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "numberOfBedrooms": {
      "description": "The number of bedrooms",
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "numberOfBathroomsTotal": {
      "description": "The number of bathrooms",
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0
    },
    "numberOfFullBathrooms": {
      "description": "Full bathrooms: a sink, a toilet and a shower or bath",
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "numberOfPartialBathrooms": {
      "description": "Partial bathrooms: without a shower or bath",
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "yearBuilt": {
      "description": "The year it was built",
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1000,
      "maximum": 3000
    },
    "amenityFeature": {
      "description": "Amenities, e.g. 'Wi-Fi', 'Balcony'",
      "type": [
        "array",
        "null"
      ],
      "maxItems": 100,
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/LocationFeatureSpecification/v1/schema.json"
      }
    },
    "petsAllowed": {
      "description": "Whether pets are allowed",
      "type": [
        "boolean",
        "null"
      ]
    },
    "smokingAllowed": {
      "description": "Whether smoking is allowed",
      "type": [
        "boolean",
        "null"
      ]
    },
    "permittedUsage": {
      "description": "What it may be used for, e.g. 'Residential'",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 200
    },
    "tourBookingPage": {
      "description": "A page where a viewing or tour is booked",
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "address": {
      "description": "Its address, when its building's isn't enough",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/PostalAddress/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "geo": {
      "description": "Its coordinates",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/GeoCoordinates/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "containedInPlace": {
      "description": "The building or site it is in: a Hotel, an ApartmentComplex, a Campground",
      "x-objectsgrid-rangeIncludes": [
        "Place"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "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"
      }
    },
    "meta": {
      "description": "System-managed metadata for the object (version, audit fields). Assigned by the server.",
      "$ref": "https://objectsgrid.com/.well-known/objects-catalog/ObjectMeta/v1/schema.json",
      "readOnly": true
    }
  },
  "required": [
    "name"
  ]
}
