Trax Platform APIv1

nFocus admin

The nFocus admin app is where nFocus support runs the platform for every client. Its endpoints are under /v1/admin.

Access

Every call needs an access token from Trax Keycloak for the admin app (audience trax-admin), with an admin realm role:

Role Can
trax-support Everything
trax-support-agent Read; changes answer 403 admin-write-required

The admin audit trail

GET https://api.nfocus.solutions/v1/admin/audit?pageSize=5 → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/admin/audit?pageSize=5' \
  -H 'Authorization: Bearer your_admin_app_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/audit?pageSize=5', {
  headers: {
    'Authorization': 'Bearer your_admin_app_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/admin/audit?pageSize=5");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

The trail filters by actor (Keycloak subject or email), siteId, databaseId, and from and to (UTC dates). It records who, when, the route, the answer's status and the ids the call was about, never request bodies.

Onboarding a portal's website

POST /v1/admin/sites gives a portal its website. siteAdminEmail gets the site's first Site Admin role (they sign in to the organization site with their own Trax staff account).

A portal that already has a website answers 409 site-already-provisioned: switch its provider instead.

Organization defaults. An nFocus site starts from the defaults of the nearest organization at or above its portal's organization that has some (see "Organization defaults" below): its template, unless the request names one, and its default branding. An organization's lock doesn't bind nFocus admins.

Onboarding a portal that already has a website

POST https://api.nfocus.solutions/v1/admin/sites → 409, problem details

curl
curl -s -X POST 'https://api.nfocus.solutions/v1/admin/sites' \
  -H 'Authorization: Bearer your_admin_app_access_token' \
  -H 'Content-Type: application/json' \
  -d '{"clientToken": "harbor", "orgToken": "youth", "provider": "nfocus", "siteAdminEmail": "site.admin@example.test", "domains": ["www.harbor-youth.example.test"]}'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/sites', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer your_admin_app_access_token',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"clientToken": "harbor", "orgToken": "youth", "provider": "nfocus", "siteAdminEmail": "site.admin@example.test", "domains": ["www.harbor-youth.example.test"]}),
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.nfocus.solutions/v1/admin/sites");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
request.Content = new StringContent("""
    {"clientToken": "harbor", "orgToken": "youth", "provider": "nfocus", "siteAdminEmail": "site.admin@example.test", "domains": ["www.harbor-youth.example.test"]}
    """, System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

A dry run. POST /v1/admin/sites?dryRun=true checks the same request and answers 200 with what it would do, writing nothing but the audit row:

Invalid input still answers 400. The dry run looks no DNS up: a custom domain is expected to be pending until its check.

What onboarding a portal's nFocus site would do, without doing it

POST https://api.nfocus.solutions/v1/admin/sites?dryRun=true → 200 OK, JSON

curl
curl -s -X POST 'https://api.nfocus.solutions/v1/admin/sites?dryRun=true' \
  -H 'Authorization: Bearer your_admin_app_access_token' \
  -H 'Content-Type: application/json' \
  -d '{"clientToken": "riverbend", "orgToken": "north", "provider": "nfocus", "siteAdminEmail": "first.admin@example.test"}'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/sites?dryRun=true', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer your_admin_app_access_token',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"clientToken": "riverbend", "orgToken": "north", "provider": "nfocus", "siteAdminEmail": "first.admin@example.test"}),
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.nfocus.solutions/v1/admin/sites?dryRun=true");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
request.Content = new StringContent("""
    {"clientToken": "riverbend", "orgToken": "north", "provider": "nfocus", "siteAdminEmail": "first.admin@example.test"}
    """, System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Switching provider

PUT /v1/admin/sites/{siteId}/provider with confirm: true moves a site between Duda and an nFocus site. Its content (profile, locations, staff, posts, announcements, alerts, images) stays either way.

Switching a site to the provider it already uses

PUT https://api.nfocus.solutions/v1/admin/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/provider → 409, problem details

curl
curl -s -X PUT 'https://api.nfocus.solutions/v1/admin/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/provider' \
  -H 'Authorization: Bearer your_admin_app_access_token' \
  -H 'Content-Type: application/json' \
  -d '{"provider": "nfocus", "confirm": true}'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/provider', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer your_admin_app_access_token',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"provider": "nfocus", "confirm": true}),
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Put, "https://api.nfocus.solutions/v1/admin/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/provider");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
request.Content = new StringContent("""
    {"provider": "nfocus", "confirm": true}
    """, System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Organization roles

An organization role gives an email a role (author, editor or siteAdmin) on every site at or below one Trax organization of one client, including sites added later. A siteAdmin role on an organization is an Organization Admin: besides every site below, it grants roles and report grants in its subtree, onboards nFocus sites there and sets the organization's defaults (see Organization site, "Organization Admins"). nFocus grants the first one; Organization Admins grant the rest below them.

Each call's audit row names the client and the organization, and the organization's own trail (Organization site, "Organization Admins") records the grant or removal too.

Organization roles at one client

GET https://api.nfocus.solutions/v1/admin/org-roles?databaseId=101&pageSize=5 → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/admin/org-roles?databaseId=101&pageSize=5' \
  -H 'Authorization: Bearer your_admin_app_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/org-roles?databaseId=101&pageSize=5', {
  headers: {
    'Authorization': 'Bearer your_admin_app_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/admin/org-roles?databaseId=101&pageSize=5");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Granting a role on an organization the client doesn't have

POST https://api.nfocus.solutions/v1/admin/org-roles → 400, problem details

curl
curl -s -X POST 'https://api.nfocus.solutions/v1/admin/org-roles' \
  -H 'Authorization: Bearer your_admin_app_access_token' \
  -H 'Content-Type: application/json' \
  -d '{"databaseId": 101, "organizationId": 999999, "email": "regional.admin@example.test", "role": "editor"}'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/org-roles', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer your_admin_app_access_token',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"databaseId": 101, "organizationId": 999999, "email": "regional.admin@example.test", "role": "editor"}),
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.nfocus.solutions/v1/admin/org-roles");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
request.Content = new StringContent("""
    {"databaseId": 101, "organizationId": 999999, "email": "regional.admin@example.test", "role": "editor"}
    """, System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

The new organization wizard

The admin app's wizard sets up OLR for an organization that already exists in the client's Trax database. It is made of the calls on this page:

  1. Pick the organization: GET /v1/admin/clients/{databaseId}/organizations lists every organization of the client in tree order (a parent before its children, with each one's depth), with its OLR portal and website.
    • An organization whose portal is null has no OLR portal yet. Set it up in staff Trax first, as today: this API never writes legacy configuration. It shows up here within five minutes.
    • rollout is the portal's rollout status.
  2. Choose the provider, template and domains, and check them with a dry run (above).
  3. Set the organization's defaults for the sites below it, if it will have any (below).
  4. Onboard (POST /v1/admin/sites), then give the first Organization Admin (POST /v1/admin/org-roles) or let onboarding's siteAdminEmail invite the first Site Admin.

Creating Trax organizations or client databases stays with nFocus's provisioning.

A client's Trax organizations with their portals and websites (the new organization wizard)

GET https://api.nfocus.solutions/v1/admin/clients/101/organizations → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/admin/clients/101/organizations' \
  -H 'Authorization: Bearer your_admin_app_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/clients/101/organizations', {
  headers: {
    'Authorization': 'Bearer your_admin_app_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/admin/clients/101/organizations");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Organization defaults

An organization can hold defaults for new sites below it: a template (and version) and branding (colours for the template's slots and a heading font; a logo belongs to one site's media library), each of which can be locked for the subtree.

An organization's defaults for new sites, in the admin app

GET https://api.nfocus.solutions/v1/admin/clients/101/organizations/1/defaults → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/admin/clients/101/organizations/1/defaults' \
  -H 'Authorization: Bearer your_admin_app_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/clients/101/organizations/1/defaults', {
  headers: {
    'Authorization': 'Bearer your_admin_app_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/admin/clients/101/organizations/1/defaults");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Templates Organization Admins may use

GET /v1/admin/clients/{databaseId}/templates lists the templates the client's Organization Admins may onboard with (templateKeys) and the available ones. An empty list means every available template. PUT …/templates with { "templateKeys": [...] } replaces the list. nFocus admins may onboard with any available template.

The templates a client's Organization Admins may onboard with

GET https://api.nfocus.solutions/v1/admin/clients/101/templates → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/admin/clients/101/templates' \
  -H 'Authorization: Bearer your_admin_app_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/clients/101/templates', {
  headers: {
    'Authorization': 'Bearer your_admin_app_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/admin/clients/101/templates");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Report grants

A report grant lets someone run reports, and nothing else, on one site or on a Trax organization and everything below it. Site Admins and Organization Admins have report access without one.

Each grant and removal is also in the site's or the organization's audit trail.

Report grants at one client

GET https://api.nfocus.solutions/v1/admin/report-grants?databaseId=101&pageSize=5 → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/admin/report-grants?databaseId=101&pageSize=5' \
  -H 'Authorization: Bearer your_admin_app_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/report-grants?databaseId=101&pageSize=5', {
  headers: {
    'Authorization': 'Bearer your_admin_app_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/admin/report-grants?databaseId=101&pageSize=5");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Opening a site as support

POST /v1/admin/sites/{siteId}/support-session (the read role is enough) answers { url }: where the organization site opens that site. Keycloak's single sign-on means no second password there. The call is in the admin audit, and the site's own audit trail says "Opened by nFocus support". In the organization site, full support act as Site Admin on every site and agents (trax-support-agent) read every site and change nothing (403 support-read-only); the site's trail records each support person's first visit of the day.

Open a site in the organization site as nFocus support

POST https://api.nfocus.solutions/v1/admin/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/support-session → 200 OK, JSON

curl
curl -s -X POST 'https://api.nfocus.solutions/v1/admin/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/support-session' \
  -H 'Authorization: Bearer your_admin_app_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/support-session', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer your_admin_app_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.nfocus.solutions/v1/admin/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/support-session");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Key contacts

Each client's key contacts for nFocus: kind (primary, billing, technical or other), name, title, email, phone and notes. GET /v1/admin/clients/{databaseId}/contacts reads them; PUT …/contacts with { "contacts": [...] } replaces the whole list (an empty list removes them all; up to 20). They name client staff, so they appear nowhere but here: never in the organization site, a public answer or a log, and the audit row counts them without names.

A client's key contacts, for nFocus only

GET https://api.nfocus.solutions/v1/admin/clients/101/contacts → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/admin/clients/101/contacts' \
  -H 'Authorization: Bearer your_admin_app_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/clients/101/contacts', {
  headers: {
    'Authorization': 'Bearer your_admin_app_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/admin/clients/101/contacts");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Clients and portals

GET /v1/admin/clients lists the clients the tenant directory lists, and nothing else (in production the directory is TraxMaster's client list). Each client shows how many registration portals its database has. A client whose database can't be read just now shows availability: "unavailable" without failing the list.

The clients the tenant directory lists

GET https://api.nfocus.solutions/v1/admin/clients → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/admin/clients' \
  -H 'Authorization: Bearer your_admin_app_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/clients', {
  headers: {
    'Authorization': 'Bearer your_admin_app_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/admin/clients");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

GET /v1/admin/clients/{databaseId} lists the client's portals: the organization, its rollout status and its website (provider, template, domains, status), if it has one.

A client's portals: rollout status and website

GET https://api.nfocus.solutions/v1/admin/clients/101 → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/admin/clients/101' \
  -H 'Authorization: Bearer your_admin_app_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/clients/101', {
  headers: {
    'Authorization': 'Bearer your_admin_app_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/admin/clients/101");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Rollout status (legacy, pilot or live; a portal starts as legacy) is set with PUT /v1/admin/clients/{databaseId}/portals/{orgId}/status. It is information only: the proxy decides where families go (pilot runbook). Nothing is written to TraxMaster.

Sites, keys and origins

GET /v1/admin/sites lists sites (filter by databaseId, provider, status, or q for a name or token); GET /v1/admin/sites/{siteId} shows one with its domains, template, roles, origins and its active keys' prefixes.

nFocus sites

GET https://api.nfocus.solutions/v1/admin/sites?provider=nfocus&pageSize=5 → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/admin/sites?provider=nfocus&pageSize=5' \
  -H 'Authorization: Bearer your_admin_app_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/sites?provider=nfocus&pageSize=5', {
  headers: {
    'Authorization': 'Bearer your_admin_app_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/admin/sites?provider=nfocus&pageSize=5");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Platform settings

Every platform.PortalSetting key, for one portal (/v1/admin/portals/{databaseId}/{orgId}/settings) or for the whole client (/v1/admin/clients/{databaseId}/settings, every portal's fallback). Each shows its value, default, source (portal, client or default), kind and range, and:

A client's own settings, every portal's fallback

GET https://api.nfocus.solutions/v1/admin/clients/101/settings → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/admin/clients/101/settings' \
  -H 'Authorization: Bearer your_admin_app_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/clients/101/settings', {
  headers: {
    'Authorization': 'Bearer your_admin_app_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/admin/clients/101/settings");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();
Key What it is
The registration settings Guest carts, seat holds and cart reminders (see Organization site, "Registration settings")
MinimumCardPaymentCents The smallest card payment, never below the gateway's minimum
DonationMaximumCents The largest gift, $1 to $100,000 (GET P/donations/options shows it)
DonationReceiptText The donation and tax wording on receipts, plain text up to 1,000 characters. Placeholder wording until set
Email{Kind}Opening, Email{Kind}Closing, Email{Kind}Footer Your own paragraphs (up to 1,000 characters) and footer line (up to 250) inside the built-in emails. {Kind} is Receipt, Account (the account emails families get) or CartReminder

PUT takes values by key (null removes that level's value) and, for a portal, locks by key (true locks, false unlocks). A link may be any https address here. The minimum card payment can't be above the donation maximum: a gift without signing in is one card payment, so every gift would be refused. Every change and lock is in the audit trail with its old and new value (wording by its length). The instance that took the change applies it at once; the others within a minute.

Capabilities

nFocus decides first whether each capability (see Organization site, "Capabilities") is off, available (the organization chooses; the default) or onLocked (on, and the organization can't turn it off), for the whole client (/v1/admin/clients/{databaseId}/capabilities) or one portal (/v1/admin/portals/{databaseId}/{orgId}/capabilities). A portal's own state wins over the client's.

A portal's capabilities: nFocus's state and where it comes from, legacy's value, the organization's choice and the effective value

GET https://api.nfocus.solutions/v1/admin/portals/101/11/capabilities → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/admin/portals/101/11/capabilities' \
  -H 'Authorization: Bearer your_admin_app_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/portals/101/11/capabilities', {
  headers: {
    'Authorization': 'Bearer your_admin_app_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/admin/portals/101/11/capabilities");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Each capability shows state (this level's own, or null), the state that applies (nfocusState) and where it comes from (source: portal, client or default), its owner and controlledBy. At a portal it also shows legacy (legacy configuration's value, for a legacy-owned capability), organizationValue (the organizations' choice, or the registration setting behind seat holds and reminders) and effective.

PUT takes states by key; null removes this level's state, so the client's (or available) applies.

Leave videos to the organization at this portal

PUT https://api.nfocus.solutions/v1/admin/portals/101/11/capabilities → 200 OK, JSON

curl
curl -s -X PUT 'https://api.nfocus.solutions/v1/admin/portals/101/11/capabilities' \
  -H 'Authorization: Bearer your_admin_app_access_token' \
  -H 'Content-Type: application/json' \
  -d '{"states": {"website.videos": "available"}}'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/portals/101/11/capabilities', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer your_admin_app_access_token',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"states": {"website.videos": "available"}}),
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Put, "https://api.nfocus.solutions/v1/admin/portals/101/11/capabilities");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
request.Content = new StringContent("""
    {"states": {"website.videos": "available"}}
    """, System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Templates

The template catalog: GET /v1/admin/templates lists every template with all its versions, drafts and retired ones included, and how many sites use each version.

The template catalog, every version

GET https://api.nfocus.solutions/v1/admin/templates → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/admin/templates' \
  -H 'Authorization: Bearer your_admin_app_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/templates', {
  headers: {
    'Authorization': 'Bearer your_admin_app_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/admin/templates");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

A template version that fails the check

POST https://api.nfocus.solutions/v1/admin/templates/community-hub/versions → 400, problem details

curl
curl -s -X POST 'https://api.nfocus.solutions/v1/admin/templates/community-hub/versions' \
  -H 'Authorization: Bearer your_admin_app_access_token' \
  -H 'Content-Type: application/json' \
  -d '{"schema": {"format": 1, "key": "community-hub", "version": 99}}'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/templates/community-hub/versions', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer your_admin_app_access_token',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"schema": {"format": 1, "key": "community-hub", "version": 99}}),
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.nfocus.solutions/v1/admin/templates/community-hub/versions");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
request.Content = new StringContent("""
    {"schema": {"format": 1, "key": "community-hub", "version": 99}}
    """, System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Staff users and roles

nFocus creates staff users in Keycloak; the API doesn't change Keycloak.

Site role changes also appear in the site's own audit trail.

Operations and reconciliation

GET /v1/admin/ops/status and GET /v1/admin/reconciliation answer exactly what /internal/v1/ops/status and /internal/v1/reconciliation answer (the same fields and parameters, and format=csv), for the admin app's sign-in. The read role is enough. Each queue and job in the status has a latestEventId: its latest failure in the troubleshooting log.

Reports

GET /v1/admin/reports lists nFocus's reports:

Answers are totals only: nFocus never gets detail rows (detail=true answers 400), nor the outstanding balances and waitlists reports, which name families. The read role is enough, and every run is in the admin audit. A portal's page traffic needs its GA4 property id: the portal setting Ga4PropertyId. See Reports and the troubleshooting log.

The reports nFocus runs

GET https://api.nfocus.solutions/v1/admin/reports → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/admin/reports' \
  -H 'Authorization: Bearer your_admin_app_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/reports', {
  headers: {
    'Authorization': 'Bearer your_admin_app_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/admin/reports");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Troubleshooting log

GET /v1/admin/logs searches every client's troubleshooting events: errors, refusals worth support's attention, failed sign-ins and lockouts, failed emails, Duda jobs and worker passes, checkout recovery, the scheduled payments' sync and domain checks. Filter by client, organization, site, kind, severity, code, trace id and time; add the audit trails' changes with includeChanges=true; export with format=csv. See Reports and the troubleshooting log.

The troubleshooting log: one client's errors, newest first

GET https://api.nfocus.solutions/v1/admin/logs?databaseId=101&severity=error&pageSize=5 → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/admin/logs?databaseId=101&severity=error&pageSize=5' \
  -H 'Authorization: Bearer your_admin_app_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/logs?databaseId=101&severity=error&pageSize=5', {
  headers: {
    'Authorization': 'Bearer your_admin_app_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/admin/logs?databaseId=101&severity=error&pageSize=5");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Support lookup

GET /v1/admin/orders finds one order by one of:

It shows the order as its receipt does:

It never shows card data, the household beyond the order's own lines, an address, phone or email, or any other order. An anonymous gift shows its donor's name only.

Looking up a receipt number that isn't there

GET https://api.nfocus.solutions/v1/admin/orders?databaseId=101&receipt=no-such-receipt → 404, problem details

curl
curl -s 'https://api.nfocus.solutions/v1/admin/orders?databaseId=101&receipt=no-such-receipt' \
  -H 'Authorization: Bearer your_admin_app_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/admin/orders?databaseId=101&receipt=no-such-receipt', {
  headers: {
    'Authorization': 'Bearer your_admin_app_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/admin/orders?databaseId=101&receipt=no-such-receipt");
request.Headers.Authorization = new("Bearer", "your_admin_app_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();