@salesforce/b2c-tooling-sdk / clients / ScapiSchemasClient
Type Alias: ScapiSchemasClient
ScapiSchemasClient =
Client<paths>
Defined in: packages/b2c-tooling-sdk/src/clients/scapi-schemas.ts:67
The typed SCAPI Schemas client for discovering available SCAPI APIs.
Common Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /organizations/{organizationId}/schemas | List available schemas |
| GET | /organizations/{organizationId}/schemas/{apiFamily}/{apiName}/{apiVersion} | Get specific schema |
Example
typescript
import { createScapiSchemasClient, 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 = createScapiSchemasClient(
{ shortCode: 'kv7kzm78', tenantId: 'zzxy_prd' },
auth
);
// List all available SCAPI schemas
const { data, error } = await client.GET('/organizations/{organizationId}/schemas', {
params: { path: { organizationId: toOrganizationId('zzxy_prd') } }
});See
- createScapiSchemasClient for instantiation
- SCAPI Schemas API Reference