Skip to main content
query GetReferral($id: ReferralGID!) {
  referral(id: $id) {
    createdAt
    id
    status
    type
    updatedAt
    contacts {
      email
      firstName
      id
      isPrimary
      lastName
      phoneNumber
    }
    customAttributes {
      id
      key
      type
      value
    }
    primaryContact {
      email
      firstName
      id
      isPrimary
      lastName
      phoneNumber
    }
    ... on PurchasePropertyClosingReferral {
      propertyAddress {
        city
        country
        latitude
        longitude
        mapImageUrl
        postalCode
        province
        shortTitle
        street
        title
        unitNumber
      }
      purchaseAmount {
        amount
        currencyCode
      }
    }
    ... on RefinanceReferral {
      mortgageAmount {
        amount
        currencyCode
      }
      propertyAddress {
        city
        country
        latitude
        longitude
        mapImageUrl
        postalCode
        province
        shortTitle
        street
        title
        unitNumber
      }
    }
    ... on SalePropertyClosingReferral {
      propertyAddress {
        city
        country
        latitude
        longitude
        mapImageUrl
        postalCode
        province
        shortTitle
        street
        title
        unitNumber
      }
    }
  }
}
{
  "data": {
    "referral": {
      "createdAt": "2025-01-15T10:30:00Z",
      "id": "gid://ownright/Object/1",
      "status": "CONVERTED",
      "type": "PURCHASE_PROPERTY_CLOSING",
      "updatedAt": "2025-01-15T10:30:00Z",
      "contacts": [
        {
          "email": "[email protected]",
          "firstName": "Jane",
          "id": "gid://ownright/Object/1",
          "isPrimary": true,
          "lastName": "Doe",
          "phoneNumber": "+14165551234"
        }
      ],
      "customAttributes": [
        {
          "id": "gid://ownright/Object/1",
          "key": "example-key",
          "type": "BOOLEAN",
          "value": "example-value"
        }
      ],
      "primaryContact": {
        "email": "[email protected]",
        "firstName": "Jane",
        "id": "gid://ownright/Object/1",
        "isPrimary": true,
        "lastName": "Doe",
        "phoneNumber": "+14165551234"
      },
      "propertyAddress": {
        "city": "Toronto",
        "country": "CANADA",
        "latitude": 1,
        "longitude": 1,
        "mapImageUrl": "https://example.com",
        "postalCode": "M5V 1A1",
        "province": "ALBERTA",
        "shortTitle": "123 Main St, Toronto",
        "street": "123 Main St",
        "title": "123 Main St, Toronto",
        "unitNumber": "Suite 100"
      },
      "purchaseAmount": {
        "amount": "100.00",
        "currencyCode": "CAD"
      },
      "mortgageAmount": {
        "amount": "100.00",
        "currencyCode": "CAD"
      }
    }
  }
}

Query field

referral

Arguments

id
ReferralGID!
required
The identifier of the referral to find.

Return fields

referral
Referral
Returns a referral.

Types

enum CustomAttributeType {
  BOOLEAN # A boolean value ("true" or "false").
  COLOR # A hex color code starting with # (e.g., "#FF0000" or "#F00").
  DATE # A date in ISO8601 format (YYYY-MM-DD, e.g., "2024-03-19").
  DATE_TIME # A datetime in ISO8601 format with timezone (YYYY-MM-DDThh:mm:ssZ, e.g., "2024-03-19T12:00:00Z").
  EMAIL # A valid email address (e.g., "[email protected]").
  FLOAT # A decimal number value (e.g., "3.14").
  INTEGER # A whole number value (e.g., "42").
  JSON # A valid JSON value of any type.
  MONEY # A money value as a JSON object with amount and currency code (e.g., {"amount": "10.99", "currency_code": "CAD"}).
  PHONE_NUMBER # A valid E.164 phone number (e.g., "+1234567890").
  STRING # A simple text value.
  URL # A valid HTTP or HTTPS URL (e.g., "https://example.com").
}

enum ReferralStatus {
  CONVERTED # Given to referrals that have been converted to a matter.
  OPEN # Given to referrals that are currently open.
  RETIRED # Given to referrals that are no longer being pursued.
}

enum ReferralType {
  PURCHASE_PROPERTY_CLOSING # Represents a referral for a purchase property closing.
  REFINANCE # Represents a referral for a refinance.
  SALE_PROPERTY_CLOSING # Represents a referral for a sale property closing.
  STATUS_CERTIFICATE_REVIEW # Represents a referral for a status certificate review.
}

scalar GID # A global identifier for an object in the format of 'gid://ownright/ObjectType/ID'.
scalar ISO8601DateTime # An ISO 8601-encoded datetime
scalar ReferralGID # A global identifier for a Referral object in format of 'gid://ownright/Referral/ID'.