{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/snow-software/json-schema/snow-software-license-request-schema.json",
  "title": "LicenseRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/snow-software-licenses-api-openapi.yml#/components/schemas/LicenseRequest",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "agreementId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The unique ID of the agreement.",
      "format": "guid"
    },
    "applicationId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The unique ID of the application.",
      "format": "guid"
    },
    "autoAllocateOnce": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "```true``` if has auto allocate once selected; otherwise, ```false```."
    },
    "assignmentTypeId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The unique ID of the assignment type.",
      "format": "guid"
    },
    "externalId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The external ID."
    },
    "invoiceReference": {
      "type": [
        "string",
        "null"
      ],
      "description": "The invoice reference."
    },
    "isAutoAllocated": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "```true``` if has auto allocate selected; otherwise, ```false```."
    },
    "isCrossEdition": {
      "type": "boolean",
      "description": "```true``` if is cross-edition; otherwise, ```false```."
    },
    "isCrossPlatform": {
      "type": "boolean",
      "description": "```true``` if is cross-platform; otherwise, ```false```."
    },
    "isDowngrade": {
      "type": "boolean",
      "description": "```true``` if is downgrade; otherwise, ```false```."
    },
    "isSubscription": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "```true``` if is subscription; otherwise, ```false```."
    },
    "isUpgrade": {
      "type": "boolean",
      "description": "```true``` if is upgrade; otherwise, ```false```."
    },
    "quantity": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The quantity.",
      "format": "int32"
    },
    "licenseKeys": {
      "type": [
        "string",
        "null"
      ],
      "description": "The license keys."
    },
    "licenseProofLocation": {
      "type": [
        "string",
        "null"
      ],
      "description": "The license proof location."
    },
    "maintenanceAccordingToAgreement": {
      "type": "boolean",
      "description": "```true``` if has maintenance according to agreement selected; otherwise, ```false```."
    },
    "mediaStorage": {
      "type": [
        "string",
        "null"
      ],
      "description": "The media storage."
    },
    "metricId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The unique ID of the metric.",
      "format": "guid"
    },
    "notes": {
      "type": [
        "string",
        "null"
      ],
      "description": "The notes."
    },
    "organizationId": {
      "type": "string",
      "description": "The unique ID of the organization.",
      "format": "guid"
    },
    "productDescription": {
      "type": [
        "string",
        "null"
      ],
      "description": "The product description."
    },
    "purchaseDate": {
      "type": "string",
      "description": "The purchase date.",
      "format": "date-time"
    },
    "purchaseValue": {
      "type": [
        "number",
        "null"
      ],
      "description": "The purchase value.",
      "format": "decimal"
    },
    "purchaseCurrency": {
      "type": [
        "string",
        "null"
      ],
      "description": "The purchase currency."
    },
    "sku": {
      "type": [
        "string",
        "null"
      ],
      "description": "The stock keeping unit."
    },
    "subscriptionValidFrom": {
      "type": [
        "string",
        "null"
      ],
      "description": "The subscription valid from date.",
      "format": "date-time"
    },
    "subscriptionValidTo": {
      "type": [
        "string",
        "null"
      ],
      "description": "The subscription valid to date.",
      "format": "date-time"
    },
    "vendor": {
      "type": [
        "string",
        "null"
      ],
      "description": "The vendor."
    },
    "upgrades": {
      "type": [
        "array",
        "null"
      ],
      "description": "The license upgrades.",
      "items": {
        "$ref": "#/$defs/LicenseUpgradeRequest"
      }
    },
    "maintenancePeriods": {
      "type": [
        "array",
        "null"
      ],
      "description": "The maintenance and support periods.",
      "items": {
        "$ref": "#/$defs/MaintenancePeriodRequest"
      }
    },
    "computerAssignments": {
      "type": [
        "array",
        "null"
      ],
      "description": "The computer assignments.",
      "items": {
        "$ref": "#/$defs/ComputerAssignmentRequest"
      }
    },
    "datacenterAssignments": {
      "type": [
        "array",
        "null"
      ],
      "description": "The datacenter assignments.",
      "items": {
        "$ref": "#/$defs/DatacenterAssignmentRequest"
      }
    },
    "organizationAssignments": {
      "type": [
        "array",
        "null"
      ],
      "description": "The organization assignments.",
      "items": {
        "$ref": "#/$defs/OrganizationAssignmentRequest"
      }
    },
    "userAssignments": {
      "type": [
        "array",
        "null"
      ],
      "description": "The user assignments.",
      "items": {
        "$ref": "#/$defs/UserAssignmentRequest"
      }
    },
    "siteAssignment": {
      "description": "The site assignment.",
      "oneOf": [
        {
          "$ref": "#/$defs/SiteAssignmentRequest"
        }
      ]
    },
    "hasVmUseRights": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "```true``` if has VM use rights; otherwise, ```false```."
    },
    "numberOfSupportedVirtualMachines": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The number of VM supported by license.",
      "format": "int32"
    }
  },
  "$defs": {
    "ComputerAssignmentRequest": {
      "type": "object",
      "description": "A collection of computer license assignments.",
      "additionalProperties": false,
      "properties": {
        "computerId": {
          "type": "string",
          "description": "The unique ID of the computer.",
          "format": "guid"
        },
        "quantity": {
          "type": "integer",
          "description": "The assigned quantity of licenses.",
          "format": "int32"
        },
        "virtualMachines": {
          "type": [
            "array",
            "null"
          ],
          "description": "The list of virtual machines.",
          "items": {
            "type": "string",
            "format": "guid"
          }
        }
      }
    },
    "DatacenterAssignmentRequest": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "datacenterId": {
          "type": "string",
          "description": "The unique ID of the DCC.",
          "format": "guid"
        },
        "quantity": {
          "type": "integer",
          "description": "The assigned quantity of licenses.",
          "format": "int32"
        },
        "virtualMachines": {
          "type": [
            "array",
            "null"
          ],
          "description": "The list of virtual machines.",
          "items": {
            "type": "string",
            "format": "guid"
          }
        }
      }
    },
    "LicenseUpgradeRequest": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "upgradedLicenseId": {
          "type": "string",
          "description": "The unique ID of the base license.",
          "format": "guid"
        },
        "upgradedQuantity": {
          "type": "integer",
          "description": "The quantity sent from the base license.",
          "format": "int32"
        },
        "quantity": {
          "type": "integer",
          "description": "The quantity received on the upgraded license.",
          "format": "int32"
        }
      }
    },
    "MaintenancePeriodRequest": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "agreementPeriodId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The unique ID of the agreement period.",
          "format": "guid"
        },
        "validFrom": {
          "type": [
            "string",
            "null"
          ],
          "description": "The valid form date.",
          "format": "date-time"
        },
        "validTo": {
          "type": [
            "string",
            "null"
          ],
          "description": "The valid to date.",
          "format": "date-time"
        },
        "hasUpgradeRights": {
          "type": "boolean",
          "description": "```true``` if has upgrade rights; otherwise, ```false```."
        },
        "invoiceReference": {
          "type": [
            "string",
            "null"
          ],
          "description": "The invoice reference."
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "The notes."
        },
        "maintenanceCost": {
          "type": [
            "number",
            "null"
          ],
          "description": "The maintenance cost.",
          "format": "decimal"
        },
        "supportCost": {
          "type": [
            "number",
            "null"
          ],
          "description": "The support cost.",
          "format": "decimal"
        }
      }
    },
    "OrganizationAssignmentRequest": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "organizationId": {
          "type": "string",
          "description": "The unique ID of the organization.",
          "format": "guid"
        },
        "quantity": {
          "type": "integer",
          "description": "The assigned quantity of licenses.",
          "format": "int32"
        }
      }
    },
    "SiteAssignmentRequest": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "organizationId": {
          "type": "string",
          "description": "The unique ID of the organization.",
          "format": "guid"
        }
      }
    },
    "UserAssignmentRequest": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "userId": {
          "type": "string",
          "description": "The unique ID of the user.",
          "format": "guid"
        }
      }
    }
  }
}