@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
| Method | Path | Description |
|---|---|---|
| GET | /organizations/{organizationId}/endpoints | List 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
- createCustomApisClient for instantiation
- Custom APIs Reference