Organization site
The organization site is the separate app organization staff use to run their website (it was called Site Manager).
These are its endpoints, under /v1/manage. Every call needs a staff access token from Trax Keycloak (see
Authentication and keys).
The signed-in staff user and their sites
GET https://api.nfocus.solutions/v1/manage/me → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/manage/me' \
-H 'Authorization: Bearer your_keycloak_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/me', {
headers: {
'Authorization': 'Bearer your_keycloak_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/manage/me");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();Each site has a provider: duda (a Duda website) or nfocus (an nFocus site, served by the public registration
portal). GET /v1/manage/me and GET /v1/manage/sites/{siteId} show it. Profile, locations, staff, posts,
announcements, alerts and images work the same for both, and stay when nFocus switches a site's provider.
GET /v1/manage/me is the site switcher. For each site it gives:
- your
roleandvia: where the role comes from,site(a role on the site itself) ororganization(see Organization roles);viais null for nFocus support; - its
provider,statusandtemplate(keyandname: an nFocus site's template, or a Duda website's, whose key is its template id).
organizations lists your organization roles: the client, the organization's id and name, and the role.
Roles
Each person has a role on each site. A role on one site gives nothing on another site: calls about a site where you
have no role answer 404 site-not-found.
| Role | Can |
|---|---|
| Author | Write and edit drafts: posts, an nFocus site's website, services, schedules and organization content; upload images, preview |
| Editor | Everything an Author can, plus publish, schedule, unpublish and archive posts; publish an nFocus site's website, services, schedules and organization content; edit the profile, locations, staff, announcements and alerts; push the profile to Duda |
| Author on sites that allow it | Also create, change, publish and delete announcements and alerts (see Settings) |
| Site Admin | Everything, plus people and roles, the template (and publishing a change of template), the domains and the audit trail |
nFocus support staff act as Site Admin on every site. Only they can create a Duda website or lock its template, and only
nFocus admins (see nFocus admin) switch a site's provider. nFocus support agents (trax-support-agent) open every site
and change nothing: any change answers 403 support-read-only, and GET /v1/manage/me says supportAccess: "read"
("full" for full support). The site's audit trail records each support person's first visit of the day.
Organization roles
A role can also cover a Trax organization: every site at or below it in the organization's hierarchy, including sites added later. A regional or territory admin is a typical case. nFocus admins grant them (see nFocus admin), and so do Organization Admins in their own subtree.
- Your role on a site is the highest of your role on the site itself and your organization roles on the site's organization or one above it.
- Never across clients: an organization role covers sites of its own client only. Elsewhere you have no role, and
calls answer
404 site-not-foundas usual. - "A site always keeps one Site Admin" counts the site's own Site Admins only. Someone who is Site Admin through an organization doesn't count, so the site's own last Site Admin can't be removed.
- New organizations in Trax show up within five minutes.
- Organization Admins (
siteAdminon an organization) also grant roles in their subtree: see "Organization Admins".
A call that needs a higher role answers 403 site-role-required, and requiredRole names the role needed. Each
operation in the API reference names its minimum role.
Organization Admins
An organization role of siteAdmin makes someone an Organization Admin: Site Admin on every site at or below the
organization, and the organization's own pages under /v1/manage/organizations/{clientToken}/{organizationId}. They
need an organization role on that organization or one above it; elsewhere they answer 404 organization-not-found. Any
organization role reads the organization (GET); the rest needs Organization Admin (403 organization-role-required).
- The subtree:
GET …lists the organization and every organization below it, each with its OLR portal (null: none yet, set up in staff Trax) and its website. Use these ids for the calls below. - Roles:
GET/POST …/roles,DELETE …/roles/{orgRoleId}. Grantauthor,editororsiteAdminon this organization (organizationIdleft out) or one below it; never above (400). Another Organization Admin of your own organization is removed by nFocus or by an Organization Admin above you (403 peer-role). Site roles on the sites below use each site's…/users. - Report grants:
GET/POST …/report-grants,DELETE …/report-grants/{reportGrantId}(below). - Defaults for new sites:
GET/PUT/DELETE …/defaults: a template, branding and locks for the sites below (nFocus admin, "Organization defaults", has the details). A lock set above you shows ascanChangeTemplateorcanChangeBrandingfalse. A lock binds the sites below and Organization Admins below the locking organization: they can't switch an nFocus site's template (403 template-locked) or change its branding (403 branding-locked). - Onboarding:
POST …/siteswithorgToken(a portal at or below this organization) sets up an nFocus site, on the template you name or the organization's default, with its default branding.siteAdminEmailinvites a Site Admin (you are one already, through your role).?dryRun=trueanswers the plan first and writes nothing. A template nFocus doesn't offer your organization answers409 template-not-allowed, and a portal whose site nFocus turned off,409 site-disabled. Duda websites, keys, platform addresses and the per-site template lock stay with nFocus; a Site Admin adds custom domains afterwards. - Audit:
GET …/auditlists changes to the organization, the organizations below it and every site below it.
An organization, your role on it, and every organization below it with its portal and website
GET https://api.nfocus.solutions/v1/manage/organizations/riverbend/1 → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/manage/organizations/riverbend/1' \
-H 'Authorization: Bearer your_keycloak_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/organizations/riverbend/1', {
headers: {
'Authorization': 'Bearer your_keycloak_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/manage/organizations/riverbend/1");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();Granting a role on an organization outside your subtree
POST https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/roles → 400, problem details
curl
curl -s -X POST 'https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/roles' \
-H 'Authorization: Bearer your_keycloak_access_token' \
-H 'Content-Type: application/json' \
-d '{"organizationId": 999999, "email": "new.editor@example.test", "role": "editor"}'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/roles', {
method: 'POST',
headers: {
'Authorization': 'Bearer your_keycloak_access_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({"organizationId": 999999, "email": "new.editor@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/manage/organizations/riverbend/1/roles");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
request.Content = new StringContent("""
{"organizationId": 999999, "email": "new.editor@example.test", "role": "editor"}
""", System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();What new sites below an organization start from, and the locks
GET https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/defaults → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/defaults' \
-H 'Authorization: Bearer your_keycloak_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/defaults', {
headers: {
'Authorization': 'Bearer your_keycloak_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/manage/organizations/riverbend/1/defaults");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();What onboarding a portal below would do (a dry run writes nothing)
POST https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/sites?dryRun=true → 200 OK, JSON
curl
curl -s -X POST 'https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/sites?dryRun=true' \
-H 'Authorization: Bearer your_keycloak_access_token' \
-H 'Content-Type: application/json' \
-d '{"orgToken": "north"}'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/sites?dryRun=true', {
method: 'POST',
headers: {
'Authorization': 'Bearer your_keycloak_access_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({"orgToken": "north"}),
});
const data = await response.json();C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/sites?dryRun=true");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
request.Content = new StringContent("""
{"orgToken": "north"}
""", System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();Changes in an organization's subtree, newest first
GET https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/audit?pageSize=5 → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/audit?pageSize=5' \
-H 'Authorization: Bearer your_keycloak_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/audit?pageSize=5', {
headers: {
'Authorization': 'Bearer your_keycloak_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/manage/organizations/riverbend/1/audit?pageSize=5");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();Report access
Site Admins run their site's reports, and Organization Admins their subtree's. Anyone else needs a report grant,
which gives reports and nothing else, on one site or an organization: a Report Viewer has no website role, and an
Editor runs no reports without one. GET /v1/manage/me lists where you may run reports (reports: scope site or
organization, via role or grant). The reports are below.
- On a site (Site Admin):
GET/POST /v1/manage/sites/{siteId}/report-grantswith{ "email": … },DELETE …/report-grants/{reportGrantId}. - On an organization or a site below it (Organization Admin):
POST …/organizations/{…}/report-grantswithemailandorganizationIdorsiteId.
A second grant for the same email and scope answers 409 report-grant-exists. Grants link to the person at their first
sign-in, as invitations do.
People who may run a site's reports without a website role
GET https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/report-grants → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/report-grants' \
-H 'Authorization: Bearer your_keycloak_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/report-grants', {
headers: {
'Authorization': 'Bearer your_keycloak_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/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/report-grants");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();Report grants on an organization, the organizations below it and their sites
GET https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/report-grants → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/report-grants' \
-H 'Authorization: Bearer your_keycloak_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/report-grants', {
headers: {
'Authorization': 'Bearer your_keycloak_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/manage/organizations/riverbend/1/report-grants");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();Settings
Each organization decides whether announcements and alerts need an Editor. PUT …/settings with
{ "authorsPublishNotices": true } lets Authors publish them too. It is off by default, and only a Site Admin can
change it. Posts, the profile, locations and staff still need an Editor.
Registration settings
A Site Admin sees and changes the portal's registration settings at …/registration-settings: guest carts, seat holds
and cart reminder emails.
The portal's registration settings
GET https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/registration-settings → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/registration-settings' \
-H 'Authorization: Bearer your_keycloak_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/registration-settings', {
headers: {
'Authorization': 'Bearer your_keycloak_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/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/registration-settings");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();Each setting shows:
- its
valuenow and itsdefault; - its
source:portal(set for this portal),client(set for every portal of the client) ordefault; - its
kind:integer(fromminimumtomaximum, inunit),booleanorlink. More kinds may come; show a kind you don't know as read-only; lockedandcanChange. nFocus can lock a setting for a portal in the admin app: it shows, but a change answers403 setting-locked(withkeys).
| Key | What it is | Range |
|---|---|---|
GuestCartDays |
Days a guest cart lives after its last change | 1–365 days |
CartHoldMinutes |
How long a cart holds a seat; 0 turns holds off | 0–240 minutes |
CartHoldMaxExtensions |
Extensions allowed per hold | 0–10 |
CartHoldExtensionMinutes |
What one extension adds | 1–120 minutes |
CartReminderEnabled |
Send abandoned-cart reminder emails | true or false |
CartReminderAfterHours |
Hours without a change before a reminder | 1–720 hours |
CartReminderMax |
Reminders per filled cart | 0–10 |
CartReturnUrl |
The "Return to my cart" link in reminders | an https address of this site |
PUT …/registration-settings takes values, by key. A value is written for this portal only, never for the whole
client. null removes the portal's own value, so the client's value or the default applies again.
- Checks: numbers must be JSON numbers within the range, and true or false must be JSON booleans. A request with
any value that fails changes nothing (
400, with errors such asvalues.CartHoldMinutes). - The return link goes out in emails, so it must start with one of the setting's
allowedAddresses: the site's own https addresses (an nFocus site's active domains and its address on the portal; a Duda website's registered https origins). It is checked when it is saved: if that address later stops being the site's, change the link. - When a change applies: within a minute (the settings are cached for 60 seconds).
- Audit: every change is in the audit trail, with its old and new value and source.
A setting outside its range
PUT https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/registration-settings → 400, problem details
curl
curl -s -X PUT 'https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/registration-settings' \
-H 'Authorization: Bearer your_keycloak_access_token' \
-H 'Content-Type: application/json' \
-d '{"values": {"CartHoldMinutes": 999}}'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/registration-settings', {
method: 'PUT',
headers: {
'Authorization': 'Bearer your_keycloak_access_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({"values": {"CartHoldMinutes": 999}}),
});
const data = await response.json();C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Put, "https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/registration-settings");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
request.Content = new StringContent("""
{"values": {"CartHoldMinutes": 999}}
""", System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();Seat holds and reminders follow nFocus too. Where nFocus turned the capability cart.seatHolds or cart.reminders
off for the portal, CartHoldMinutes or CartReminderEnabled shows locked (its value is ignored) and a change answers
403 setting-locked. Where nFocus keeps one on (onLocked), it can't be set to off (400: holds need at least 1 minute).
Capabilities
Each website and registration feature is a capability you can turn off for a site, or for every site at and below an organization. nFocus decides first, for the client or the portal:
off: off, whatever you choose;available: you choose (the default);onLocked: on, and you can't turn it off.
Every capability is on until someone turns it off, so nothing changes by itself.
| Key | What it switches |
|---|---|
website.blog, website.news |
Posts of that kind |
website.videos, website.contacts |
Videos and contacts (a later gate) |
website.announcements, website.alerts |
Announcements, alerts |
website.staffDirectory |
The staff directory |
website.locations |
Locations and location pages |
website.services |
Services and service categories |
website.schedules |
Weekly schedules |
website.impact |
Impact numbers, outcomes, quotes, values and pathways |
giving.donations |
Donations (also legacy's NoDonation) |
giving.designated |
Gifts designated to a location or sponsorship |
giving.sponsorships |
Sponsorship options |
registration.activities |
Activity registration (also legacy's HideActivities and ParentPortalOnly) |
registration.memberships |
Memberships bought on their own (also legacy's HideMemberships and ParentPortalOnly) |
registration.paymentPlans |
Payment plans (also legacy's PaymentPlanEnabled) |
cart.guestCart |
Guest carts and their merge at sign-in |
cart.seatHolds, cart.reminders |
Seat holds and cart reminders: switched by their registration settings |
cart.saveForLater |
Saving cart lines for later |
reports |
This site's reports |
organization.childSites |
Organization Admins setting up sites below them: nFocus only |
Legacy-owned capabilities (owner: legacy) can only be turned off here, never on: one is on where legacy
configuration has it on and the switchboard does too. Legacy's own switches keep their meaning: features on
GET P/config still shows legacy's values, and capabilities shows what is on, both together.
Reading and changing them
- A site (Site Admin):
GET/PUT /v1/manage/sites/{siteId}/capabilities. - An organization (Organization Admin):
GET/PUT /v1/manage/organizations/{clientToken}/{organizationId}/capabilities, for every site at and below it.
A site's capabilities: what nFocus decided, the choices here and above, and whether you can change each
GET https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/capabilities → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/capabilities' \
-H 'Authorization: Bearer your_keycloak_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/capabilities', {
headers: {
'Authorization': 'Bearer your_keycloak_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/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/capabilities");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();Each capability shows:
nfocusState: what nFocus decided here;choice: the choice made here (null: none) and, at an organization,locked;inheritedandinheritedFrom: what applies without a choice here, and the organization it comes from (null: the default);lockedAbove: the organization whose locked choice applies here;legacy: legacy configuration's value, for a legacy-owned capability at a portal;effective: whether it is on here;canChange: whether you may change the choice here;controlledBy:switchboard,registrationSettings(change the registration setting instead) ornfocus(only nFocus switches it).
Which choice wins, for a site:
- a locked choice at the highest organization above it;
- the site's own choice;
- the nearest organization's choice above it;
- on.
PUT takes values by key (true, false, or null to remove the choice made here) and, at an organization only,
locks by key. A lock binds every site and organization below to this organization's choice, so lock a capability
only with a choice made here.
- Refusals: a key nFocus decided (
offoronLocked), or one a lock above binds, answers403 capability-lockedwithkeys. An Organization Admin at or above the locking organization isn't bound. A registration-settings or nFocus-only key, an unknown key, or a lock without a choice answers400. Any refusal means nothing is written. - When a change applies: at once on the instance that took it, within a minute everywhere.
- Audit: every change is in the site's or the organization's audit trail, with the old and new choice.
An organization's capabilities for every site at and below it
GET https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/capabilities → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/capabilities' \
-H 'Authorization: Bearer your_keycloak_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/capabilities', {
headers: {
'Authorization': 'Bearer your_keycloak_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/manage/organizations/riverbend/1/capabilities");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();What "off" does
- The website's reads of an off capability answer
404 capability-offwithcapability(P/staff,P/posts?kind=blog,P/locations, the catalog for activities, …). Answers that mix several leave the off parts out:P/postswithout a kind,P/site's locations,P/content, a location page,P/donations/options, the sitemap, andP/website, which leaves out sections whose items come from an off capability. Duda collection feeds answer an empty list. - Writes here to content of an off capability answer
409 capability-off. Reading it keeps working, and nothing is deleted: turned on again, everything published shows again. - Families: a refusal they already have where there is one (
donations-off,memberships-hidden,payment-plans-off), otherwise409 capability-off. Lines already in a cart stay, with the noticeturned-off, and checkout refuses them until they are removed.
Editing safely
Items you can edit return an ETag header, and the same value as version in the body. Send it back in If-Match when
you change or delete the item:
- No
If-Match:428 if-match-required. - Someone saved a change since you loaded the item:
412 stale-version. Reload, then make your change again.
A site's posts in Site Manager
GET https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/posts?pageSize=5 → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/posts?pageSize=5' \
-H 'Authorization: Bearer your_keycloak_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/posts?pageSize=5', {
headers: {
'Authorization': 'Bearer your_keycloak_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/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/posts?pageSize=5");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();Posts
- States: posts are created as drafts. An Editor publishes now, or schedules with
publishUtc(and optionallyunpublishUtc).statusreportsdraft,scheduled,published,endedorarchived. - Revisions: every content save keeps a revision (
…/revisions). - Clean HTML:
bodyHtmlis cleaned on save. Headings, lists, links, images, quotes and simple tables are kept. Scripts, styles, frames and forms are removed. - Preview links:
…/preview-linkreturns a link that works for one hour.
Images
Upload with multipart/form-data: a file field (JPEG, PNG or WebP, up to 5 MB) and an altText field (a request
over 6 MB is refused with 413 request-too-large before it is read). The API reads the image's real format from its
contents, then saves a fresh copy without camera or location data, scaled to at most 2400 px. While the profile, a
staff photo or a post uses an image, deleting it answers 409 media-in-use.
Locations
Locations go live when an Editor saves them, as before. POST and PUT …/locations/{id} take an optional details
object for the website's location pages:
slug(unique on the site; made from the name when a location is added, and kept when it is renamed);roleLine(60 characters),description(2,000),accessibilityNotes(up to six{ title, text, icon });photoMediaId, andlatitudewithlongitude(both or neither; nothing geocodes an address);openingHours({ day, opens, closes }, localHH:mm; several spans a day),specialHours({ from, to, label, closed, spans }, up to two months each);actions, the location's buttons:register,donate,call,emailanddirectionsonce each, andlinks with an httpsurl. Each has its ownlabel(40 characters) andenabled.callneeds the location's phone,emailits email,directionsits address or map position;layout(service-siteoryouth-center) andtraxLocationId(a Trax location the portal's catalog shows).
Left out, details is kept as it is, so an app written before these fields can't wipe them. Sent, it is replaced
whole, except a null slug, which keeps the current one.
Services, schedules and organization content
Each of these has a list, GET …/{id} with its ETag, create, change, delete, …/publish, …/unpublish and
PUT …/order:
| Path | What |
|---|---|
service-categories |
A category: name, slug, icon |
services |
A service: category, name, slug, a short line, icon, link (catalog activities, a program or a url) and the locationIds offering it |
schedules |
A weekly entry: title, day, startTime, endTime, notes, and optional locationId, serviceId and outcomeId |
content/impact-numbers |
value ("500+"), label, sourceTitle, sourceNote |
content/outcomes |
title, text, measures and programs (up to six lines each), accent |
content/quotes |
text, attribution, role, photoMediaId |
content/values |
name, text, icon |
content/pathways |
name, minAge, maxAge, text |
sponsorships |
name, text, and amountCents or minimumCents with maximumCents ($1 to $100,000) |
videos |
A YouTube or Vimeo video: url, title, description, thumbnailMediaId, captions, audioDescription, transcript (see "Videos") |
contacts |
Who to contact: name, role, phone, email, and public (false keeps it for your own reference) |
- Drafts: everything starts as a draft. Authors create drafts and change them; Editors publish, unpublish, delete and change published items. Only published items reach the website.
- The site's or a location's: schedule entries, organization content, sponsorships, videos and contacts take an
optional
locationId; without one they are the site's own. - Catalog links (a service's activities or program, a location's Trax location) must be in the portal's catalog.
- A website that uses an item keeps working when it is unpublished: the page leaves it out. Publishing a template website that points at a draft is refused.
- Deleting a location deletes its own schedule entries, content, sponsorships, videos and contacts, and takes it off its services. Other schedule entries that named one of its outcome statements keep their place without the link.
- A location's buttons show on the website only while they have what they need: a call button without a phone, an email button without an email address, or directions without an address or map position are left out.
A site's services, drafts included
GET https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/services → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/services' \
-H 'Authorization: Bearer your_keycloak_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/services', {
headers: {
'Authorization': 'Bearer your_keycloak_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/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/services");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();An outcome with an unknown colour
POST https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/content/outcomes → 400, problem details
curl
curl -s -X POST 'https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/content/outcomes' \
-H 'Authorization: Bearer your_keycloak_access_token' \
-H 'Content-Type: application/json' \
-d '{"title": "Safe and supported", "accent": "magenta"}'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/content/outcomes', {
method: 'POST',
headers: {
'Authorization': 'Bearer your_keycloak_access_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({"title": "Safe and supported", "accent": "magenta"}),
});
const data = await response.json();C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/content/outcomes");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
request.Content = new StringContent("""
{"title": "Safe and supported", "accent": "magenta"}
""", System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();Videos
Add a video by its YouTube or Vimeo address: https://www.youtube.com/watch?v=…, https://youtu.be/…, a YouTube
embed or shorts address, https://vimeo.com/{id} (with its /{hash} for an unlisted video) or
https://player.vimeo.com/video/{id}. Only these addresses, over https, are accepted (400, errors.url); embed code
isn't. The answer gives the provider, videoId, the player's embedUrl (YouTube's privacy-enhanced domain, or
Vimeo's player without tracking) and the watchUrl.
A video can be a draft without the rest, but publishing needs, for WCAG 2.2 AA:
- a thumbnail (
thumbnailMediaId, an image from the media library with its alt text): the website shows it and loads the player only when someone clicks it; - captions:
captions: "confirmed"(you checked the video has accurate captions on YouTube or Vimeo; who and when are recorded ascaptionsByandcaptionsUtc) or"noAudio"(it has no speech); - audio description:
audioDescription: "described"(the video describes what is only visual) or"notNeeded"(nothing important is only visual), or atranscript.
A transcript never replaces captions. Publishing without them answers 422 video-not-accessible with missing; each
video also lists what it still needs (missing). A published video must keep them, and its thumbnail can't be
deleted from the media library (409 media-in-use).
A site's videos, drafts included, with what publishing still needs
GET https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/videos → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/videos' \
-H 'Authorization: Bearer your_keycloak_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/videos', {
headers: {
'Authorization': 'Bearer your_keycloak_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/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/videos");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();In a post, place a video by reference: <figure data-trax-video="{videoId}"></figure>. The post keeps only this
site's videos, and never an iframe. Publishing a post whose videos aren't published answers
409 reference-not-published with videoIds, and so does a change to a published post that places one.
Contacts
A short "who to call" list for the website, the site's own or a location's. Each contact needs a phone, an email or
both. Only published contacts marked public reach the website; set public: false for one you keep for your own
reference. A new contact is public unless you say otherwise; a change that leaves public out keeps what it was.
Icons: accessible, arts, calendar, career, childcare, clothing, community, counseling, donate, education, emergency, faith, family, food, gift, handshake, health, heart, home, leadership, mentoring, money, parking, recreation, safety, seasonal, seniors, shelter, sports, star, stem, transportation, utilities, volunteer, worship, youth. Accents (an outcome's colour): teal, amber, green, red, blue, purple, pink, slate.
An nFocus site's website
An nFocus site's pages come from a template (see Building an nFocus site from a template). GET …/website returns
the draft with its template's schema, the published version, problems (what stops the draft being published
now) and notShown (content the draft's template has no place for). A Duda site answers 409 site-not-nfocus.
- The template: nFocus chooses it when the site is set up; a Site Admin can change it with
PUT …/website/draft/template{ "templateKey", "version" }(the newest available version whenversionis left out). Content is kept: what the new template doesn't show is listed innotShown, and switching back shows it again. A draft or retired version answers409 template-not-available; a template nFocus locked,403 template-locked. Where nFocus limits a client's templates,GET …/templateslists only those (and the one the site uses), and switching to another answers409 template-not-allowed; the site keeps, and may upgrade, the template it has. - The draft:
PUT …/website/draftwithcontentandbranding(each replaced when given; leave one out to keep it) and the draft's ETag inIf-Match. It checks types, limits and colour contrast; a draft may be incomplete. Before a template is chosen, it answers409 website-template-needed. - Preview:
POST …/website/preview-linkreturns a link to the draft that works for one hour. - Publish:
POST …/website/publish(Editor, with the draft's ETag). It needs every required field of each visible section, and references to published content; otherwise400 invalid-requestlists them. A draft on a different template version than the published one needs a Site Admin, and an unlocked template. - History: every publish is kept (
GET …/website/revisions).
Choosing a template that doesn't exist
PUT https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/website/draft/template → 400, problem details
curl
curl -s -X PUT 'https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/website/draft/template' \
-H 'Authorization: Bearer your_keycloak_access_token' \
-H 'Content-Type: application/json' \
-d '{"templateKey": "no-such-template"}'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/website/draft/template', {
method: 'PUT',
headers: {
'Authorization': 'Bearer your_keycloak_access_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({"templateKey": "no-such-template"}),
});
const data = await response.json();C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Put, "https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/website/draft/template");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
request.Content = new StringContent("""
{"templateKey": "no-such-template"}
""", System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();An nFocus site's domains
An nFocus site is always served at its portal path on the public portal, {portal}/{clientToken}/{orgToken}/
(portalUrl). It can also have:
- a platform address,
{prefix}.{platform suffix}: active at once, because the platform runs its DNS. One per site; - the organization's own domains: each starts
pending, and becomesactiveonce a check finds both:- proof of ownership: a TXT record named
_trax-verify.{domain}holding the site'sownershipRecordValue(trax-verify=and 32 letters and digits). Each domain'sownershipshows its record name and value; - DNS at the platform: the domain points only at the platform's front end (a CNAME or A records; every address the name resolves to must be the front end's; see Building an nFocus site).
- proof of ownership: a TXT record named
The record value is the same for all of a site's domains, so it can be published before a domain is added; the domain is then active as soon as it is added. Keep the record: every check looks for it, the daily one too.
Only an active domain serves the site: it is allowed to call the API from a browser, and the site's own sign-in client
(site-{clientToken}-{orgToken}) sends families back to it after sign-in. The API checks each active custom domain
every day. After three failed checks in a row it becomes failed and stops serving until a check passes again.
| Call | Who | What it does |
|---|---|---|
GET …/domains |
Author | The portal path, the site's ownershipRecordValue, and every domain with its state, its last check (ok, ownership-not-proved, taken, not-resolving, points-elsewhere, no-front-end-targets, platform), failed checks in a row, and for a custom domain its ownership record (provedUtc is when the last check found it) |
POST …/domains |
Site Admin | Adds { "host": "www.example.org" } and checks it at once. A host under the platform suffix is the platform address |
POST …/domains/{id}/check |
Site Admin | Checks a domain now, for example after publishing its TXT record or changing its DNS |
PUT …/domains/{id}/primary |
Site Admin | Makes an active domain the primary address; the front end redirects the others to it. The first active domain is primary until you choose |
DELETE …/domains/{id} |
Site Admin | Removes a domain. It stops serving at once |
One website at a time serves a host. A platform address belongs to its site, and an active custom domain to its
site; adding either elsewhere answers 409 domain-taken (as does adding a host the site already lists). A pending
domain reserves nothing: another site can add the same host, and whichever site's record the domain's owner publishes
gets it. The other site's check then answers taken, and it stays pending. When a domain changes hands, the new owner
replaces the record; the old site's daily checks fail, and after the third the new owner's site can take it.
A site has at most one platform address (409 platform-domain-exists) and ten domains, and a custom domain has at most
240 characters (so its record name fits in DNS). These calls answer 409 site-not-nfocus for a Duda site, whose
address is changed with PUT …/domain.
An nFocus site's addresses
GET https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/domains → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/domains' \
-H 'Authorization: Bearer your_keycloak_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/domains', {
headers: {
'Authorization': 'Bearer your_keycloak_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/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/domains");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();The Duda website
These calls are for Duda websites only. For an nFocus site they answer 409 site-not-duda.
| Call | Who | What it does |
|---|---|---|
POST /v1/manage/sites |
nFocus support | Creates the portal's website from a template, sets its domain and writes its Content Library. Returns the site's keys once. The admin app's POST /v1/admin/sites does the same with provider: "duda" |
PUT …/template |
Site Admin | Switches the template. Needs confirm: true, because edits made in the Duda editor can be lost. Refused while support has locked the template. Writes the widget settings again and reconnects the collections (see the Duda guide) |
POST …/duda/collections |
Site Admin | Reconnects the site's trax_* collections to its own feeds, for example after a designer adds one to the template |
PUT …/domain |
Site Admin | Changes the domain: trax ({prefix}.traxregistration.com), custom (the organization's domain) or duda (Duda's address only). Browser access and sign-in follow the new address |
POST …/publish |
Editor | Writes the profile to the Content Library now, and to the live site if it is published |
GET …/duda |
Author | Shows the template, domain, published state and pending updates |
Profile changes reach the Content Library automatically within seconds. Post, staff and location changes refresh their
Duda collections. An nFocus site gets none of these updates. PUT …/template-lock (support) works for both providers.
Reports
Site Admins and Organization Admins run their sites' and organizations' reports, and so does anyone with a report grant:
- Site usage (the API's counts, and GA4 where a property is connected), sign-ins and cart conversion;
- registration and donation revenue, online, on both channels (the new portal and legacy OLR), by program, location, activity or designation;
- outstanding balances and waitlists, as of now. With
detail=truethey list each account or waitlisted participant by name: anyone with report access to the scope may see these rows, and nFocus never does.
Each runs by day, week or month, by channel, or for an organization by child organization. GET /v1/manage/reports
lists yours, with your scopes. Every run and export is in the audit trail. See
Reports and the troubleshooting log.
The reports you may run, with your scopes
GET https://api.nfocus.solutions/v1/manage/reports → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/manage/reports' \
-H 'Authorization: Bearer your_keycloak_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/reports', {
headers: {
'Authorization': 'Bearer your_keycloak_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/manage/reports");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();Troubleshooting log
Site Admins read their site's log of what went wrong (GET …/logs), and Organization Admins the log of every portal
and site at or below their organization (GET /v1/manage/organizations/{clientToken}/{organizationId}/logs): errors,
refused payments, failed sign-ins and lockouts (never who), failed emails (never the address), Duda jobs, checkout
recovery and domain checks, for 90 days. includeChanges=true lists the audit trail's changes beside them. Every search
is recorded in the audit trail. See Reports and the troubleshooting log.
A site's troubleshooting log, with its audit trail's changes
GET https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/logs?includeChanges=true&pageSize=5 → 200 OK, JSON
curl
curl -s 'https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/logs?includeChanges=true&pageSize=5' \
-H 'Authorization: Bearer your_keycloak_access_token'JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/logs?includeChanges=true&pageSize=5', {
headers: {
'Authorization': 'Bearer your_keycloak_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/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/logs?includeChanges=true&pageSize=5");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();Audit trail
Every change is recorded with who made it and when. Site Admins can read the trail (…/audit).