> For the complete documentation index, see [llms.txt](https://docs.archisketch.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.archisketch.com/guide/dev-en/api-sdk/api-integration/3d-product-integration/component.md).

# Register Component

A component is a unit of parts configured based on modeling. Use the modeling ID created in the previous step to create a component. The generated component ID will be used later for [Product creation](/guide/dev-en/api-sdk/api-integration/3d-product-integration/product.md).

You must include the `X-API-KEY` in the header of all API requests. Refer to the ["How to Use the API"](/guide/dev-en/api-sdk/how-to-use.md) guide for instructions on how to issue it.

```http
X-API-KEY: {x-api-key}
```

## Create Component

**POST** `/api/v1/components`

{% stepper %}
{% step %}

### Prepare Required Information

The following information is required when creating a component:

* `modelingId`: The modeling ID created in "Registering Modeling".
* `dimension`: The actual dimensions of the component (in mm or inches).
* `translatedNames`: A list of multilingual names (language code + name).

| Field           | Type    | Required | Description                                  |
| --------------- | ------- | -------- | -------------------------------------------- |
| name            | string  | ✅        | Name                                         |
| translatedNames | array   | ✅        | Multilingual name list                       |
| dimension       | object  | ✅        | Dimensions (in mm/inch)                      |
| isFinal         | boolean | ✅        | Whether it is a final part                   |
| childComponents | array   | ✅        | Child component list                         |
| codeRelations   | array   | ✅        | Code relation list                           |
| images          | array   | ✅        | Image URL list (can be an empty array `[]`)  |
| modelingId      | string  |          | Modeling ID                                  |
| code            | string  |          | Code                                         |
| brandCode       | string  |          | Brand code                                   |
| sku             | string  |          | SKU                                          |
| retailPrice     | object  |          | Retail price                                 |
| factoryPrice    | object  |          | Factory price                                |
| isPersonal      | boolean |          | Whether it is uploaded to a personal library |
| category        | object  |          | Category                                     |
| {% endstep %}   |         |          |                                              |

{% step %}

### Send Request

```json
POST /api/v1/components
X-API-KEY: {x-api-key}

{
  "name": "Sofa",
  "translatedNames": [
    { "code": "en", "value": "Sofa" },
    { "code": "ko", "value": "소파" }
  ],
  "dimension": {
    "mm": {
      "width": 900,
      "depth": 800,
      "height": 750
    }
  },
  "isFinal": true,
  "images": ["https://..."],
  "childComponents": [],
  "codeRelations": [],
  "modelingId": "mdl_abc123"
}
```

{% endstep %}

{% step %}

### Check Response

```json
{
  "result": "SUCCESS",
  "data": {
    "id": "cmp_def456",
    "enterpriseId": "ENT_ABC123",
    "userId": "usr_xyz",
    "name": "Sofa",
    "translatedNames": [
      { "code": "en", "value": "Sofa" },
      { "code": "ko", "value": "소파" }
    ],
    "modelingId": "mdl_abc123",
    "isFinal": true,
    "isRaw": false,
    "dimension": {
      "mmWidth": 900,
      "mmDepth": 800,
      "mmHeight": 750,
      "inchWidth": 35.4,
      "inchDepth": 31.5,
      "inchHeight": 29.5
    },
    "previewImage": null,
    "images": [],
    "hdViewerAssets": [],
    "childComponents": [],
    "categories": [],
    "createdAt": "2026-04-04T10:01:00Z",
    "updatedAt": "2026-04-04T10:01:00Z"
  }
}
```

> 📌 Note: Please save the `data.id` value. It will be used for [Product Creation](/guide/dev-en/api-sdk/api-integration/3d-product-integration/product.md) in the next step.
> {% endstep %}
> {% endstepper %}

## Get Component List

**GET** `/api/v1/components`

| Parameter  | Type    | Required | Description                 |
| ---------- | ------- | -------- | --------------------------- |
| offset     | integer | ✅        | Page number (starts from 0) |
| limit      | integer | ✅        | Page size (1–100)           |
| categoryId | string  |          | Category ID filter          |
| name       | string  |          | Name search keyword         |
| sortType   | string  |          | Sorting criteria            |

```http
GET /api/v1/components?offset=0&limit=20
X-API-KEY: {x-api-key}
```

## Get Single Component

**GET** `/api/v1/components/{id}`

```http
GET /api/v1/components/cmp_def456
X-API-KEY: {x-api-key}
```

## Update Component Basic Info

**PATCH** `/api/v1/components/{id}`

| Field           | Type   | Required | Description       |
| --------------- | ------ | -------- | ----------------- |
| name            | string | ✅        | Name              |
| translatedNames | array  | ✅        | Multilingual name |
| dimension       | object | ✅        | Dimensions        |

## Get Flat BOM

**GET** `/api/v1/components/{id}/bom`

Retrieve the flattened BOM (Bill of Materials) structure of the component. If a component consists of multiple sub-parts, you can check the entire structure at once.

```http
GET /api/v1/components/cmp_def456/bom
X-API-KEY: {x-api-key}
```

## Upload Assets

**POST** `/api/v1/components/{id}/assets`

Upload asset files, such as images, to the component.

| Field     | Type   | Required | Description |
| --------- | ------ | :------: | ----------- |
| assetType | string |     ✅    | Asset type  |
| files     | array  |     ✅    | File list   |
