{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alto-vebra/json-schema/alto-vebra-alto-contacts-api-models-responses-contact-schema.json",
  "title": "Alto.Contacts.Api.Models.Responses.Contact",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alto-vebra-contacts-api-openapi.yml#/components/schemas/Alto.Contacts.Api.Models.Responses.Contact",
  "type": "object",
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The unique identifier for the resource."
    },
    "links": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Alto.Api.Material.Hateoas.Link"
      },
      "description": "Links to related entities."
    },
    "address": {
      "allOf": [
        {
          "$ref": "#/$defs/Alto.Services.SDK.Models.Address"
        }
      ]
    },
    "branch": {
      "allOf": [
        {
          "$ref": "#/$defs/Alto.Contacts.Core.Models.Domain.Branch"
        }
      ]
    },
    "people": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Alto.Contacts.Api.Models.Responses.Person"
      }
    },
    "category": {
      "enum": [
        "Unknown",
        "Client",
        "Solicitor",
        "BuildingSociety",
        "Bank",
        "Publication",
        "EstateAgent",
        "ManagingAgent",
        "Developer",
        "Builder",
        "Utility",
        "Service",
        "PreviousClient",
        "Miscellaneous",
        "FinancialAdvisor",
        "Maintenance",
        "OnSiteSales",
        "ExternalPrinter",
        "OtherCategory1",
        "EstateAgentLocal",
        "Surveyor",
        "Supplier",
        "Accountant"
      ],
      "type": "string"
    },
    "lead": {
      "allOf": [
        {
          "$ref": "#/$defs/Alto.Contacts.Api.Models.Responses.Lead"
        }
      ],
      "description": "This contact originated from a lead (enquiry)"
    },
    "position": {
      "allOf": [
        {
          "$ref": "#/$defs/Alto.Contacts.Api.Models.Responses.ParameterValue"
        }
      ],
      "description": "The position of the contact, defined as the Id for this AgencyRef chosen from /parameters/client-positions"
    },
    "intention": {
      "allOf": [
        {
          "$ref": "#/$defs/Alto.Contacts.Api.Models.Responses.ParameterValue"
        }
      ],
      "description": "The intention of the contact, defined as the Id for this AgencyRef chosen from /parameters/client-intentions"
    },
    "disposal": {
      "allOf": [
        {
          "$ref": "#/$defs/Alto.Contacts.Api.Models.Responses.ParameterValue"
        }
      ],
      "description": "The disposal of the contact, defined as the Id for this AgencyRef chosen from /parameters/client-disposal-status"
    },
    "notes": {
      "type": [
        "string",
        "null"
      ],
      "description": "The notes for the contact"
    },
    "archived": {
      "type": "boolean",
      "description": "The archived status of the contact."
    },
    "companyName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The company name associated with the contact."
    },
    "potentialVendor": {
      "type": "boolean",
      "description": "Indicates whether the contact has been flagged as a potential vendor."
    },
    "potentialLandlord": {
      "type": "boolean",
      "description": "Indicates whether the contact has been flagged as a potential landlord."
    },
    "applicantRequirements": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Alto.Contacts.Api.Models.Responses.ApplicantRequirement"
      }
    },
    "modifiedDate": {
      "type": "string",
      "description": "When the contact was last modified.",
      "format": "date-time"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Alto.Api.Material.Hateoas.Link": {
      "type": "object",
      "properties": {
        "href": {
          "type": [
            "string",
            "null"
          ]
        },
        "rel": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "Alto.Contacts.Api.Models.Responses.ApplicantRequirement": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The unique identifier for the resource."
        },
        "links": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Alto.Api.Material.Hateoas.Link"
          },
          "description": "Links to related entities."
        },
        "profileIntention": {
          "type": [
            "string",
            "null"
          ]
        },
        "isNewBuild": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "priceFrom": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        },
        "priceTo": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        },
        "bedsMin": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        },
        "isActiveProfile": {
          "type": "boolean"
        },
        "rentalIntention": {
          "allOf": [
            {
              "$ref": "#/$defs/Alto.Contacts.Api.Models.Responses.RentalIntention"
            }
          ]
        },
        "tenureType": {
          "enum": [
            "Unspecified",
            "Freehold",
            "Leasehold",
            "LeaseholdWithShareOfFreehold",
            "FlyingFreehold",
            "Commonhold",
            "ShareOfFreehold"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "notes": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "Alto.Contacts.Api.Models.Responses.EmailAddress": {
      "type": "object",
      "properties": {
        "preferenceOrder": {
          "type": "integer",
          "description": "The numerical order in which email addresses are to be selected.",
          "format": "int32"
        },
        "type": {
          "enum": [
            "Unknown",
            "Personal",
            "Business"
          ],
          "type": "string",
          "description": "The type of email address."
        },
        "address": {
          "type": [
            "string",
            "null"
          ],
          "description": "The email address."
        }
      },
      "additionalProperties": false
    },
    "Alto.Contacts.Api.Models.Responses.Lead": {
      "type": "object",
      "properties": {
        "source": {
          "allOf": [
            {
              "$ref": "#/$defs/Alto.Contacts.Api.Models.Responses.ParameterValue"
            }
          ]
        },
        "id": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        }
      },
      "additionalProperties": false
    },
    "Alto.Contacts.Api.Models.Responses.ParameterValue": {
      "type": "object",
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "Alto.Contacts.Api.Models.Responses.Person": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The unique identifier for the resource."
        },
        "links": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Alto.Api.Material.Hateoas.Link"
          },
          "description": "Links to related entities."
        },
        "title": {
          "type": [
            "string",
            "null"
          ],
          "description": "The formal title of the Person."
        },
        "forename": {
          "type": [
            "string",
            "null"
          ],
          "description": "The first or given name of the Person."
        },
        "surname": {
          "type": [
            "string",
            "null"
          ],
          "description": "The surname of the Person."
        },
        "phoneNumbers": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Alto.Contacts.Api.Models.Responses.Phone"
          }
        },
        "emailAddresses": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Alto.Contacts.Api.Models.Responses.EmailAddress"
          }
        }
      },
      "additionalProperties": false
    },
    "Alto.Contacts.Api.Models.Responses.Phone": {
      "type": "object",
      "properties": {
        "preferenceOrder": {
          "type": "integer",
          "description": "The numerical order in which phone numbers are to be selected.",
          "format": "int32"
        },
        "type": {
          "enum": [
            "Unspecified",
            "Home",
            "Business",
            "Mobile",
            "Fax",
            "Work",
            "ISDN"
          ],
          "type": "string",
          "description": "The type of phone number."
        },
        "number": {
          "type": [
            "string",
            "null"
          ],
          "description": "The telephone number for the Contact."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "The description of the phone number"
        }
      },
      "additionalProperties": false
    },
    "Alto.Contacts.Api.Models.Responses.RentalIntention": {
      "type": "object",
      "properties": {
        "priceQualifier": {
          "enum": [
            "Unknown",
            "Weekly",
            "Monthly",
            "Quarterly",
            "Yearly",
            "AdHoc",
            "Daily",
            "Fortnightly",
            "FourWeekly",
            "MonthlyOnLastDay",
            "QuarterlyOnQuarterDays",
            "HalfYearly",
            "HalfYearlyOnQuarterDays"
          ],
          "type": "string"
        },
        "furnishing": {
          "enum": [
            "Unspecified",
            "Unfurnished",
            "PartFurnished",
            "Furnished",
            "FurnishedOrUnfurnished"
          ],
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "Alto.Contacts.Core.Models.Domain.Branch": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "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
    }
  }
}