Household and eligibility
A signed-in family sees and maintains its household, and asks who may register for what. Every call here needs the
family's access token (see Authentication and keys). The household always comes from the sign-in: nothing in a
request names a household, and a person or document id that isn't in the caller's own household is answered
404, the same as an id that doesn't exist.
The household
The signed-in family's household
GET https://api.nfocus.solutions/v1/portals/riverbend/north/household → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/north/household' \
-H 'Authorization: Bearer your_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/household', {
headers: {
'Authorization': 'Bearer your_access_token',
},
});
const data = await response.json();C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/portals/riverbend/north/household");
request.Headers.Authorization = new("Bearer", "your_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();accountHolderis the signed-in person, with their primary email, phone and address.signInEmailis the login.memberslists everyone in the household, the account holder first, then by birth date. Each member has their latest school year, school and grade at this organization, their memberships here (active,upcoming,expired) and how many saved documents this organization may show.verifiedistrueonce the family has submitted the organization's household information form. Registering needs it (rule 8 below). The form itself comes with dynamic forms; until then, families submit it in the current portal.
Adding and changing members
POST …/household/members adds a member; PUT …/household/members/{personId} changes one (the account holder
too). The body is the same for both:
{
"firstName": "Robin",
"lastName": "Rivera",
"birthDate": "2018-03-14",
"genderId": 3,
"schoolYearId": 1,
"schoolId": 2,
"gradeLevelId": 4
}
- First and last names are trimmed and must be 2–50 characters. The birth date can't be in the future or before
1900. The gender, school year, school and grade must be ids from
P/lookups. - School year, school and grade go together. Send all three or none; on a change, leaving all three out keeps the school details already recorded.
- Someone with the same first and last name, gender and birth date (ignoring case) already in the household answers
409 member-exists. Two quick submits of the same member add it once. - A member with answers waiting in the checkout forms step can't be changed here (
409 member-in-checkout): checkout would save the waiting answers over the change. Check out, or remove the member's lines from the cart, first. - A new member joins the household's account, so their charges show on the same statement.
Field errors come back as 400 with an errors object:
A new member without the required details
POST https://api.nfocus.solutions/v1/portals/riverbend/north/household/members → 400, problem details
curl
curl -s -X POST 'https://api.nfocus.solutions/v1/portals/riverbend/north/household/members' \
-H 'Authorization: Bearer your_access_token' \
-H 'Content-Type: application/json' \
-d '{"firstName": "Robin", "lastName": "", "birthDate": "2018-03-14", "schoolYearId": 1 }'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/household/members', {
method: 'POST',
headers: {
'Authorization': 'Bearer your_access_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({"firstName": "Robin", "lastName": "", "birthDate": "2018-03-14", "schoolYearId": 1 }),
});
const data = await response.json();C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.nfocus.solutions/v1/portals/riverbend/north/household/members");
request.Headers.Authorization = new("Bearer", "your_access_token");
request.Content = new StringContent("""
{"firstName": "Robin", "lastName": "", "birthDate": "2018-03-14", "schoolYearId": 1 }
""", System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();Lists for forms
Lists for household forms
GET https://api.nfocus.solutions/v1/portals/riverbend/north/lookups → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/north/lookups'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/lookups');
const data = await response.json();C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/portals/riverbend/north/lookups");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();Genders, relationship types, states and provinces, schools, school years, grade levels, and address, phone and email types, as the organization (and the organizations above it) defines them. Public and cacheable for five minutes.
Saved documents
A member's saved documents
GET https://api.nfocus.solutions/v1/portals/riverbend/north/household/members/1234/documents → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/north/household/members/1234/documents' \
-H 'Authorization: Bearer your_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/household/members/1234/documents', {
headers: {
'Authorization': 'Bearer your_access_token',
},
});
const data = await response.json();C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/portals/riverbend/north/household/members/1234/documents");
request.Headers.Authorization = new("Bearer", "your_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();A member's documents that this organization may see (organizations decide which documents they share with each
other). Each has a url that downloads the file with the same family token; downloads are never cached.
Registrations
The household's current registrations
GET https://api.nfocus.solutions/v1/portals/riverbend/north/registrations?status=current → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/north/registrations?status=current' \
-H 'Authorization: Bearer your_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/registrations?status=current', {
headers: {
'Authorization': 'Bearer your_access_token',
},
});
const data = await response.json();C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/portals/riverbend/north/registrations?status=current");
request.Headers.Authorization = new("Bearer", "your_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();activities lists registrations in every status: enrolled, waitListed, cancelled, noShow, dropped,
completed, didNotFinish, approved and attended, each with a statusLabel to show. memberships lists
memberships as active, upcoming or expired. Both cover this organization and the organizations below it.
status=current keeps what ends today or later, in the organization's calendar; status=past keeps what has ended.
Each activity also has its meeting days ("Mon", "Tue" and so on), startTime and endTime, as the catalog shows
them, for a family's weekly schedule.
There is no waitlist position. Organizations choose whom to move off a waitlist, and Trax keeps no order to count from.
Who may register
Who in the household may register for an activity
GET https://api.nfocus.solutions/v1/portals/riverbend/north/activities/3/eligibility → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/north/activities/3/eligibility' \
-H 'Authorization: Bearer your_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/activities/3/eligibility', {
headers: {
'Authorization': 'Bearer your_access_token',
},
});
const data = await response.json();C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/portals/riverbend/north/activities/3/eligibility");
request.Headers.Authorization = new("Bearer", "your_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();For one activity, every household member gets eligible, a registration of enroll or waitlist (how they would
be registered), and the problems that stop them, in this order:
| Rule | Code | Meaning |
|---|---|---|
| 1 | not-published |
The activity isn't open for registration at this portal (the single-activity call answers 404 activity-not-found) |
| 2 | registration-not-open, registration-closed, activity-ended |
Outside the registration dates, in the organization's calendar; both end dates count |
| 3 | already-registered |
The member has any registration for the activity already, in any status; to register again, the family contacts the organization |
| 4 | gender, grade, too-young, too-old, birth-date-range, birth-date-missing |
The member's gender, grade this school year at this organization, or age on the activity's first day. Both age limits are inclusive |
| 5 | membership-required (with membershipTypes) |
The member needs one of these memberships covering the activity's dates (back-to-back memberships count together, and so do memberships in the cart). canBuy says which can be bought online (Memberships guide) |
| 6 | parent-required, parent-full (with parent) |
An option of a parent activity needs the member registered for the parent, or the parent in the same check; a full parent blocks its options |
| 7 | full |
No seats and no waitlist |
| 8 | household-not-verified |
The household form hasn't been saved yet (Household and participant forms guide). Portals without a household form skip this rule |
| 9 | balance-due (with amountCents) |
The account has a past-due balance and this activity requires none; paying it or a payment plan lifts it |
Messages are plain language and safe to show. The same rules run again when an item is added to the cart and at checkout, so a page can never register someone the server would refuse.
Several at once
Check activity and member pairs together
POST https://api.nfocus.solutions/v1/portals/riverbend/north/eligibility → 200 OK, JSON
curl
curl -s -X POST 'https://api.nfocus.solutions/v1/portals/riverbend/north/eligibility' \
-H 'Authorization: Bearer your_access_token' \
-H 'Content-Type: application/json' \
-d '{"items": [{"activityId": 3, "personId": 1234 }, {"activityId": 2, "personId": 1234 }]}'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/eligibility', {
method: 'POST',
headers: {
'Authorization': 'Bearer your_access_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({"items": [{"activityId": 3, "personId": 1234 }, {"activityId": 2, "personId": 1234 }]}),
});
const data = await response.json();C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.nfocus.solutions/v1/portals/riverbend/north/eligibility");
request.Headers.Authorization = new("Bearer", "your_access_token");
request.Content = new StringContent("""
{"items": [{"activityId": 3, "personId": 1234 }, {"activityId": 2, "personId": 1234 }]}
""", System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();Up to 50 activity and member pairs in one call. A parent activity in the same call counts for its options, so a family can choose a parent and its options together.
Activities that fit a member
Activities that fit a household member
GET https://api.nfocus.solutions/v1/portals/riverbend/north/activities?member=1234&pageSize=5 → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/north/activities?member=1234&pageSize=5' \
-H 'Authorization: Bearer your_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/activities?member=1234&pageSize=5', {
headers: {
'Authorization': 'Bearer your_access_token',
},
});
const data = await response.json();C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/portals/riverbend/north/activities?member=1234&pageSize=5");
request.Headers.Authorization = new("Bearer", "your_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();The catalog's member filter (household person ids, comma-separated) keeps listings with a session that fits one of
those members by gender, grade and age (rule 4). It needs the family's access token; answers are personal and never
cached.