{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alto-vebra/json-schema/alto-vebra-external-partner-appointment-schema.json",
  "title": "ExternalPartnerAppointment",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alto-vebra-appointments-api-openapi.yml#/components/schemas/ExternalPartnerAppointment",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "The unique identifier of the appointment",
      "format": "int64"
    },
    "instanceId": {
      "type": "integer",
      "description": "The numeric instance of an appointment; this value is only greater than zero for general appointment types that are marked as recurring and represents the xth instance of a given appointment in a recurring series.",
      "format": "int32"
    },
    "type": {
      "enum": [
        "Unspecified",
        "General",
        "Valuation",
        "Viewing",
        "Communication",
        "InternalMessage",
        "Offer",
        "AgreedOffer",
        "Note",
        "AuditedChange",
        "StickyNote",
        "FinancialTransaction",
        "Marketing",
        "Creation",
        "SyncedEmail",
        "AccountingTransaction",
        "WorkOrderEvent",
        "TenancyEvent",
        "FollowUp",
        "PersonalInformationRequest",
        "TdsEvent",
        "SigningRequest",
        "MaintenanceRequest",
        "DocumentSharing",
        "ConveyancerReferral"
      ],
      "type": "string",
      "description": "The type of the appointment"
    },
    "startDate": {
      "type": "string",
      "description": "The appointment start date and time, returned as a local (UK) diary time with no timezone offset.",
      "format": "date-time"
    },
    "endDate": {
      "type": "string",
      "description": "The appointment end date and time, returned as a local (UK) diary time with no timezone offset.",
      "format": "date-time"
    },
    "createdDate": {
      "type": "string",
      "description": "The appointment's creation date and time in ISO 8601 format",
      "format": "date-time"
    },
    "modifiedDate": {
      "type": "string",
      "description": "The appointment's last modified date and time in ISO 8601 format",
      "format": "date-time"
    },
    "title": {
      "type": [
        "string",
        "null"
      ],
      "description": "The title of the appointment. For general appointments this refers to the appointment entry type"
    },
    "status": {
      "enum": [
        "Unspecified",
        "NotYetBooked",
        "Active",
        "CancelledByOffice",
        "CancelledByOwner",
        "CancelledByApplicant",
        "CancelledByContact"
      ],
      "type": "string",
      "description": "The status of the appointment"
    },
    "isCancelled": {
      "type": "boolean",
      "description": "Indicates whether the appointment has a cancelled status; An appointment is only cancelled if the appointment status is not set to either Active or NotYetBooked"
    },
    "negotiators": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/ExternalPartnerNegotiator"
      },
      "description": "A collection of negotiators associated with the appointment; if there are no negotiators, then returns an empty collection"
    },
    "properties": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/ExternalPartnerProperty"
      },
      "description": "A collection of properties that are associated with the appointment; if there are no properties, then returns an empty collection"
    },
    "contacts": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/ExternalPartnerContact"
      },
      "description": "A collection of contacts that are associated with the appointment; if there are no contacts, then returns an empty collection"
    },
    "viewingDetails": {
      "$ref": "#/$defs/ExternalPartnerViewingDetails"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "ExternalPartnerContact": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The unique identifier of the contact"
        },
        "links": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Link"
          },
          "description": "Links to related contact."
        }
      },
      "additionalProperties": false
    },
    "ExternalPartnerNegotiator": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The unique identifier of the negotiator"
        },
        "links": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Link"
          },
          "description": "Links to related negotiator;\nNOTE: This is currently set to an empty collection as no api is currently available for retrieving negotiator details"
        }
      },
      "additionalProperties": false
    },
    "ExternalPartnerProperty": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The unique identifier of the property"
        },
        "links": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Link"
          },
          "description": "Links to related property."
        }
      },
      "additionalProperties": false
    },
    "ExternalPartnerViewingDetails": {
      "type": "object",
      "properties": {
        "internalNotes": {
          "type": [
            "string",
            "null"
          ],
          "description": "The internal notes of the appointment."
        },
        "applicantFeedback": {
          "type": [
            "string",
            "null"
          ],
          "description": "The feedback of the appointment."
        }
      },
      "additionalProperties": false
    },
    "Link": {
      "type": "object",
      "properties": {
        "href": {
          "type": [
            "string",
            "null"
          ]
        },
        "rel": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    }
  }
}