Mews · Schema

Resource

HospitalityHotelsPMSProperty Management

Properties

Name Type Description
Id string Unique identifier of the resource.
EnterpriseId string Unique identifier of the `Enterprise`.
IsActive boolean Whether the resource is still active.
ParentResourceId string Identifier of the parent `Resource` (e.g. room of a bed).
Name string Name of the resource (e.g. room number).
State object
Descriptions object All translations of the description.
CreatedUtc string Creation date and time of the resource in UTC timezone in ISO 8601 format.
UpdatedUtc string Last update date and time of the resource in UTC timezone in ISO 8601 format.
Data object Additional data of the resource.
ExternalNames object All translations of external name.
Directions object All translations of direction.
View JSON Schema on GitHub

JSON Schema

mews-resource-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Resource",
  "title": "Resource",
  "required": [
    "CreatedUtc",
    "Data",
    "Descriptions",
    "Directions",
    "EnterpriseId",
    "ExternalNames",
    "Id",
    "IsActive",
    "Name",
    "State",
    "UpdatedUtc"
  ],
  "type": "object",
  "properties": {
    "Id": {
      "type": "string",
      "description": "Unique identifier of the resource.",
      "format": "uuid"
    },
    "EnterpriseId": {
      "type": "string",
      "description": "Unique identifier of the `Enterprise`.",
      "format": "uuid"
    },
    "IsActive": {
      "type": "boolean",
      "description": "Whether the resource is still active."
    },
    "ParentResourceId": {
      "type": "string",
      "description": "Identifier of the parent `Resource` (e.g. room of a bed).",
      "format": "uuid",
      "nullable": true
    },
    "Name": {
      "minLength": 1,
      "type": "string",
      "description": "Name of the resource (e.g. room number)."
    },
    "State": {
      "$ref": "#/components/schemas/ResourceState"
    },
    "Descriptions": {
      "title": "Localized text",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "All translations of the description.",
      "x-schema-id": "LocalizedStrings"
    },
    "CreatedUtc": {
      "minLength": 1,
      "type": "string",
      "description": "Creation date and time of the resource in UTC timezone in ISO 8601 format."
    },
    "UpdatedUtc": {
      "minLength": 1,
      "type": "string",
      "description": "Last update date and time of the resource in UTC timezone in ISO 8601 format."
    },
    "Data": {
      "title": "Resource data",
      "type": "object",
      "properties": {
        "Discriminator": {
          "$ref": "#/components/schemas/ResourceDataDiscriminator"
        },
        "Value": {
          "oneOf": [
            {
              "$ref": "#/components/schemas/SpaceData"
            },
            {
              "title": "Object resource data",
              "type": "object",
              "additionalProperties": false
            },
            {
              "title": "Person resource data",
              "type": "object",
              "additionalProperties": false
            }
          ],
          "description": "Based on `Discriminator`. Currently present only for `Space` resources with [Space resource data](https://mews-systems.gitbook.io/connector-api/operations/resources#space-resource-data)."
        }
      },
      "description": "Additional data of the resource.",
      "x-coproduct": true,
      "x-schema-id": "ResourceDataCoproductOfResourceDataDiscriminator"
    },
    "ExternalNames": {
      "title": "Localized text",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "All translations of external name.",
      "x-schema-id": "LocalizedStrings"
    },
    "Directions": {
      "title": "Localized text",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "All translations of direction.",
      "x-schema-id": "LocalizedStrings"
    }
  },
  "additionalProperties": false,
  "x-schema-id": "Resource"
}