Skip to main content

Client

The Client object is your company's own profile as the API sees it β€” the account behind the credentials you authenticated with. getMyClient is the one method here: a read of your own record, nothing to configure or list.

getMyClient()​

Reads the company tied to the authenticated credentials.

Signature​

getMyClient(): Promise<MyClient>

Parameters​

None. The company is resolved from the authenticated token β€” there is no ownerId to pass.

Returns​

MyClient:

FieldTypeMeaning
client.idstringClient record id.
client.clientstringClient identifier string.
client.namestringCompany name.
client.isActivebooleanWhether the client is active.
client.permissionsstring[]Permissions granted to this client.
fundingRecord<string, unknown> | nullOpaque funding configuration object; null when unset. Its shape is not documented on this page.

Example​

import {
RetornaClientBuilder,
RetornaEnvironment,
} from "@retorna-tech/retorna-gateway-sdk";

const client = new RetornaClientBuilder()
.environment(RetornaEnvironment.SANDBOX)
.clientId(process.env.RETORNA_CLIENT_ID!)
.clientSecret(process.env.RETORNA_CLIENT_SECRET!)
.privateKey(process.env.RETORNA_PRIVATE_KEY!)
.buildClient();

const me = await client.getMyClient();
console.log(me.client.name, me.client.isActive);

Errors​

From the API (RetornaB2BError, see the error catalog):

  • B2B_UNAUTHORIZED β€” credentials, token, or signature rejected.
  • B2B_COMPANY_NOT_FOUND β€” no company is associated with the credentials used.

Notes​

  • getMyClient() reads the company tied to your credentials β€” one credential set maps to exactly one company.
  • Its response is camelCase, unlike the rest of this API's snake_case contract β€” it passes the underlying record through largely as-is.

API reference​

No public API reference page exists for /me/client β€” its data comes from your onboarding record rather than a documented endpoint.