**版本：202601**

# 创建集合关联

**POST** `/openapi/2026-01/collects`

将商品关联到指定集合。

## 请求

**application/json**

**请求体 | 示例**

**请求体 (required)**

- `collect` object (required)

  关联记录（商品-集合关系）

  - `collection_id` string (required)

    集合 ID
  - `product_id` string (required)

    商品 ID

```json
{
  "collect": {
    "collection_id": "string",
    "product_id": "string"
  }
}
```

## 响应

**200**

OK

**application/json**

**数据结构 | 示例**

**数据结构**

- `code` string

  错误码
- `message` string

  错误信息
- `data` object

  - `collect` object

    关联记录（商品-集合关系）

    - `id` string

      关联记录 ID
    - `collection_id` string

      关联集合的标识符
    - `product_id` string

      关联商品的标识符
    - `position` int64

      商品在集合中的位置
    - `created_at` string

      关联记录的创建时间
    - `updated_at` string

      关联记录的最后更新时间

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "collect": {
      "id": "string",
      "collection_id": "string",
      "product_id": "string",
      "position": 0,
      "created_at": "string",
      "updated_at": "string"
    }
  }
}
```
