Trax Platform APIv1

Portal configuration, content and memberships

Configuration

GET /config returns the organization profile, branding (palette names and logo URLs), feature switches and money settings. The values merge the portal's own settings over the client's and the global defaults, as today's portal does.

Portal configuration

GET https://api.nfocus.solutions/v1/portals/riverbend/north/config → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/north/config'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/config');
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/config");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();
Field Notes
branding.palette Material palette names (green, indigo, …) and the contrast mode
branding.logos Absolute URLs, or null when the organization has no file
features activities, memberships, donations, parentPortalOnly, paymentPlans, newDashboard
capabilities Every capability key with whether it is on at this portal ("website.blog": true, …): the capability switchboard and legacy configuration together. features keeps legacy's own values. A capability that is off answers 404 capability-off where the website reads it (see Organization site, "Capabilities")
money Convenience fee (cents + percent) and payment display switches

Content

GET /content/{key} returns the organization's own HTML for a page area, sanitized: scripts, event handlers and unsafe links are removed before it leaves the API.

Key Content
dashboard, welcome, welcome-signed-in Home page areas
activities, memberships, search Home page tiles
privacy, terms Privacy policy and terms of use (organization's own, or the default)
homepage, checkout-header, donation-header, registration-header Page headers
receipt-header-enrollment, receipt-header-donation, receipt-footer, donate-greeting Receipts and donations

The privacy policy

GET https://api.nfocus.solutions/v1/portals/riverbend/north/content/privacy → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/north/content/privacy'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/content/privacy');
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/content/privacy");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Images

GET /assets/{key} serves logo-main, logo-small, logo-menu, favicon, activities-image, memberships-image and background. Activity images are at the imageUrl given in catalog responses.

Other portals in the organization

GET /organizations lists the portals in the same organization hierarchy, for a site switcher.

Portals in the organization

GET https://api.nfocus.solutions/v1/portals/riverbend/north/organizations → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/north/organizations'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/organizations');
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/organizations");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Memberships

GET /memberships lists the membership types offered online, with their duration (static: a fixed calendar window; dynamic: a length from the start date), fee and canPurchase. Buying one is in the Memberships guide.

Memberships offered online

GET https://api.nfocus.solutions/v1/portals/riverbend/south/memberships → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/south/memberships'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/south/memberships');
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/south/memberships");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();