{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/hint-health/main/json-schema/hint-health-membership-patient-sanitizer-schema.json",
  "title": "MembershipPatientSanitizer",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hint-health-membershipmember-api-openapi.yml#/components/schemas/MembershipPatientSanitizer",
  "type": "object",
  "properties": {
    "patient": {
      "$ref": "#/$defs/MembershipPatientSanitizer.PatientSanitizer"
    },
    "start_date": {
      "type": "string",
      "format": "date",
      "description": "Defaults to Membership start date if not given. Sponsored memberships must start on the 1st of the month. Retail memberships may start any day. Date must be formatted as YYYY-MM-DD."
    },
    "member_type": {
      "type": "string",
      "description": "Choose one below. You can think of \"spouse\" as \"adult\". This is a naming issue that will hopefully be addressed in the future. Note: \"employee\" is not an accepted value as you cannot add employees to existing memberships.",
      "enum": [
        "child",
        "spouse"
      ]
    },
    "fixed_period_rate_in_cents": {
      "type": "integer",
      "format": "int32",
      "description": "Use this to override the standard rates that the membership plan would generate"
    }
  },
  "required": [
    "patient",
    "member_type"
  ],
  "$defs": {
    "MembershipPatientSanitizer.PatientSanitizer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "uses_tobacco": {
          "type": "boolean"
        }
      },
      "required": [
        "id"
      ]
    }
  }
}