Mews · Schema

Command

HospitalityHotelsPMSProperty Management

Properties

Name Type Description
Id string Unique identifier of the command.
State object State of the command. Pending (Created in Mews, but not yet received by the client application.) Received (Received by the client application.) Processing (Being processed by the client application.)
CreatedUtc string Creation date and time of the command.
Creator object Creator of the command.
Device object Device that the command should be executed on.
Data object Structure of the object depends on [Device type](https://mews-systems.gitbook.io/connector-api/operations/devices#device-type).
View JSON Schema on GitHub

JSON Schema

mews-devicecommand-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/DeviceCommand",
  "title": "Command",
  "required": [
    "CreatedUtc",
    "Data",
    "Device",
    "Id",
    "State"
  ],
  "type": "object",
  "properties": {
    "Id": {
      "type": "string",
      "description": "Unique identifier of the command.",
      "format": "uuid"
    },
    "State": {
      "title": "Command state",
      "allOf": [
        {
          "$ref": "#/components/schemas/DeviceCommandStateEnum"
        }
      ],
      "description": "State of the command.\n\nPending (Created in Mews, but not yet received by the client application.)\n\nReceived (Received by the client application.)\n\nProcessing (Being processed by the client application.)\n\nProcessed (Successfully processed command.)\n\nCancelled (A command whose execution has been canceled before (or during) processing.)\n\nError (A command whose execution or processing was terminated by an error.)",
      "x-enumNames": [
        "Pending",
        "Received",
        "Processing",
        "Processed",
        "Cancelled",
        "Error"
      ],
      "x-enumDescriptions": [
        "Created in Mews, but not yet received by the client application.",
        "Received by the client application.",
        "Being processed by the client application.",
        "Successfully processed command.",
        "A command whose execution has been canceled before (or during) processing.",
        "A command whose execution or processing was terminated by an error."
      ]
    },
    "CreatedUtc": {
      "minLength": 1,
      "type": "string",
      "description": "Creation date and time of the command.",
      "format": "date-time"
    },
    "Creator": {
      "title": "User",
      "allOf": [
        {
          "$ref": "#/components/schemas/DeviceCommandCreator"
        }
      ],
      "description": "Creator of the command.",
      "nullable": true
    },
    "Device": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Device"
        }
      ],
      "description": "Device that the command should be executed on."
    },
    "Data": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/PaymentTerminalCommandData"
        },
        {
          "$ref": "#/components/schemas/PrinterCommandData"
        },
        {
          "$ref": "#/components/schemas/KeyCutterCommandData"
        },
        {
          "$ref": "#/components/schemas/FiscalMachineCommandData"
        },
        {
          "$ref": "#/components/schemas/PassportScannerCommandData"
        }
      ],
      "description": "Structure of the object depends on [Device type](https://mews-systems.gitbook.io/connector-api/operations/devices#device-type)."
    }
  },
  "additionalProperties": false,
  "x-schema-id": "DeviceCommand"
}