Person =================== .. py:function:: model.AddBackgroundCheck(peopleId, code, submitType, type, label, sSSN, sDLN, sPlusCounty, sPlusState, sPackageName) :param int peopleId: The person's ID :param str code: The background check package code :param str submitType: The submission type (default: "PII") :param int type: The background check type (default: 1) :param int label: The background check label (default: 0) :param str sSSN: Optional social security number :param str sDLN: Optional driver's license number :param str sPlusCounty: Optional county for county-level checks :param str sPlusState: Optional state for state-level checks :param str sPackageName: Optional package name :return: The ID of the created background check :rtype: int Creates and submits a background check for a person. .. py:function:: model.AddPerson(firstname, nickname, lastname, email, marital, gender, familymemberid) :param str firstname: The person's first name :param str nickname: The person's nickname :param str lastname: The person's last name :param str email: The person's email address :param int marital: The marital status ID (default: 0) :param int gender: The gender ID (default: 0) :param int familymemberid: Optional family member ID :return: The ID of the newly created person :rtype: int Creates a new person record in the database. .. py:function:: model.AddRole(query, role) :param str query: see :doc:`QueryParameter` :param str role: The name of the role to be added to the persons in the query. If a user does not exist, the user will be created. The user will have to use forgot password to be emailed a link to set their password. The role itself must exist, prior to calling this method. The following roles will not be allowed: admin, manageapplication, backgroundcheck, creditcheck, delete, developer, finance, financeadmin, manager, manager2, membership, managetransactions, memberdocs, .. py:function:: model.AddTag(query, tagName, ownerId, clear) :param str query: see :doc:`QueryParameter` :param str tagName: the name of the tag. :param str ownerId: the PeopleId for the owner of the tag. :param bool clear: if ``True`` and the tag already exists, it will first be cleared of previous content; default is ``False``. The tag will be added to if it already exists. .. py:function:: model.AgeInMonths(birthdate, asof) :param date birthdate: The birthdate. :param date asof: The as of date. This will return the age in months given the two dates. Fractional months are not considered. .. py:function:: model.ArchiveRecords(query) :param str query: see :doc:`QueryParameter` Sets the ArchivedFlag to true for all people in the query. .. py:function:: model.ClearTag(tagName, ownerId) :param str tagName: the name of the tag. :param str ownerId: the PeopleId for the owner of the tag. Removes the content of the tag. .. py:function:: model.DeletePeople(query) :param str query: see :doc:`QueryParameter` Permanently deletes all people in the query. This function is restricted to users with the developer role. .. py:function:: model.FindAddPeopleId(first, last, dob, email, phone, firstLastMatch) :param str first: First name :param str last: Last name :param str dob: Date of birth :param str email: Email address :param str phone: Phone number :param bool firstLastMatch: If true, requires exact first and last name match (default: False) :return: The ID of the person that was found or created :rtype: int Finds a person matching the provided information or creates a new person if no match is found. Returns the person's ID. .. py:function:: model.FindAddPerson(first, last, dob, email, phone, firstLastMatch) :param str first: First name :param str last: Last name :param str dob: Date of birth :param str email: Email address :param str phone: Phone number :param bool firstLastMatch: If true, requires exact first and last name match (default: False) :return: The person object that was found or created :rtype: Person Finds a person matching the provided information or creates a new person if no match is found. .. py:function:: model.FindPersonId(first, last, dob, email, phone) :param str first: First name :param str last: Last name :param str dob: Date of birth :param str email: Email address :param str phone: Phone number :return: The ID of the matching person, or null if no match is found :rtype: int or None Finds a person matching the provided information and returns their ID, or null if no match is found. .. py:function:: model.FindPersonId(fullName, dob, email, phone) :param str fullName: Full name (will be split into first and last) :param str dob: Date of birth :param str email: Email address :param str phone: Phone number :return: The ID of the matching person, or null if no match is found :rtype: int or None Finds a person matching the provided information and returns their ID, or null if no match is found. This overload accepts a full name instead of separate first and last names. .. py:function:: model.FindPersonIdExtraValue(extraKey, extraValue) :param str extraKey: The extra value field name :param str extraValue: The extra value to search for :return: The ID of the matching person, or null if no match is found :rtype: int or None Finds a person with a matching extra value and returns their ID, or null if no match is found. .. py:function:: model.FindPersonIdExtraValueInt(extraKey, extraValue) :param str extraKey: The extra value field name :param int extraValue: The integer extra value to search for :return: The ID of the matching person, or null if no match is found :rtype: int or None Finds a person with a matching integer extra value and returns their ID, or null if no match is found. .. py:function:: model.GetAuthenticatedUrl(person, url, shorten) :param Person person: The person object :param str url: The URL to authenticate :param bool shorten: Whether to shorten the URL (default: True) :return: An authenticated URL that will automatically log in the specified person :rtype: str Creates an authenticated URL that will automatically log in the specified person. .. py:function:: model.GetAuthenticatedUrl(peopleId, url, shorten) :param int peopleId: The person's ID :param str url: The URL to authenticate :param bool shorten: Whether to shorten the URL (default: True) :return: An authenticated URL that will automatically log in the specified person :rtype: str Creates an authenticated URL that will automatically log in the specified person. .. py:function:: model.GetPerson(pid) :param int pid: The person's ID :return: The person object :rtype: APIPerson.Person Retrieves a person by their ID. .. py:function:: model.GetPerson(peopleId) :param int peopleId: The person's ID :return: The person object :rtype: Person Retrieves a person by their ID. This overload returns a different person object type than the other GetPerson method. .. py:function:: model.GetSpouse(pid) :param int pid: The person's ID :return: The spouse's person object, or null if the person has no spouse :rtype: APIPerson.Person Retrieves a person's spouse by the person's ID. .. py:function:: model.PeopleIds(query) :return: a list of PeopleIds from a query :rtype: an enumerable list of int :param str query: See :doc:`QueryParameter` Example:: pids = model.PeopleIds("") for pid in pids: p = model.GetPerson(pid) print p.Name .. py:function:: model.RemoveRole(query, role) :param str query: see :doc:`QueryParameter` :param str role: The name of the role to be removed from the persons in the query. .. py:function:: model.UnArchiveRecords(query) :param str query: see :doc:`QueryParameter` Sets the ArchivedFlag to false for all people in the query. .. py:function:: model.UpdateAllSpouseId() Updates the SpouseId field for all people in the database. This function is restricted to users with the developer role. .. py:function:: model.UpdateCampus(query, campus) :param str query: see :doc:`QueryParameter` :param int,str campus: The CampusId or the campus name (use exact spelling to match an existing campus) .. py:function:: model.UpdateContributionOption(query, option) :param str query: see :doc:`QueryParameter` :param int,str option: The Id of the option or the full name of the option as indicated in the table below This determines what type of statement a person wants, Joint with spouse, or Individual, or None. .. py:function:: model.UpdateElectronicStatement(query, truefalse) :param str query: see :doc:`QueryParameter` :param bool truefalse: True for wants statements via secure web-site access only. False if wants printed statements. .. py:function:: model.UpdateEnvelopeOption(query, option) :param str query: see :doc:`QueryParameter` :param int,str option: The Id of the option or the full name of the option as indicated in the table below This determines whether the person wants envelopes: either Joint with spouse, or Individual, or None. .. py:function:: model.UpdateField(p, field, value) :param Person p: The person object :param str field: The name of the field to update :param object value: The new value Updates a specific field for a person. If the field is "homephone", it updates the family record instead of the person record. .. py:function:: model.UpdateMemberStatus(query, status) :param str query: see :doc:`QueryParameter` :param int,str status: The MemberStatusId or the member status description (use exact spelling to match existing status) .. py:function:: model.UpdateNamedField(query, field, value) :param str query: see :doc:`QueryParameter` :param str field: The name of the field to update. See :doc:`../ObjectTables/PeopleTable` :param int,str campus: The CampusId or the campus name (use exact spelling to match an existing campus) .. py:function:: model.UpdateNewMemberClassDate(query, date) :param str query: see :doc:`QueryParameter` :param str,date date: The date value .. py:function:: model.UpdateNewMemberClassDateIfNullForLastAttended(query, orgid) :param str query: see :doc:`QueryParameter` :param str orgid: The OrganizationId for the last attend meeting This will find the most recent attended date for each person in the specified Organization and update the person's NewMemberClassDate with that date. .. py:function:: model.UpdateNewMemberClassStatus(query, status) :param str query: see :doc:`QueryParameter` :param int,str status: The NewMemberClassStatusId or the new member class status description (use exact spelling to match existing status) .. py:function:: model.UpdatePerson(peopleId, data) :param int peopleId: The person's ID :param object data: Dictionary-like object containing field names and values to update Updates multiple fields for a person at once. Family fields (homephone, addresslineone, addresslinetwo, cityname, statecode, zipcode, countryname) update the family record instead of the person record. Statement/Envelope Options -------------------------- == ============= Id Option == ============= 0 Not Specified 1 Individual 2 Joint 9 None == ============= | | +--------------------+------------------+ | **Latest Update** | **3/28/2025** | +--------------------+------------------+ Added documentation for missing functions in PythonModel.Person.cs and reorganized all functions in alphabetical order.