{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "title": "Classic Disabled Referral Webhook Schema",
  "description": "Sent whenever a referral event happens and the classic program is disabled",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "title": "Referral Id",
      "description": "The unique referral identifier"
    },
    "referrer": {
      "title": "Referrer User",
      "description": "The referrer user in who initiated this referral",
      "$schema": "http://json-schema.org/draft-06/schema#",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "title": "User Id",
          "description": "This user's unique identifier"
        },
        "accountId": {
          "type": "string",
          "title": "Account Id",
          "description": "The unique identifier of the account this user belongs to"
        }
      },
      "required": [
        "id",
        "accountId"
      ],
      "additionalProperties": false
    },
    "referred": {
      "title": "Referred User",
      "description": "The referred user who initiated this referral",
      "$ref": "#/properties/referrer"
    },
    "referralCodeUsed": {
      "type": "string",
      "title": "Referral Code Used",
      "description": "The referrers code that was used by the referred for the referral"
    },
    "shareLinkUsed": {
      "type": "string",
      "title": "Share Link Used",
      "description": "The sharelink that was used by the referred for the referral"
    },
    "dateReferralStarted": {
      "type": "integer",
      "title": "Date Referral Started",
      "description": "The date this referral was created"
    },
    "dateConverted": {
      "type": [
        "integer",
        "null"
      ],
      "title": "Date Referral Converted",
      "description": "The date the referral converted"
    },
    "dateModified": {
      "type": [
        "integer",
        "null"
      ],
      "title": "Date Referral Modified",
      "description": "The date this referral was last modified for any reason (e.g. converted, reward added, etc.)"
    },
    "dateUserModified": {
      "type": [
        "integer",
        "null"
      ],
      "title": "Date User Modified",
      "description": "The date a user was added to or removed from the referral (e.g. removed as a result of user deletion)"
    },
    "programId": {
      "type": [
        "string",
        "null"
      ],
      "title": "Program Id",
      "description": "The Id of the program this code was created for"
    }
  },
  "required": [
    "id",
    "referrer",
    "referred",
    "dateReferralStarted"
  ],
  "additionalProperties": false
}