@comms-id/apra-registered-financial-corporation-lookup
Typed client for the Comms.ID APRA list of registered financial corporations API (https://api.comms.id/apra-registered-financial-corporation-lookup/v1): look up an ABN on APRA's published list, or search it by the start of a name (#715).
src/ is generated from the contract (packages/apra-registered-financial-corporation-lookup-service/openapi/apra-registered-financial-corporation-lookup.v1.json) by @comms-id/forge-transformers. Do not edit it: change the contract and run pnpm --filter @comms-id/forge-transformers generate. src/local/profile.ts is the only hand-written part.
import { createApraRegisteredFinancialCorporationLookupClient } from "@comms-id/apra-registered-financial-corporation-lookup/server";
const client = createApraRegisteredFinancialCorporationLookupClient({
clientId: process.env.COMMS_ID_CLIENT_ID!,
privateJwk: JSON.parse(process.env.COMMS_ID_PRIVATE_JWK!),
});
const reply = await client.lookup({ abn: "45114248458" });
COMMS_ID_PRIVATE_JWK is an ML-DSA-87 private JWK (kty AKP, with priv and pub). The server entry needs Node.js 24.7 or later, or a Cloudflare Worker with the compatibility flag webcrypto_modern_algorithms.
Operations
lookup: one ABN.outcomeismatchwith the fact, orno-match, which means only that the ABN is not on APRA's published page.search: the start of a name, case, accents and punctuation ignored; ten records by default, at most fifty, withtruncatedwhen there are more.
Every fact carries source, observedAt, sourceDate (the page's own "Updated" date) and attribution, and every reply carries the page's note that it is not the list for s11(4) of the Financial Sector (Collection of Data) Act 2001.
Test it first
createApraRegisteredFinancialCorporationLookupFixtureClient() from @comms-id/apra-registered-financial-corporation-lookup/fixtures answers from the contract's own examples with no network. To call the TEST service, pass environment: "test".
What the field does
- A name: after the user pauses, it suggests corporations (name, ABN, category or exempted) from APRA's published list of registered financial corporations. The search already returns each whole record, so choosing one needs no second call. Rows that APRA publishes without an ABN are found this way only.
- An ABN: eleven digits (spaces allowed) are checked in the browser and looked up at once. A wrong length or checksum is refused and nothing is sent.
- An exempted corporation is shown as "Exempted from registration", never as registered (FSCODA s7(2)(j)).
- "Not on APRA's published list of registered financial corporations." and "Financial corporation lookup is unavailable" are different messages. Not on the page is not proof that a corporation is unregistered: APRA's legal list is the one it publishes in the Gazette (s11(4)).