Projects
Full CRUD for 3D projects. Types: configurator, viewer, cpq, ar-preview, embedded.
List Projects
const projects = await client.getProjects();
console.log(projects); // Project[]Get Project
const project = await client.getProject('proj_123');
console.log(project.name, project.type);
// Normalized scene access:
if (project.sceneData) {
console.log('Scene models:', project.sceneData.models?.length || 0);
} else if (project.sceneDataCompressed) {
// Runtime does not support decompression; consume compressed payload
console.log('Compressed scene payload:', project.sceneDataEncoding);
}Create Project
const newProject = await client.createProject({
name: 'Product Config',
type: 'configurator'
});
console.log(newProject.id);Update Project
// A `data` payload REPLACES the stored scene — it is not a deep merge.
// The project row has several writers (this SDK, the owner's editor, the AI
// Assistant, approved AI changes, agent workflows, MCP clients), so a write
// built from a stale read erases whatever landed in between.
//
// Send baseUpdatedAt (optional, additive) and the server refuses a stale
// write with 409 instead of applying it. Omit it for last-write-wins.
const current = await client.getProject('proj_123');
try {
const updated = await client.updateProject('proj_123', {
name: 'Updated Name',
data: { settings: { autoRotate: true } },
baseUpdatedAt: current.updatedAt,
});
} catch (error) {
if (error instanceof ConflictError) {
// Re-read at error.serverUpdatedAt and re-apply on top of the newer state.
}
}
// A partial update that carries no `data` (a rename) cannot clobber scene
// data and does not need a baseline.Delete Project
await client.deleteProject('proj_123');Large-Project Handling in SDK
client.getProject() normalizes optimized API variants so consumers use a stable shape.
- • Lifts scene payloads from project.data when needed.
- • Tries to decompress gzip-base64 scene data when runtime supports DecompressionStream.
- • Ensures camera vectors and scene settings have safe defaults.
Continue reading
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.Contact FormsManage contact forms and their 12 field types for lead capture and orders.
