SKUs & Products
SKUs are the atomic unit of the PrintStudio product catalog. Every printable product is pre-costed as a SKU — the pricing engine computes margins before any order is placed.
SKU Schema
Section titled “SKU Schema”A SKU specifies everything needed to produce and price a product:
{ id: string; // e.g. "sku-pla-black-20mm-cube" name: string; // Human-readable name description: string; machineType: "fdm_large" | "fdm_standard" | "resin" | "laser"; material: string; // Material ID estimatedPrintTime: number; // minutes estimatedMaterialGrams: number; basePrice: number; // Floor cost in USD qualityTiers: { draft: { multiplier: number }; standard: { multiplier: number }; fine: { multiplier: number }; }; options: Array<{ key: string; label: string; type: "select" | "number" | "boolean"; choices?: string[]; priceModifier?: number; }>; active: boolean;}List SKUs
Section titled “List SKUs”# All active SKUscurl http://localhost:8787/api/skus \ -H "X-API-Key: your-api-key"
# Filter by machine typecurl "http://localhost:8787/api/skus?machineType=fdm_large" \ -H "X-API-Key: your-api-key"
# Include inactive SKUscurl "http://localhost:8787/api/skus?includeInactive=true" \ -H "X-API-Key: your-api-key"Get a SKU
Section titled “Get a SKU”curl http://localhost:8787/api/skus/sku-pla-black-20mm-cube \ -H "X-API-Key: your-api-key"Create a SKU
Section titled “Create a SKU”curl -X POST http://localhost:8787/api/skus \ -H "Content-Type: application/json" \ -H "X-API-Key: your-admin-key" \ -d '{ "name": "PLA Enclosure Panel", "description": "Flat 3mm PLA panel for enclosure walls", "machineType": "fdm_large", "material": "pla", "estimatedPrintTime": 180, "estimatedMaterialGrams": 85, "basePrice": 22.00, "qualityTiers": { "draft": { "multiplier": 0.8 }, "standard": { "multiplier": 1.0 }, "fine": { "multiplier": 1.4 } }, "options": [ { "key": "color", "label": "Color", "type": "select", "choices": ["black", "white", "grey", "red"] }, { "key": "thickness", "label": "Thickness (mm)", "type": "number", "priceModifier": 2.5 } ] }'Pricing Calculation
Section titled “Pricing Calculation”The pricing engine applies multipliers in order:
finalPrice = basePrice × qualityTierMultiplier × demandMultiplier (computed from recent order volume) × materialCostMultiplier (from current filament price) + rushSurcharge (if delivery < 48h) × batchDiscount (if quantity ≥ 5) + optionModifiersTo preview pricing for a specific configuration:
curl -X POST http://localhost:8787/api/skus/sku-uuid/quote \ -H "Content-Type: application/json" \ -H "X-API-Key: your-api-key" \ -d '{ "quantity": 3, "options": { "color": "black", "quality": "fine" }, "rush": false }'Deactivating a SKU
Section titled “Deactivating a SKU”Deactivated SKUs are hidden from the storefront but remain on existing orders.
curl -X PATCH http://localhost:8787/api/skus/sku-uuid \ -H "Content-Type: application/json" \ -H "X-API-Key: your-admin-key" \ -d '{ "active": false }'