Let's look at an example of an open API for component of Archisketch.
Concept
A Component in Archisketch serves as the basic unit for constructing products. Each component is managed as an independent entity, and by combining multiple components, users can create new components or final products. The BoM (Bill of Materials) structure defines how each component is assembled and manages the relationships and combination rules among components.
Key Roles
Allows products to be managed as combinations of components, enabling flexible product creation and management.
- Component Assembly
- Supports combining multiple components. For example, a desk component can be created by assembling a tabletop and leg components. The information about how components are connected and positioned is defined using a transformation matrix, referred to internally as assembly.
- When a new component is created by combining components, the newly created component is defined as the parent, and the components used in the combination are defined as child.
- Supports combining multiple components. For example, a desk component can be created by assembling a tabletop and leg components. The information about how components are connected and positioned is defined using a transformation matrix, referred to internally as assembly.
- Combination Rules
- Specifies various rules within combinations, such as whether a component is mandatory and the minimum or maximum number of components allowed.
- Assets Associated with Components
PREVIEW_IMAGE
→ Preview image of the component- Can reference one of the modeling images or be set separately when creating the component.
IMAGE
→ Component images (up to 10).HD_VIEWER
→ File used for high-definition 360-degree viewing of the component by capturing 36 images from various angles.DXF
→ File used in the editor for placing components and extracting 2D views, serving as an alternative to a bounding box.AR_ANDROID, AR_IOS
→ Files used for placing components in augmented reality (AR).
Key Component Data Used in API Requests/Responses
id
: String- Unique identifier for the component.
enterpriseId
: String- Identifier for the company owning the component.
userId
: String- Identifier for the user.
code
: String- Component identifier used by the client company.
namespace
: String- Values: SET, ITM or ITEM, OPTN, or null.
color
: Object- Contains color information.
code
: Stringname
: String
- Contains color information.
name
: String- Name of the component.
translatedNames
: Array of Object- Stores component names by language.
- Each object includes:
code
: String- ko (Korean), en (English), zh (Chinese), ja (Japanese), vi (Vietnamese).
name
: String- localized name
- Each object includes:
- Stores component names by language.
status
: String- Status of the component:
- In use, discontinued, under development, or null.
- Status of the component:
sku
: String- SKU (Stock Keeping Unit) information.
retailPrice
: Object- Retail price details.
- value:
BigDecimal
- unit:
Enum
- Currency units: KRW, USD, EUR, JPY, GBP, CNY, VND, TWD.
- value:
- Retail price details.
factoryPrice
: Object- Factory price details (same structure as retailPrice).
- value:
BigDecimal
- unit:
Enum
- Currency units: KRW, USD, EUR, JPY, GBP, CNY, VND, TWD.
- value:
- Factory price details (same structure as retailPrice).
mainMaterial
: String- Identifier for the primary material
subMaterial
: String- Identifier for the secondary material.
rawMaterial
: String- Identifier for the raw material.
brandCode
: String- Brand code information.
dimension
: Object- Dimension details.
- mmWidth, mmDepth, mmHeight: BigDecimal
- inchWidth, inchDepth, inchHeight: BigDecimal
- Dimension details.
isRaw
: Boolean- Indicates whether the component is raw material.
isFinal
: Boolean- Indicates whether the component is a final product.
unit
: String- Unit of measurement.
version
: String- Version information.
modelingId
: String- Identifier for the modeling associated with the component.
previewImage
: Object- Preview image information.
id
: Stringurl
: String
- Preview image information.
images
: Array of Object- List of all images associated with the component.
id
: Stringurl
: String
- List of all images associated with the component.
hdViewerAssets
: Array of Object- Assets for HD viewer functionality.
id
: Stringurl
: String
- Assets for HD viewer functionality.
dxfAsset
: Object- DXF file asset information.
id
: Stringurl
: String
- DXF file asset information.
arAsset
: Object- AR asset information for placing components in AR.
ios
: Objectid
: Stringurl
: String
android
: Objectid
: Stringurl
: String
- AR asset information for placing components in AR.
editorSetting
: Object- Settings for how the component behaves and is positioned in the editor.
usageCode
: IntusageName
: String- Values: FLOOR_ITEM, STANDING_ITEM, WALL_ITEM, CEILING_ITEM, SWING_DOOR, etc.
showInEditor
: Boolean- Determines whether the component is visible in the editor.
dimensionLock
: Object- Specifies which dimensions are locked:
width
: Booleandepth
: Booleanheight
: Boolean
- Specifies which dimensions are locked:
door
: ObjectisOpen
: BooleanopenDirection
: Enum- PULL
- PUSH
handlePosition
: Enum- LEFT
- RIGHT
- Settings for how the component behaves and is positioned in the editor.
childComponents
: Array of Object- Details of child components used in assembly.
id
: Stringquantity
: Stringmatrices
: (2D) Array of ObjectisRequired
: Boolean
- Details of child components used in assembly.
categories
: Object- Category information.
categoryId
: Stringorder
: Int
- Category information.
createdAt
: LocalDateTime- Date and time of component creation.
- (e.g.
2024-09-30 04:16:56
)
updatedAt
: LocalDateTime- Date and time of the last modification
- (e.g.
2024-09-30 04:16:56
)