{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/marsello/main/json-schema/marsello-device-create-model-schema.json",
  "title": "DeviceCreateModel",
  "description": "Create a device record including details of where this app is running",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/marsello-loyalty-api-v1.json#/components/schemas/DeviceCreateModel",
  "type": "object",
  "properties": {
    "deviceId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Unique Id for the device (ideally hardware based)"
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Name of the device"
    },
    "systemName": {
      "type": [
        "string",
        "null"
      ],
      "description": "System installed"
    },
    "systemVersion": {
      "type": [
        "string",
        "null"
      ],
      "description": "Version installed"
    },
    "model": {
      "type": [
        "string",
        "null"
      ],
      "description": "Model of the device"
    },
    "latitude": {
      "type": [
        "number",
        "null"
      ],
      "description": "Device latitude",
      "format": "double"
    },
    "longitude": {
      "type": [
        "number",
        "null"
      ],
      "description": "Device longitude",
      "format": "double"
    },
    "appVersion": {
      "type": [
        "string",
        "null"
      ],
      "description": "Version of our app installed"
    },
    "avgResponseTime": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The average response time of the app against our API",
      "format": "int32"
    },
    "installFailing": {
      "type": "boolean",
      "description": "Flag to indicate if the install is failing"
    },
    "packageName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The name of the app on the device"
    },
    "keyboard": {
      "type": [
        "string",
        "null"
      ],
      "description": "The type of keyboard installed"
    },
    "responseTime": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Average response time the device is experiencing",
      "format": "int32"
    }
  },
  "additionalProperties": false
}