{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nmi/json-schema/nmi-prompt-request-status-response-schema.json",
  "title": "Prompt Request Status Response",
  "description": "Prompt request status response matching the structure returned by GET /api/v5/devices/{deviceId}/prompt/{type}/{reference}",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nmi-devices-api-openapi.yml#/components/schemas/PromptRequestStatusResponse",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "enum": [
        "request"
      ],
      "description": "Resource type identifier"
    },
    "id": {
      "type": "string",
      "description": "Prompt request ID (reference)"
    },
    "status": {
      "type": "string",
      "enum": [
        "in_progress",
        "completed",
        "cancelled",
        "cancelledAtTerminal",
        "cancelledByApi",
        "cancelledByTimeout",
        "poiDeviceInUse",
        "poiDeviceDisconnected",
        "terminatedBadCardRead"
      ],
      "description": "Status of the prompt request"
    },
    "result": {
      "type": "string",
      "description": "The result of the prompt (e.g., 'yes', 'no', or selected menu option). Only present when status is 'completed'."
    },
    "signature": {
      "type": "string",
      "description": "Base64-encoded signature image. Only present for sign prompts when status is 'completed'."
    },
    "signature_format": {
      "type": "string",
      "description": "Format of the signature image (e.g., 'png'). Only present for sign prompts when status is 'completed'."
    }
  },
  "required": [
    "object",
    "id",
    "status"
  ]
}