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.
  • 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: String
      • name: String
  • 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
  • status: String
    • Status of the component:
      • In use, discontinued, under development, or null.
  • 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.
  • factoryPrice: Object
    • Factory price details (same structure as retailPrice).
      • value: BigDecimal
      • unit: Enum
        • Currency units: KRW, USD, EUR, JPY, GBP, CNY, VND, TWD.
  • 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
  • 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 : String
      • url : String
  • images: Array of Object
    • List of all images associated with the component.
      • id : String
      • url : String
  • hdViewerAssets: Array of Object
    • Assets for HD viewer functionality.
      • id : String
      • url : String
  • dxfAsset: Object
    • DXF file asset information.
      • id : String
      • url : String
  • arAsset: Object
    • AR asset information for placing components in AR.
      • ios : Object
        • id : String
        • url : String
      • android : Object
        • id : String
        • url : String
  • editorSetting: Object
    • Settings for how the component behaves and is positioned in the editor.
      • usageCode : Int
      • usageName : 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 : Boolean
          • depth : Boolean
          • height : Boolean
      • door : Object
        • isOpen : Boolean
        • openDirection : Enum
          • PULL
          • PUSH
        • handlePosition : Enum
          • LEFT
          • RIGHT
  • childComponents: Array of Object
    • Details of child components used in assembly.
      • id : String
      • quantity : String
      • matrices : (2D) Array of Object
      • isRequired : Boolean
  • categories: Object
    • Category information.
      • categoryId : String
      • order : Int
  • 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 )