Trax Platform APIv1

Errors and limits

Problem details

Errors use RFC 9457 problem details (application/problem+json) with a stable code and a traceId to quote when asking for help: it is the request's W3C trace id, which finds that request in nFocus's logs. Messages never echo what was sent.

{
  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.5",
  "title": "This registration portal was not found.",
  "status": 404,
  "code": "portal-not-found",
  "traceId": "4bf92f3577b34da6a3ce929d0e0e4736"
}

Invalid query values return 400 with code: "invalid-request" and an errors object listing each field:

A validation error

GET https://api.nfocus.solutions/v1/portals/riverbend/north/activities?days=Funday&page=0 → 400, problem details

curl
curl -s 'https://api.nfocus.solutions/v1/portals/riverbend/north/activities?days=Funday&page=0'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/portals/riverbend/north/activities?days=Funday&page=0');
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?days=Funday&page=0");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();
Status Code When
400 invalid-request A query value or body field is malformed, out of range or of the wrong type
401 invalid-site-key, site-secret-required A missing or wrong site key
401 token-for-another-portal A family token used on another Trax client's portal
401 sign-in-required The catalog's member filter without a family access token
401 (no body) A missing, expired or invalid bearer token; see the WWW-Authenticate header
403 site-key-mismatch, origin-not-allowed A key used for another portal or from another origin
403 email-not-verified A staff token without a verified email
404 portal-not-found, activity-not-found, activity-group-not-found, membership-not-found, content-not-found, asset-not-found, account-not-found Nothing published under that address
403 site-role-required (with requiredRole), support-required, template-locked Organization site: the call needs a higher role, nFocus support, or an unlocked template
403 admin-role-required, admin-write-required, admin-mfa-required nFocus admin: the token has no admin role, only the read-only one, or lacks multi-factor sign-in
403 setting-locked (with keys) Organization site: nFocus has locked these registration settings for the portal
403 organization-role-required (with requiredRole), peer-role, support-read-only, branding-locked Organization site: the call needs a higher organization role, removes another Organization Admin on the same organization, comes from the read-only support role, or changes branding an organization above locked
403 capability-locked (with keys) Organization site: nFocus decided these capabilities, or an organization above locked them
404 capability-off (with capability) The website: this kind of content or registration is turned off here. Guest carts and their merge too
404 organization-not-found, report-grant-not-found Organization site: no organization of yours at that address, or no report grant with this id
409 capability-off (with capability) A change or a family's action needs a capability that is turned off here (including Organization Admins setting up a site where nFocus turned child sites off)
422 video-not-accessible (with missing) Organization site: a video can't be public without a thumbnail, captions and audio description (or a transcript)
409 reference-not-published (with videoIds) Organization site: the post places videos that aren't published
404 video-not-found, contact-not-found No published video with that id on the website, or no video or contact with that id on the site
409 template-not-allowed, report-grant-exists, organization-site-unknown, capabilities-changed, site-disabled nFocus doesn't offer the template to the organization's sites, the email already has that report grant, the organization site's address isn't set yet, someone changed the same capabilities at the same moment, or nFocus turned the portal's site off (onboarding)
404 site-not-found, post-not-found, location-not-found, staff-not-found, announcement-not-found, alert-not-found, media-not-found, user-not-found, revision-not-found, domain-not-found Organization site and website content: nothing there, or not on a site you have a role on. The domain lookup answers site-not-found for a host that serves no website
404 org-role-not-found nFocus admin: no organization role with this id
404 client-not-found, portal-not-found, origin-not-found, role-not-found, staff-user-not-found, template-not-found, template-version-not-found, order-not-found nFocus admin: nothing with this id (a client the tenant directory doesn't list, an organization without a portal, no order with that receipt number or trace id)
404 log-event-not-found nFocus admin: no troubleshooting event has this id (events are kept 90 days)
404 report-not-found Reports: no report with this key for you (GET …/reports lists them)
404 report-scope-not-found Reports: you have no report access to this site or organization, or it is in another client
422 report-too-large Reports: more than 400 days (92 by day), longer than 20 seconds, or more than 50,000 rows to export; the detail says what to narrow
404 image-not-found, preview-not-found A template thumbnail that isn't there, or a template preview link that isn't valid or has expired
404 household-not-found, member-not-found, document-not-found Household: the sign-in has no household, or the person or document isn't in yours (another family's ids are never found)
409 conflict The account changed meanwhile, or the new email can't be used
409 member-exists Someone with the same names, gender and birth date is already in the household
409 member-in-checkout The member has answers waiting in the checkout forms step; check out or remove their lines first
409 donations-off The portal takes no donations online
400 designation-not-found A gift's designation isn't this portal's, isn't published, or doesn't exist (the field is in errors)
409 designation-changed Checkout: where the gift goes, or the amount it takes, changed since it went in the cart; review the cart
422 donation-amount A donation's new amount is outside the portal's limits (minimumCents, maximumCents)
404 statement-not-found No annual payment summary for that year (GET …/account/statements lists them)
402 card-declined Saving a card: the card failed verification with its bank
404 payment-method-not-found No saved card with this id is yours here
409 payment-method-in-use The card pays a payment plan or a scheduled automatic payment; change that card first
409 payment-methods-limit The person already keeps 10 saved cards
409 saved-cards-unavailable Cards can't be saved here yet (no vault customer for this person), or their stored cards disagree
404 payment-plan-not-found The account has no payment plan
409 payment-plans-off, payment-plan-custom-amounts-off The organization doesn't offer payment plans, or custom-amount plans, online
409 payment-plan-not-active Only an enabled plan's card can change
409 saved-card-needed (with laterCents) Checkout: later installments are paid automatically, so pay with a saved card or save this one
404 automatic-payment-not-found No automatic payment with this id is on your account
409 automatic-payment-cancel-off The organization doesn't let automatic payments be cancelled online
409 automatic-payment-not-scheduled, automatic-payment-pending The automatic payment already ran, failed or was cancelled, or runs within about a day
404 cart-person-not-found The checkout forms step: the member has no registration or membership in the cart
409 forms-incomplete (with forms) Checkout: a member's forms step is missing answers, a changed form, a waiver or a signature
409 form-changed, forms-busy The organization changed the form since it was loaded, or the same step was saved twice at once: load it again and save
409 already-invited, last-site-admin, media-in-use, site-already-provisioned, site-not-provisioned Organization site: the change would break a rule; the title says which
409 settings-changed Organization site: someone else changed the registration settings at the same moment; reload and try again
409 org-role-exists nFocus admin: the email already has a role on that organization; remove it first
409 lookup-not-unique nFocus admin: more than one order has that receipt number (every anonymous gift has the same one) or trace id; look it up by order id
409 origin-exists, origin-from-domain, too-many-origins nFocus admin: the site has that origin, the origin is one of its domains (it follows the domain), or the site has 20 origins
409 template-exists, template-version-exists, template-status-change, no-available-version nFocus admin: the key is taken, versions only go up, a template or version sites could choose can't go back to draft, or a template goes available only with an available version
409 site-not-duda, site-not-nfocus A Duda-only call on an nFocus site, or a domains or template website call on a Duda site
404 website-not-found GET P/website and …/site/sitemap: the portal's website isn't an nFocus site, or it hasn't published yet
404 service-category-not-found, service-not-found, schedule-entry-not-found, impact-number-not-found, outcome-not-found, quote-not-found, value-not-found, pathway-not-found, sponsorship-not-found Organization site: nothing with that id on this site. The public reads answer location-not-found for an unknown location slug
409 website-template-needed, template-not-available An nFocus site's website: no template is chosen yet, or the version is a draft or retired
409 domain-taken, platform-domain-exists, too-many-domains, domain-not-active An nFocus site's domains: another website holds the host (its platform address or an active domain) or the site already lists it, the site already has a platform address or ten domains, or only an active domain can be primary
409 provider-unchanged nFocus admin: the site already uses that provider
413 request-too-large The request body is larger than the operation reads (an organization site image upload over 6 MB)
412 stale-version Someone saved this item since you loaded it (see Organization site: editing safely)
428 if-match-required Changing or deleting an organization site item needs its ETag in If-Match
502 duda-failed (with dudaCode) Duda refused a website change; detail has Duda's reason. Check it before retrying (some refusals, like an http feed address, fail every time)
429 rate-limited Too many requests
503 audit-unavailable nFocus admin: the call's audit row couldn't be written, so no data was returned. Retry shortly
503 documents-unavailable A signed form's PDF couldn't be made just now (checkout, participant form); nothing was saved or charged
503 tenant-unavailable This organization's Trax database can't be reached just now; other organizations aren't affected. Retry after the Retry-After header's seconds
503 not-ready A dependency is down (health checks)

Rate limits

Each client address gets a budget of requests per minute (600 by default), whatever site key it sends. Past it, the API answers 429 until the budget refills. The account pages' forms have a tighter budget per client address (20 a minute by default), and so do anonymous donations and their card tokens (5 a minute per client address, 60 a minute per portal). Each sign-in may enter 10 cards an hour to save or re-enter (each one is verified with the card's bank). An email address receives at most 5 account emails an hour (set-password and reset links, sign-up replies): past that, sign-up and forgot-password answer as usual but send nothing.

Health

GET /health answers while the process runs; GET /health/ready also checks the platform and master databases. One organization's database being down doesn't make the API unready: its calls answer 503 tenant-unavailable.