{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alto-vebra/json-schema/alto-vebra-alto-inventory-api-models-requests-add-inventory-schema.json",
  "title": "Alto.Inventory.Api.Models.Requests.AddInventory",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alto-vebra-inventory-api-openapi.yml#/components/schemas/Alto.Inventory.Api.Models.Requests.AddInventory",
  "type": "object",
  "properties": {
    "market": {
      "allOf": [
        {
          "$ref": "#/$defs/Alto.Services.SDK.PropertyRecordType"
        }
      ],
      "description": "[Required] The market in which the property is being advertised."
    },
    "address": {
      "allOf": [
        {
          "$ref": "#/$defs/Alto.Services.SDK.Models.Address"
        }
      ],
      "description": "[Required] The address of the property."
    },
    "owners": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Alto.Inventory.Api.Models.Owner"
      },
      "description": "[Required] The owner(s) of the property."
    },
    "negotiatorId": {
      "type": "integer",
      "description": "[Required] The unique identifier of the negotiator with whom the new property will be associated.",
      "format": "int32"
    },
    "branchId": {
      "type": "integer",
      "description": "[Required] The unique identifier of the branch where the negotiator works.",
      "format": "int32"
    },
    "lease": {
      "allOf": [
        {
          "$ref": "#/$defs/Alto.Inventory.Api.Models.Requests.Lease"
        }
      ],
      "description": "The long lease on leasehold property."
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Alto.Inventory.Api.Models.Owner": {
      "type": "object",
      "properties": {
        "contactId": {
          "type": "integer",
          "format": "int32"
        }
      },
      "additionalProperties": false
    },
    "Alto.Inventory.Api.Models.Requests.Lease": {
      "type": "object",
      "properties": {
        "tenure": {
          "allOf": [
            {
              "$ref": "#/$defs/Alto.Services.SDK.PropertyTenureType"
            }
          ],
          "description": "The tenure of the long lease."
        },
        "remainingTerm": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The remaining term in years of the long lease. You must supply either this or and end date.",
          "format": "int32"
        },
        "endDate": {
          "type": [
            "string",
            "null"
          ],
          "description": "The end date of the long lease. You must supply either this or a remaining term.",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    },
    "Alto.Services.SDK.Models.Address": {
      "type": "object",
      "properties": {
        "subDwelling": {
          "type": [
            "string",
            "null"
          ]
        },
        "nameNumber": {
          "type": [
            "string",
            "null"
          ]
        },
        "street": {
          "type": [
            "string",
            "null"
          ]
        },
        "locality": {
          "type": [
            "string",
            "null"
          ]
        },
        "town": {
          "type": [
            "string",
            "null"
          ]
        },
        "county": {
          "type": [
            "string",
            "null"
          ]
        },
        "postcode": {
          "type": [
            "string",
            "null"
          ]
        },
        "countryCode": {
          "type": [
            "string",
            "null"
          ]
        },
        "uprn": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "Alto.Services.SDK.PropertyRecordType": {
      "enum": [
        "Unspecified",
        "Sale",
        "Rent"
      ],
      "type": "string"
    },
    "Alto.Services.SDK.PropertyTenureType": {
      "enum": [
        "Unspecified",
        "Freehold",
        "Leasehold",
        "LeaseholdWithShareOfFreehold",
        "FlyingFreehold",
        "Commonhold",
        "ShareOfFreehold"
      ],
      "type": "string"
    }
  }
}