Skip to content
Seismic Orchestration

api.industries

Fetch the NAICS industry catalog: every code the KYB business.industry field accepts, each with its official Census title. Sorted ascending by code. Use it to drive an industry picker. A submission with a code outside this list is rejected as incomplete. Unauthenticated.

const  = await .();
const  = .(() => . === "513210");
// software?.title === "Software Publishers"

Arguments: none.

Returns: Promise<NaicsIndustry[]>.

REST endpoint: GET /industries.

Which flow do you need?

  • Building the picker from our catalog, so the business can only choose an accepted code? You are done โ€” use api.industries() above and nothing on this page applies.
  • Carrying NAICS codes from somewhere else โ€” your own picker, a Census table, a CRM field, a customer import? Read on. Roughly two-thirds of six-digit Census codes are outside the accepted catalog, so they have to be translated before you submit. Either let the client do it, which is a constructor option and no code, or resolve them yourself so the business can confirm the substitution.

Every 2022 Census code resolves. All 1,012 six-digit industries in the 2022 NAICS revision are covered: 303 are accepted as-is and the other 709 carry a mapping. The single exception is 999999 "Nonclassifiable Establishments" โ€” nothing in the catalog means "unclassifiable", so that one has no answer and the business has to choose a real industry. Handle it, and handle codes that aren't 2022 NAICS at all (typos, older vintages), but you will not hit a 2022 code we have simply never heard of. Every code on Bridge's industry list resolves too, so codes carried over from it need no special handling.

Letting the client apply the suggestion

The shortest path, and the one to reach for first: industryAutoApply lets the client substitute the accepted code and submit, so you can hand it a 2022 Census code and write no translation logic at all.

const  = .({
  : ..,
  : "high",
});
 
.. = ;
await ...();
settinghigh suggestionlow suggestionno suggestion
unset (default)throwsthrowsthrows
"high"appliedthrowsthrows
"all"appliedappliedthrows

"high" applies only same-industry-group suggestions โ€” the same kind of business, one code over โ€” so nothing gets misclassified. It still throws on the handful of low codes, which is the point: those are the ones worth a human.

"all" never blocks on a judgment call, and is the one to think about before reaching for. A low suggestion describes a materially different business, and we verify against whatever code arrives, so turning it on means some businesses get verified under an industry nobody chose. Reasonable when a batch job would otherwise halt on a code nobody will look at for a week; the wrong trade for a form with a human in front of it who could have answered in one click.

Under every setting, a code with no suggestion throws โ€” there is nothing to apply โ€” so keep one catch for 999999. And note that nothing in the response tells you a substitution happened: submit returns KybState, which carries no industry. Read it back with api.orgs.kyb.profile() (or api.customers.get(id)) if you need to record what was actually filed.

Translating a code you already have

Worth the extra code when there is a human in the loop: resolving up front lets you show a low-confidence substitution to the business and get a yes, instead of either blocking or applying it unasked. Three steps โ€” resolve, confirm, submit.

const  = await .();
let  = .;
 
if (!.) {
  if (!.) {
    // Nothing in the catalog describes this industry. The business has to
    // pick from api.industries() โ€” there is no answer to suggest.
    throw new (`No accepted industry matches ${.}`);
  }
  const  =
    . === "high" ||
    (await (
      `Is "${.}" a fair description of the business?`,
    ));
  if (!) throw new ("Industry needs to be chosen by hand");
   = .;
}
 
.. = ;
await ...();

Resolve while the business is filling the form, not after it submits โ€” the point is to put the substitution in front of whoever can confirm it. On confidence: "high" applying it automatically is reasonable. On confidence: "low" it is not: the suggestion is a related but materially different industry, and we verify the business against the code you send, so a silent swap means verifying a classification nobody chose.

The client will not make that swap for you. If a profile reaches a submit call still carrying an unaccepted code, it throws instead of guessing โ€” see Submitting an unsupported code.

api.resolveIndustry

Translate any NAICS code into one business.industry accepts. Accepted codes pass straight through; the rest come back with the closest accepted code and how good a match it is. The catalog is fetched once per client and cached, so calling this per keystroke is fine.

const  = await .("541512");
.; // true โ€” send it as-is
 
const  = await .("541511");
if (!.) {
  .; // "Software Publishers"
  .; // "541512"
  .; // "Computer Systems Design Services"
  .; // "high"
}

Arguments: code: string.

Returns: Promise<IndustryResolution> โ€” a union discriminated on supported:

supportedfieldsmeaning
truecodeSend it unchanged.
falsecode, title, suggested, suggestedTitle, confidenceNot accepted. Apply suggested once confirmed.
falsecode onlyNot accepted and nothing close enough to suggest. The business has to pick from the catalog.

Among 2022 Census codes, 999999 is the only one that lands in the last row. Anything we don't recognise at all โ€” a typo, a four-digit code, an older or future NAICS vintage โ€” lands there too.

confidence

valuewhat it meanswhat to do
"high"The suggestion sits in the same four-digit NAICS industry group and describes the same kind of business.Safe to apply automatically.
"low"No accepted code shares the industry group. The suggestion was chosen by hand and describes a related but materially different business.Show it to a human and get confirmation.

api.industryMappings

The raw catalog behind resolveIndustry โ€” { supported, mappings } in one response. Use it to build your own picker, to pre-translate a batch of codes offline, or to render "did you mean?" hints without a round trip per code.

const { ,  } = await .();
 
const  = new ();
const  = new (.(() => [., ] as ));
 
const  = .(() =>
  .() ?  : .()?.,
);

Arguments: none.

Returns: Promise<IndustryMappingsResponse>.

REST endpoint: GET /industries/mappings.

Submitting an unsupported code

The client refuses to send a KYB profile whose industry the API will not accept, throwing UnsupportedIndustryError before the request goes out. This is a backstop for the flow above, not a substitute for it โ€” by the time it fires, the business is no longer in front of you to confirm anything.

try {
  await ...();
} catch () {
  if ( instanceof ) {
    .; // the rejected code, as supplied
    .; // closest accepted code, or undefined
    .;
    .; // "high" | "low" | undefined
  }
}

The guard covers:

  • orgs.kyb.setProfile
  • orgs.kyb.submit
  • customers.create
  • customers.setProfile

It stays out of the way otherwise: an absent industry is the server's call, and if the catalog fetch fails the submission proceeds and the server decides. Pass industryGuard: false to the constructor to turn it off entirely โ€” worth doing only if you resolve codes yourself and would rather see the server's business.industry incompleteness error.

const  = .({ : false });