Trax Platform APIv1

Moving a portal from legacy OLR

Legacy Trax Online Registration serves each portal at {host}/{client}/{org}/. Everything after the # is a page of its single-page app, such as #/activities/1234. Links like these are already out in the world: staff "Open in OLR" buttons, flyers, bookmarks and emails. They keep pointing at the old addresses after a portal moves to a new front end.

When a portal moves, nFocus keeps its address and sends {host}/{client}/{org}/ to the new front end. So the front end receives legacy's links and should open the page each one meant. This guide maps every legacy page to the API calls that replace it.

The pages

Legacy page What to show API
#/activities/{id} The activity GET /v1/portals/{clientToken}/{orgToken}/activities/{id}
#/activities/groups/{id} The activity group, to pick sessions GET …/activity-groups/{id}
#/search, #/search/enroll, #/search/membershipenroll, #/search/summary, #/search/checkout, #/shoppingcart The catalog, the cart or checkout GET …/activities, GET …/cart, POST …/checkout
#/memberships, #/editmembershipdate Memberships; a membership's start date GET …/memberships, GET …/memberships/{id}/eligibility
#/dashboard, #/, #/privacy_policy, #/terms_of_use Home; the policies GET …/config, GET …/content/{key}
#/donate Giving GET …/donations/options, a donation cart line or POST …/donations
#/login, #/register Sign in; create an account The hosted account pages (see Authentication)
#/forgotpassword, #/completeregistration The forgot-password page, with the address filled in See Reset and complete-registration links
#/changepassword Change password PUT …/me/password
#/account, #/household, #/participantform The household and its forms GET …/household, the forms endpoints
#/accountrecenttransactions, #/accountstatements Account history; statements GET …/account/transactions, GET …/account/statements
#/paymentmethods, #/paymentplan, #/autopayments Saved cards; the payment plan; automatic payments GET …/payment-methods, GET …/payment-plan, GET …/automatic-payments
#/receipt The family's orders GET …/orders/{id} (legacy kept the receipt in the browser, never in a link)
#/attendance, #/participant, #/householdtest, #/noaccess Home None: legacy's stubs and test pages

In ParentPortalOnly mode, legacy sent the catalog, cart, membership and donation pages to #/noaccess. The portal's configuration says whether that mode is on.

One activity

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

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

Legacy emailed #/forgotpassword?code=…&email=… to reset a password, and #/completeregistration?code=…&email=… to set the first one. The code is a legacy token this API can't read, and it expires within a day. Send the family to the API's forgot-password page with the address filled in:

/account/{clientToken}/{orgToken}/forgot-password?email={email}

Signing in on both systems

The new front end and legacy OLR share logins but not sessions. A family who moves between the moved portal and a legacy sibling portal signs in again.

What nFocus changes at the switch

Moving a portal also needs a few row values in the client database, the proxy rule and the API's settings. nFocus makes those changes from the go-live checklist (docs/operations/pilot.md in this repository).