Skip to contents

Connection & Authentication

Connect to a SELMA instance.

selma_connect()
Connect to the SELMA API
selma_disconnect()
Disconnect from the SELMA API
selma_get_connection()
Get the active SELMA connection

Core Data Fetching

Fetch the main SELMA entities. Most accept optional filter parameters.

selma_students()
Fetch student records from SELMA
selma_enrolments()
Fetch enrolment records from SELMA
selma_intakes()
Fetch intake definitions from SELMA
selma_components()
Fetch enrolment components from SELMA
selma_programmes()
Fetch programme definitions from SELMA
selma_intake_enrolments()
Fetch intake enrolments with nested components
selma_get()
Fetch data from a SELMA API endpoint
selma_get_one()
Fetch a single record from a SELMA API endpoint

Notes, Contacts & Addresses

Student notes, external contacts, and address records.

selma_notes()
Fetch notes and events from SELMA
selma_contacts()
Fetch external contacts from SELMA
selma_student_contacts()
Fetch student-contact links from SELMA
selma_student_relations()
Fetch student relationships from SELMA
selma_student_org_contacts()
Fetch student-organisation-contact links from SELMA
selma_addresses()
Fetch addresses from SELMA

Classes & Campuses

Timetable classes, campus locations, and class assignments.

selma_classes()
Fetch class definitions from SELMA
selma_class_enrolments()
Fetch class enrolment links from SELMA
selma_student_classes()
Fetch student class assignments from SELMA
selma_campuses()
Fetch campus locations from SELMA

Organisations & Users

Employer/agent organisations and system users.

selma_organisations()
Fetch organisations from SELMA
selma_users()
Fetch system users from SELMA

Awards, Grades & Fees

Qualifications, assessment attempts, grading, and fee schedules.

selma_enrolment_awards()
Fetch enrolment awards from SELMA
selma_component_attempts()
Fetch component assessment attempts from SELMA
selma_component_definitions()
Fetch component definitions from SELMA
selma_grading_schemes()
Fetch grading schemes from SELMA
selma_intake_fees()
Fetch intake fee schedules from SELMA
selma_fees_free()
Fetch fees-free eligibility codes from SELMA

Custom Fields

Custom field definitions and per-record custom field values.

selma_custom_fields()
Fetch custom field definitions from SELMA
selma_student_custom_fields()
Fetch custom field values for a student
selma_enrolment_custom_fields()
Fetch custom field values for an enrolment
selma_component_custom_fields()
Fetch custom field values for all components in an enrolment

Programme & Enrolment Views

Alternative views of student programmes and enrolments.

selma_student_programmes()
Fetch student programme records from SELMA
selma_enrolments_by_campus()
Fetch enrolments by campus from SELMA
selma_marketing_sources()
Fetch marketing sources from SELMA
selma_milestones()
Fetch a single milestone from SELMA

Joins & Pipelines

Convenience functions for common entity joins.

selma_student_pipeline()
Build a complete student enrolment pipeline
selma_component_pipeline()
Build a full component pipeline
selma_join_students()
Join enrolments with student details
selma_join_intakes()
Join enrolments with intake details
selma_join_components()
Join components to enrolments
selma_join_programmes()
Join intakes to programme details
selma_join_notes()
Join notes to students
selma_join_addresses()
Join addresses to students
selma_join_classes()
Join classes to campuses
selma_join_attempts()
Join component attempts to enrolment components

Utilities

Date parsing, phone normalisation, and URL builders.

parse_selma_date()
Parse SELMA date strings
standardize_phone()
Standardise a phone number to E.164 international format
standardize_phones()
Vectorised phone standardisation
selma_student_url()
Build a SELMA student URL
selma_enrolment_url()
Build a SELMA enrolment URL

EFTS Reporting

Pro-rata EFTS calculation for NZ TEOs.

selma_efts_report()
Generate EFTS funding report

Reference / Lookup Tables

Fetch code tables and reference data from SELMA.

selma_ethnicities()
Fetch ethnicity codes from SELMA
selma_countries()
Fetch country codes from SELMA
selma_genders()
Fetch gender codes from SELMA
selma_titles()
Fetch title codes from SELMA
selma_disabilities()
Fetch disability codes from SELMA
selma_disability_accesses()
Fetch disability access codes from SELMA
selma_visa_types()
Fetch visa type codes from SELMA
selma_nz_iwis()
Fetch NZ iwi codes from SELMA
selma_nz_residential_statuses()
Fetch NZ residential status codes from SELMA
selma_nz_disability_statuses()
Fetch NZ disability status codes from SELMA
selma_nz_disability_support_needs()
Fetch NZ disability support needs codes from SELMA
selma_secondary_schools()
Fetch secondary school codes from SELMA
selma_secondary_quals()
Fetch secondary qualification codes from SELMA
selma_previous_activities()
Fetch previous activity codes from SELMA
selma_student_statuses()
Fetch student status codes from SELMA
selma_contact_types()
Fetch contact types from SELMA
selma_contact_statuses()
Fetch contact statuses from SELMA
selma_org_types()
Fetch organisation types from SELMA
selma_address_types()
Fetch address types from SELMA
selma_enr_status_codes()
Fetch enrolment status codes from SELMA
selma_withdrawal_reason_codes() selma_withdrawal_codes()
Fetch withdrawal reason codes from SELMA
selma_withdrawal_status_codes()
Fetch withdrawal status codes from SELMA
selma_wish_to_studies()
Fetch wish-to-study codes from SELMA

MCP Server

Ask Claude about your SELMA data via the Model Context Protocol. See vignette("mcp-examples") for usage walkthroughs.

selma_mcp mcp
MCP Server — Ask Claude About Your SELMA Data

Constants

Status codes, funded status groups, and funding source codes.