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:
| Field | Type | Meaning |
|---|---|---|
client.id | string | Client record id. |
client.client | string | Client identifier string. |
client.name | string | Company name. |
client.isActive | boolean | Whether the client is active. |
client.permissions | string[] | Permissions granted to this client. |
funding | Record<string, unknown> | null | Opaque 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.