Developer Preview — This project is in active development. APIs may change. Provide feedback
Skip to content

@salesforce/b2c-tooling-sdk / clients / CustomApisClient

Type Alias: CustomApisClient

CustomApisClient = Client<paths>

Defined in: packages/b2c-tooling-sdk/src/clients/custom-apis.ts:61

The typed Custom APIs client for Custom SCAPI endpoint management.

Common Endpoints

MethodPathDescription
GET/organizations/{organizationId}/endpointsList all custom API endpoints
GET/organizations/{organizationId}/endpoints/{apiName}Get specific API info

Example

typescript
import { createCustomApisClient, toOrganizationId } from '@salesforce/b2c-tooling-sdk/clients';
import { OAuthStrategy } from '@salesforce/b2c-tooling-sdk/auth';

const auth = new OAuthStrategy({
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret',
});

const client = createCustomApisClient(
  { shortCode: 'kv7kzm78', tenantId: 'zzxy_prd' },
  auth
);

// List all custom API endpoints
const { data, error } = await client.GET('/organizations/{organizationId}/endpoints', {
  params: { path: { organizationId: toOrganizationId('zzxy_prd') } }
});

See

Released under the Apache-2.0 License.