Eligibility from a backend
Asking whether an applicant is an eligible member of your frontend's community.
Some questions come before a sign-in, or without one: a booking form open to members only, a benefit someone applies for by phone, a check before an account is created. For these, your backend asks the Studio whether an applicant is an eligible member, by the member code and facts the applicant entered. The applicant need not be signed in, or be a frontend user at all.
The call
POST <studio>/api/v1/members/eligibility
Authorization: Bearer ofk_<prefix>_<secret>
X-Applicant-IP: 203.0.113.7
Content-Type: application/json
{
"memberCode": "108900",
"firstName": "Jürgen",
"lastName": "Weiß",
"birthDate": "1962-07-07"
}
- The body is the member code as the applicant typed it, their first and last name and their birth date (
YYYY-MM-DD): JSON, at most 4 KB. Other fields are ignored. X-Applicant-IPis the IP address of the applicant whose details you forward, one IPv4 or IPv6 address. It is required, because the rate limits count failed checks per applicant network. It is a header of its own because a proxy in front of the Studio may overwriteX-Forwarded-Forwith your backend's address.- No challenge code. Eligibility never asks for one, and a challenge code in the body is ignored.
The answer
{ "status": "valid", "claims": { "isAnnualSalaryAbove50k": true } }
status | Meaning |
|---|---|
valid | The applicant passes the membership check and lands in your frontend's community. The answer carries claims (below). |
not_valid | Not, for whatever reason: unknown member code, other facts, refused by the membership definition, or a member outside your community. |
unavailable | A register could not answer. Ask again later. |
A not_valid or unavailable answer is the status alone, { "status": "not_valid" }, whatever is released, so no failed answer tells one reason from another. For Pannoniqa, a retiree who asks through the Pannoniqa App (community "Active employees") gets not_valid, and the same request through the Pannoniqa Portal (community "All staff") gets valid.
Claims
A valid answer carries claims: the claims your organisation has released to your frontend in its settings under "Released claims", for example to price an offer for the applicant. They are the claims of the register entry that decided the check, by key, with the value as the register gives it: text, a number, true or false, or the register's null. A released claim the register does not give for this applicant is left out, so check for the key; a value that is a list or an object is left out too. With no claim released to your frontend, claims is {}.
Claims never change the answer's status: the check decides as if nothing were released, and only then are the deciding entry's claims read, from an internal register's entry or the external register that decided. A released claim whose value breaks its type is left out, and a claim that is not released is never read. If the deciding external register cannot give the claims at that moment, the answer is { "status": "valid", "claims": "unavailable" }: the applicant is eligible, ask again later for the claims. The check log never records claims.
A released claim is answered to anyone your backend asks about with a member code, names and birth date that match, so release only what such an answer may carry.
What happens in the Studio
Every call is a membership check in eligibility mode. The Studio walks the organisation's membership definition, asks its registers (an external register live, for up to 5 seconds), compares the facts and places the result in your frontend's community. The check is written to the check log with your frontend and the applicant's IP; the facts are never stored. Nothing else changes: no account, no organisation membership, no frontend activation.
Rate limits
Failed checks are limited, so the endpoint cannot be used to guess member codes:
- 5 per member code, and 20 per applicant network (the IPv4 address, or the IPv6 /64), in 15 minutes;
- 500 per frontend in an hour.
Beyond them the answer is 429 {"error": "rate_limited"}. See Results, rate limits and errors for what counts.