{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rethink-behavioral-health/json-schema/rethink-behavioral-health-update-appointment-request-model-schema.json",
  "title": "UpdateAppointmentRequestModel",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rethink-behavioral-health-openapi.json#/components/schemas/UpdateAppointmentRequestModel",
  "required": [
    "appointmentId",
    "appointmentTypeId",
    "scheduledEndDateTime",
    "scheduledStartDateTime",
    "staffId"
  ],
  "type": "object",
  "properties": {
    "appointmentId": {
      "type": "integer",
      "description": "primary key",
      "format": "int32"
    },
    "appointmentTypeId": {
      "$ref": "#/$defs/AppointmentTypes"
    },
    "scheduledStartDateTime": {
      "type": "string",
      "description": "scheduled start time - UTC datetime",
      "format": "date-time"
    },
    "scheduledEndDateTime": {
      "type": "string",
      "description": "scheduled end time - UTC datetime",
      "format": "date-time"
    },
    "staffId": {
      "type": "integer",
      "description": "staff ID",
      "format": "int32"
    },
    "clientId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "client ID",
      "format": "int32"
    },
    "payCodeId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "hcStaffPaycodes (hcStaffMemberPayroll.hcStaffPaycodeId)",
      "format": "int32"
    },
    "tagId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "hcAppointmentCustomTags (hcAppointments.ActivityTagId)",
      "format": "int32"
    },
    "locationCodeId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "hcLocationCodes (hcAppointments.LocationId)",
      "format": "int32"
    },
    "locationId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "hcProviderLocation (hcAppointments.ToLocationId)",
      "format": "int32"
    },
    "scheduledLocationAddress": {
      "type": [
        "string",
        "null"
      ],
      "description": "single line address"
    },
    "authorizationBillingCodeId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "hcChildProfileAuthorizationBillingCode (hcAppointments.ProcedureCodeId)",
      "format": "int32"
    },
    "funderBillingCodeId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "hcProviderBillingCode (hcChildProfileAuthorizationBillingCode.hcProviderBillingCodeId)",
      "format": "int32"
    },
    "cancellationTypeId": {
      "$ref": "#/$defs/AppointmentCancellationTypes"
    },
    "cancellationSubtypeId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "hcAppointmentCustomTags (hcAppointments.CancellationTagId), hcAppointmentCustomTagTypeId 1=Cancellation",
      "format": "int32"
    },
    "actualStartDateTime": {
      "type": [
        "string",
        "null"
      ],
      "description": "actual start time - UTC datetime"
    },
    "actualEndDateTime": {
      "type": [
        "string",
        "null"
      ],
      "description": "actual end time - UTC datetime"
    },
    "staffVerificationDateTime": {
      "type": [
        "string",
        "null"
      ],
      "description": "staff verification timestamp (UTC)"
    },
    "parentVerificationDateTime": {
      "type": [
        "string",
        "null"
      ],
      "description": "parent verification timestamp (UTC)"
    },
    "appointmentStatusId": {
      "$ref": "#/$defs/AppointmentStatusTypes"
    },
    "sessionNoteStatusId": {
      "$ref": "#/$defs/SessionNoteStatusType"
    },
    "scheduledLocation": {
      "$ref": "#/$defs/UpdateAppointmentLocationModel"
    },
    "actualStartLocation": {
      "$ref": "#/$defs/UpdateAppointmentLocationModel"
    },
    "actualEndLocation": {
      "$ref": "#/$defs/UpdateAppointmentLocationModel"
    },
    "parentSignature": {
      "type": [
        "string",
        "null"
      ],
      "description": "parent signature - base64 encoded image"
    },
    "billingCodeCredentialId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "hcProviderBillingCodeCredentials",
      "format": "int32"
    },
    "overrideFunderServiceLimits": {
      "type": "boolean",
      "description": "When true, persist despite Funder Service Limit Blocks if the staff member's role has\r\nOverride Funder Service Limits. Default false. Does not bypass authorization or other failures."
    },
    "travelDetail": {
      "$ref": "#/$defs/TravelDetail"
    },
    "notes": {
      "type": [
        "string",
        "null"
      ],
      "description": "notes"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "AppointmentCancellationTypes": {
      "enum": [
        0,
        1,
        2,
        3
      ],
      "type": "integer",
      "format": "int32"
    },
    "AppointmentStatusTypes": {
      "enum": [
        1,
        2,
        3,
        4,
        5,
        6
      ],
      "type": "integer",
      "format": "int32"
    },
    "AppointmentTypes": {
      "enum": [
        1,
        2,
        3
      ],
      "type": "integer",
      "format": "int32"
    },
    "SessionNoteStatusType": {
      "enum": [
        1,
        2
      ],
      "type": "integer",
      "format": "int32"
    },
    "TravelDetail": {
      "type": "object",
      "properties": {
        "mileage": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        }
      },
      "additionalProperties": false
    },
    "UpdateAppointmentLocationModel": {
      "type": "object",
      "properties": {
        "latitude": {
          "type": [
            "number",
            "null"
          ],
          "description": "latitude",
          "format": "double"
        },
        "longitude": {
          "type": [
            "number",
            "null"
          ],
          "description": "longitude",
          "format": "double"
        }
      },
      "additionalProperties": false
    }
  }
}