Client Setup
Configure the Simplio3D client with various options.
Client Configuration
import { createSimplio3DClient } from '@simplio3d/sdk';
const client = createSimplio3DClient({
apiUrl: 'https://your-project.supabase.co/functions/v1/make-server-0532dd87',
accessToken: 'YOUR_ACCESS_TOKEN', // JWT from Supabase Auth
apiToken: 'YOUR_API_TOKEN', // Alternative: API token from Profile > API/SDK
timeout: 30000, // Request timeout (ms)
retryAttempts: 3, // Retry on network errors
onError: (error) => {
console.error('API Error:', error);
}
});Error Handling
import { AuthenticationError, NotFoundError, ValidationError } from '@simplio3d/sdk';
try {
const project = await client.getProject('project_123');
} catch (error) {
if (error instanceof NotFoundError) {
console.error('Project not found');
} else if (error instanceof AuthenticationError) {
console.error('Session expired - redirect to login');
} else if (error instanceof ValidationError) {
console.error('Invalid data:', error.details);
} else {
console.error('Error:', error.message, 'Code:', error.code);
}
}Continue reading
ProjectsList, read, create, update, and delete projects, with automatic decompression of large scenes.Option BlocksCreate and manage the 16 option block types and their variants from headless code.Conditional LogicAuthor and evaluate show / hide / disable rules across blocks, variants, and 3D parts.Pricing & CPQBuild CPQ pricing — base prices, price groups, tables, unique modular prices, variables, and formulas.
