Briefs Integration Guide
This guide explains how to integrate the Brief (packaging request) system. A brief represents a client’s packaging request containing one or more configured products with complete specifications.
Quick Start
Section titled “Quick Start”Essential Workflow
Section titled “Essential Workflow”- Create Brief:
POST /briefswith BriefElements containing product specs - Monitor Status: Poll
GET /briefs/:iduntilpredictionStatus: COMPLETEDandhasPrice: true - Get Complete Data:
GET /briefs/:id/detailsfor all pricing and logistics - Analyze Elements:
GET /briefs/:id/process/:elementIndexfor manufacturing details per element (0-indexed) - Cost Analysis:
GET /briefs/:id/value-analysisfor comprehensive cost breakdown
Key Endpoints
Section titled “Key Endpoints”| Endpoint | Returns | Use Case |
|---|---|---|
POST /briefs | Brief with prediction | Create packaging request |
GET /briefs/:id/details | Complete brief + pricing | Get all data after processing |
GET /briefs/:id/process/0 | Manufacturing for element 0 | Detailed process for first product |
GET /briefs/:id/value-analysis | Cost breakdown | Analyze pricing and optimization |
Core Entities Overview
Section titled “Core Entities Overview”1. Brief
Section titled “1. Brief”Root entity representing a packaging request/quote.
Key Properties: id, code, name, predictionStatus, hasPrice, packingType, palletType
Property Groups: Core identifiers, Packing configuration, Pallet configuration, CAD Status, Prediction tracking
Main Relationships:
briefElements→ BriefElement[] (One-to-Many, required)briefComputed→ BriefComputed (One-to-One)predictionRequest→ BriefPrice (One-to-One)project→ Project,company→ CompanydeliveryAddress→ Address (Many-to-One)
2. BriefElement
Section titled “2. BriefElement”Configured product within a brief with complete specifications.
What It Contains:
- Dimensions: Length, width, height, layout configurations
- Materials: Material types, grammage, corrugated compositions
- Decoration: Printing details, colors, decoration quantities
- Finishes: Lamination, varnish, hot stamping, embossing
- Quantity: Production quantities per decoration variant
Key Properties: id, briefId, position (for retrieving computed data), productId, decorationsCount (required)
Main Relationships:
brief→ Brief (Many-to-One)briefElementPrice→ BriefElementPrice (One-to-One)
3. BriefComputed
Section titled “3. BriefComputed”Computed product formulas and CAD design results. Does NOT include pricing.
What It Contains:
- Computed product formulas and CAD design results
- Logistics calculations (packing, pallets, delivery)
- Standard formula execution for CAD-based products
Key Properties: Packing/pallet types, delivery costs, logistic costs
Main Relationships:
brief→ Brief (One-to-One)briefElements→ BriefElementComputed[] (One-to-Many)
4. BriefElementComputed
Section titled “4. BriefElementComputed”Computed data for individual brief elements.
What It Contains:
- Computed dimensions (flat pack surface, CAD measurements)
- CAD integration data (design keys, project keys)
- Decoration summary and finishing data
- Production data and overhead rates
Key Properties: position (matches BriefElement position), computed dimensions, CAD keys
Main Relationships:
briefComputed→ BriefComputed (Many-to-One)
Note: Use
positionto link with BriefElement:briefComputed.briefElements[position]matchesbrief.briefElements[position]
5. BriefPrice (PredictionRequest)
Section titled “5. BriefPrice (PredictionRequest)”Pricing and prediction data for a brief.
What It Contains:
- Total price, product cost, tooling cost, delivery cost
- Detailed cost breakdown by category
- Production time and process count
- Manufacturing process (PredictionRequestComputed)
Key Properties: totalPrice, productCost, toolingCost, deliveryCost, costBreakdown, productionTime
Main Relationships:
brief→ Brief (One-to-One)predictionRequestComputed→ PredictionRequestComputed[] (One-to-Many)
6. PredictionRequestComputed
Section titled “6. PredictionRequestComputed”Computed manufacturing process data for individual brief elements.
What It Contains:
- Manufacturing process sequences and operations
- Machine operation rates and provider services
- Detailed cost breakdowns by operation category
- Sheet layout calculations and production metrics
- Optimization recommendations
Key Properties: id, position (matches BriefElement position), unitPrice, productionTime, costBreakdown, costSummary
Main Relationships:
predictionRequest→ BriefPrice (Many-to-One)predictionMachineOperationRates→ PredictionMachineOperationRate[] (One-to-Many)predictionOperationSequence→ PredictionOperation[] (One-to-Many)
Note: Retrieved via
GET /briefs/:id/process/:positionendpoint using the element’s position (0-indexed)
7. BriefElementPrice
Section titled “7. BriefElementPrice”Simple pricing data for individual brief elements.
What It Contains: Unit price and quantity for element-level costs
Key Properties: unitPrice, quantity
8. Project
Section titled “8. Project”Groups briefs and quotes for a business opportunity.
Key Properties: id, code, name, companyId, statusId
Main Relationships: briefs → Brief[], company → Company
9. Company
Section titled “9. Company”Client organization.
Key Properties: id, code, name
Main Relationships:
Entity Relationships Diagram
Section titled “Entity Relationships Diagram”Company ├─── Projects (optional) │ ├─── Briefs │ │ ├─── BriefElements │ │ │ └─── BriefElementPrice │ │ ├─── BriefComputed │ │ │ └─── BriefElementComputed (one per element) │ │ └─── BriefPrice (PredictionRequest) │ │ └─── PredictionRequestComputed (one per element) │ │ └─── PredictionOperation (sequence) │ │ │ └─── Quotes & more │ └─── Briefs (direct, especially when project feature is not enabled) & moreWorkflow Examples
Section titled “Workflow Examples”1. Create and Process a Brief
Section titled “1. Create and Process a Brief”# Step 1: Create briefPOST /briefs{ "name": "Custom Folding Carton", "projectId": "uuid", "companyId": "uuid", "briefElements": [{ "position": 0, "productId": "uuid", "lengthDimension": 200, "widthDimension": 150, "heightDimension": 80, "decorationsCount": [{"quantity": 5000, "decorationIndex": 0}], ... }]}
# Step 2: Monitor statusGET /briefs/:id# Wait until predictionStatus: COMPLETED and hasPrice: true
# Step 3: Get complete dataGET /briefs/:id/details
# Step 4: Get manufacturing details for first elementGET /briefs/:id/process/0
# Step 5: Get cost breakdownGET /briefs/:id/value-analysis2. Multiple Products in One Brief
Section titled “2. Multiple Products in One Brief”POST /briefs{ "briefElements": [ { "position": 0, "productId": "uuid-carton", ... }, { "position": 1, "productId": "uuid-box", ... } ]}
# Access each element's manufacturing:GET /briefs/:id/process/0 # First productGET /briefs/:id/process/1 # Second product3. ERP Sync
Section titled “3. ERP Sync”# Incremental syncGET /briefs?lastupdate=2024-01-15T10:30:00Z&order=+updatedAt&limit=100
# Filter by companyGET /briefs?companyId=uuid-of-company
# Filter by statusGET /briefs?status=uuid-status-1,uuid-status-2Key Integration Points
Section titled “Key Integration Points”Position Property
Section titled “Position Property”The position property in BriefElement is critical for data retrieval:
// Link BriefElement with BriefElementComputedconst element = brief.briefElements[0]; // position: 0const computed = brief.briefComputed.briefElements[0]; // Matches position: 0
// Access manufacturing processGET /briefs/:id/process/0 // Uses element positionPricing vs Computed Data
Section titled “Pricing vs Computed Data”- BriefComputed: Product formulas, CAD results, logistics (NO pricing)
- BriefPrice: All pricing information, cost breakdowns, margins
Required Fields
Section titled “Required Fields”briefElementsarray is required (min: 1 element)decorationsCountis required for each BriefElementpositionmust be unique within each brief (0-indexed)
API Endpoints Summary
Section titled “API Endpoints Summary”| Endpoint | Purpose |
|---|---|
POST /briefs | Create brief (synchronous) |
POST /briefs/async | Create brief (soon: asynchronous) |
GET /briefs | Get paginated briefs |
GET /briefs/:id | Get basic brief data |
GET /briefs/:id/details | Get complete brief with all relations |
GET /briefs/:id/process/:elementIndex | Get manufacturing for specific element |
GET /briefs/:id/value-analysis | Get cost breakdown and optimization |
GET /briefs/:id/prediction-panel | Get prediction display data |
PUT /briefs/:id | Update brief |
DELETE /briefs/:id | Soft delete brief |
Additional Resources
Section titled “Additional Resources”- Brief Entity Reference - Complete Brief entity documentation
- Quote System Guide - Quote management
- Webhook Guide - Real-time event integration
- API Reference - Complete API documentation
- Create Access Token - Authentication setup
For detailed property lists, schemas, and advanced use cases, refer to the individual entity documentation pages linked above.