{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/chemaxon/json-schema/chemaxon-advanced-auto-register-request-schema.json",
  "title": "AdvancedAutoRegisterRequest",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/chemaxon-compound-registration-openapi.yml#/components/schemas/AdvancedAutoRegisterRequest",
  "type": "object",
  "properties": {
    "source": {
      "type": "string",
      "description": "Source"
    },
    "lotId": {
      "type": "integer",
      "format": "int64",
      "description": "Lot ID"
    },
    "lnbRef": {
      "type": "string",
      "description": "LnbRef"
    },
    "alternativeIdentifierTypeIds": {
      "type": "array",
      "description": "Alternative Identifier Type IDs",
      "items": {
        "type": "integer",
        "format": "int32"
      }
    },
    "structure": {
      "$ref": "#/$defs/RegistryStructure",
      "description": "Structure to be registered"
    },
    "preRegistration": {
      "type": "boolean",
      "description": "Send submission to Staging"
    },
    "drawnStructure": {
      "$ref": "#/$defs/RegistryStructure",
      "description": "Drawn structure"
    },
    "switchers": {
      "type": "object",
      "additionalProperties": {
        "type": "boolean"
      },
      "description": "A map of &lt;SystemSwitcher, Boolean&gt; with non-default values that should be applied during this registration"
    },
    "matchOptions": {
      "$ref": "#/$defs/MatchOptions",
      "description": "Either register as new UNIQUE structure or ACCEPT as an existing one under a specified parent"
    },
    "systemSwitcherWrapper": {
      "$ref": "#/$defs/SystemSwitchersWrapper"
    }
  },
  "required": [
    "lnbRef",
    "matchOptions",
    "source",
    "structure",
    "switchers"
  ],
  "$defs": {
    "AdditionalData": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "value"
      ]
    },
    "MatchOptions": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "enum": [
            "ACCEPT",
            "UNIQUE"
          ]
        },
        "pcn": {
          "type": "string"
        }
      },
      "required": [
        "action"
      ]
    },
    "RegistryComponent": {
      "type": "object",
      "properties": {
        "compId": {
          "type": "string",
          "description": "ID of the component structure if it already exists"
        },
        "molfile": {
          "type": "string",
          "description": "Representation of the compound in any format supported by JChem"
        },
        "helm": {
          "type": "string",
          "description": "Representation of the macromolecule compound in HELM format"
        },
        "range": {
          "type": "string",
          "description": "Component range in case of Mixture structure type"
        },
        "percentage": {
          "type": "number",
          "format": "float",
          "description": "Exact component percentage in case of Formulation structure type"
        },
        "cst": {
          "type": "string",
          "description": "Chemically Significant Text (CST)"
        },
        "structureId": {
          "type": "integer",
          "format": "int64",
          "description": "Structure ID"
        },
        "unknownId": {
          "type": "integer",
          "format": "int32",
          "description": "Unknown ID"
        },
        "creatorId": {
          "type": "string",
          "deprecated": true,
          "description": "The user who started the registration procedure"
        }
      },
      "required": [
        "compId",
        "molfile"
      ]
    },
    "RegistryStructure": {
      "type": "object",
      "properties": {
        "structureMolfile": {
          "type": "string",
          "description": "In the response object it contains the structure to be displayed"
        },
        "source": {
          "type": "string",
          "description": "Source"
        },
        "multiplicity": {
          "type": "integer",
          "format": "int32",
          "description": "Parent multiplicity when a salt or solvate is added"
        },
        "unknownId": {
          "type": "integer",
          "format": "int32",
          "description": "Unknown ID"
        },
        "restricted": {
          "type": "integer",
          "format": "int32",
          "description": "Restriction Level"
        },
        "cst": {
          "type": "string",
          "description": "Chemically Significant Text (CST)"
        },
        "components": {
          "type": "array",
          "description": "In case of a Multi-Component Compound it contains the list of components, otherwise it contains only the single structure",
          "items": {
            "$ref": "#/$defs/RegistryComponent"
          }
        },
        "saltsAndSolvates": {
          "type": "array",
          "description": "Salts and Solvates",
          "items": {
            "$ref": "#/$defs/SaltSolvate"
          }
        },
        "mwt": {
          "type": "number",
          "description": "Molecular Weight (used only in response)"
        },
        "overridedMwt": {
          "type": "number",
          "description": "Specified Molecular Weight"
        },
        "mf": {
          "type": "string",
          "description": "Molecular Formula (used only in response)"
        },
        "structureType": {
          "type": "string",
          "description": "Structure Type",
          "enum": [
            "SINGLE",
            "MIXTURE",
            "FORMULATION",
            "ISOMER",
            "MARKUSH",
            "ALTERNATE",
            "POLYMER",
            "NO_STRUCTURE",
            "PEPTIDE"
          ]
        },
        "uniqueStructureId": {
          "type": "string",
          "description": "A unique identifier of the structure comprised of the structure's internal ID and the Version Fingerprint (used only in response)"
        },
        "additionalData": {
          "type": "array",
          "description": "Additional Data",
          "items": {
            "$ref": "#/$defs/AdditionalData"
          }
        },
        "creatorId": {
          "type": "string",
          "deprecated": true,
          "description": "The user who started the registration procedure."
        },
        "errorStructure": {
          "type": "string"
        },
        "helm": {
          "type": "string",
          "description": "Representation of the macromolecule compound in HELM format",
          "readOnly": true
        }
      },
      "required": [
        "components",
        "multiplicity",
        "source",
        "structureType"
      ]
    },
    "SaltSolvate": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64",
          "description": "Salt ID"
        },
        "multiplicity": {
          "type": "number",
          "format": "double",
          "description": "Salt multiplicity"
        },
        "isSalt": {
          "type": "boolean",
          "description": "True in case of salt, false in case of solvate"
        },
        "name": {
          "type": "string",
          "description": "Salts and Solvates"
        }
      },
      "required": [
        "id",
        "isSalt",
        "multiplicity",
        "name"
      ]
    },
    "SystemSwitchersWrapper": {
      "type": "object",
      "properties": {
        "sysSwitchers": {
          "type": "object",
          "additionalProperties": {
            "type": "boolean"
          }
        }
      }
    }
  }
}