{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/1password/json-schema/1password-device-patch-schema.json",
  "title": "DevicePatch",
  "description": "Selected device fields to update. Omitted fields are left unchanged; fields set to null are cleared.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/1password-devices-api-openapi.yml#/components/schemas/DevicePatch",
  "type": "object",
  "properties": {
    "status": {
      "type": [
        "string",
        "null"
      ],
      "description": "The device's status, e.g. Deployed"
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "A description of the device"
    },
    "assignedToEmail": {
      "type": [
        "string",
        "null"
      ],
      "description": "Assign the device to a person by email address. Pass null to unassign."
    },
    "locationName": {
      "type": [
        "string",
        "null"
      ],
      "description": "Assign the device to a location by name (a location is found or created). Pass null to clear."
    },
    "serialNumber": {
      "type": [
        "string",
        "null"
      ],
      "description": "The serial number"
    },
    "assetTag": {
      "type": [
        "string",
        "null"
      ],
      "description": "The asset tag"
    },
    "purchaseDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "(ISO format) The purchase date",
      "format": "date-time"
    },
    "disposalDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "(ISO format) The disposal date",
      "format": "date-time"
    },
    "warrantyExpirationDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "(ISO format) The warranty expiration date",
      "format": "date-time"
    },
    "lifespanExpirationDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "(ISO format) The end of the device's useful life",
      "format": "date-time"
    },
    "enrolledDtm": {
      "type": [
        "string",
        "null"
      ],
      "description": "(ISO format) The date the device was enrolled",
      "format": "date-time"
    },
    "netPrice": {
      "type": [
        "number",
        "null"
      ],
      "description": "The net price, in the currency given by netPriceCurrency",
      "format": "double"
    },
    "netPriceCurrency": {
      "type": [
        "string",
        "null"
      ],
      "description": "The ISO currency code for netPrice"
    },
    "notes": {
      "type": [
        "string",
        "null"
      ],
      "description": "Notes about the device"
    },
    "isEncrypted": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether the device's storage is encrypted"
    },
    "platform": {
      "allOf": [
        {
          "$ref": "#/$defs/DevicePlatform"
        }
      ],
      "description": "The device's operating system platform"
    },
    "osVersion": {
      "type": [
        "string",
        "null"
      ],
      "description": "The operating system version"
    },
    "customFields": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {},
      "description": "Custom field values to set, keyed by the field's lookup key"
    },
    "deviceName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The device name"
    },
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The device's SaaS Manager ID",
      "readOnly": true
    },
    "externalId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The device's external ID, sourced from the integration that imported it.",
      "readOnly": true
    },
    "hardwareVendor": {
      "type": [
        "string",
        "null"
      ],
      "description": "The hardware vendor (manufacturer)",
      "readOnly": true
    },
    "modelName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The model name",
      "readOnly": true
    },
    "assetType": {
      "type": [
        "string",
        "null"
      ],
      "description": "The asset type",
      "readOnly": true
    },
    "lastSyncDtm": {
      "type": [
        "string",
        "null"
      ],
      "description": "The timestamp of the device's last sync from an integration.",
      "format": "date-time",
      "readOnly": true
    },
    "createdBy": {
      "allOf": [
        {
          "$ref": "#/$defs/UserInfo"
        }
      ],
      "description": "The user that created the device record",
      "readOnly": true
    },
    "createdDtm": {
      "type": [
        "string",
        "null"
      ],
      "description": "The timestamp for when the device record was created",
      "format": "date-time",
      "readOnly": true
    },
    "lastModifiedBy": {
      "allOf": [
        {
          "$ref": "#/$defs/UserInfo"
        }
      ],
      "description": "The user that last modified the device record",
      "readOnly": true
    },
    "lastModifiedDtm": {
      "type": [
        "string",
        "null"
      ],
      "description": "The timestamp for when the device record was last modified",
      "format": "date-time",
      "readOnly": true
    },
    "location": {
      "allOf": [
        {
          "$ref": "#/$defs/DeviceLocation"
        }
      ],
      "description": "The device's location. To set the location, use locationName.",
      "readOnly": true
    }
  },
  "additionalProperties": false,
  "$defs": {
    "DeviceLocation": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The location's unique ID"
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The location's name"
        },
        "countryCode": {
          "type": [
            "string",
            "null"
          ],
          "description": "The location's ISO country code"
        }
      },
      "additionalProperties": false,
      "description": "A real world location"
    },
    "DevicePlatform": {
      "enum": [
        "Mac",
        "Windows",
        "iOS",
        "Android",
        "ChromeOS",
        "Linux"
      ],
      "type": "string"
    },
    "UserInfo": {
      "type": "object",
      "properties": {
        "userId": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    }
  }
}