{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Response Message for 'terminalDetails'",
  "description": "Provides details of the requested terminal. The details include information about a terminal's currency and its current status.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "jsonrpc",
    "id",
    "result"
  ],
  "properties": {
    "jsonrpc": {
      "title": "JSON-RPC Version Number",
      "description": "Identifies the JSON Remote Protocol version that this message uses.",
      "type": "string",
      "enum": [
        "2.0"
      ],
      "default": "2.0"
    },
    "id": {
      "title": "JSON-RPC2 Message ID",
      "description": "The same message id as the request JSON message this is a reply to, so that this response can be matched to the correct request.",
      "type": "integer",
      "maximum": 999999,
      "minimum": 0
    },
    "result": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "tid",
          "currency",
          "status"
        ],
        "properties": {
          "tid": {
            "title": "Terminal Public Identifier (TPI)",
            "description": "The identifier for a terminal.",
            "type": "string",
            "default": "N/A"
          },
          "currency": {
            "title": "Currency Code",
            "description": "The currency this terminal or request is using. If being used to set the currency code of a response message then it must be the same currency as the associated request message. The textual representation from ISO 4217 is used.",
            "type": "string",
            "enum": [
              "GBP",
              "EUR"
            ]
          },
          "status": {
            "title": "Terminal Status",
            "description": "The current status of a terminal. 'AVAILABLE' means the terminal is currently able to accept a request. 'BUSY' means the terminal is currently processing a request and so is unable to accept a new request.",
            "type": "string",
            "enum": [
              "AVAILABLE",
              "BUSY"
            ]
          }
        }
      }
    }
  }
}