Component API Reference
API reference for working with product components, packages, and bundles in Omnium.
This page documents the API endpoints and patterns for working with product components.
Product Endpoints with Components
Get Product
Retrieve a product including its components.
Response with Components
Get Raw Product
Retrieve raw product data as stored.
Returns product with all component data exactly as stored.
Creating Package Products
Create Package
Create Bundle
Component Fields
Required Fields
| Field | Type | Description |
|---|---|---|
componentId | string | Unique identifier within the package |
productId | string | Product ID of the component |
quantity | decimal | Quantity in the package |
Optional Fields
| Field | Type | Description |
|---|---|---|
skuId | string | Specific variant SKU |
options | array | Selectable variants |
isRequired | bool | Component is required |
componentName | string | Display name for selection UI |
Component Options
Option with Price Offset
Option with ProductId Only
Allows customer to select any variant of the specified product.
Updating Components
Replace All Components
Add Component to Existing Package
Fetch product, modify components array, and update:
Searching for Packages
Find Packages Containing Product
Find all packages that include a specific component product.
Search by Component SKU
Order Endpoints with Components
Add Package to Order
With auto-breakdown enabled, this creates:
- Package line item
- Component line items linked to package
Add Package to Cart
Response Models
OmniumProductComponent
The API returns components using the public model:
OrderLine with Package Info
Common Patterns
Create Package with All Features
Variant Package
Create a variant that is a package:
Error Handling
Common Errors
| Error | Cause | Solution |
|---|---|---|
| Component product not found | Invalid productId | Verify component product exists |
| Invalid component SKU | SKU doesn't exist on product | Check variant SKUs |
| Missing componentId | ComponentId not provided | Add unique componentId |
| Circular reference | Package contains itself | Remove self-reference |
Validation
The API validates:
- Component products exist
- SKUs belong to the specified products
- No circular references in nested packages
- Required fields are present
