返回 Skill 列表
extension
分类: 其它需要 API Key

bee-products-create

基于‘Bee Website Builder’开放API的产品创建技能,用于在指定站点语言和产品组下创建新产品。

person作者: mouxiaminghubclawhub

bee-products-create

Version: 2.0.0

Overview

Use the Bee Website Builder Open API to create a new product.

Supports creating products under a specified language and product group, with images, attributes, tags, brief description, and detailed description.


Input Parameters

api_key (string, Required)

API authentication key used to identify the caller and control interface access permissions.

  • Get it from: https://open.tradew.com
  • Used for API permission validation

language (string, Required)

Publish to the enabled language of the specified enabled site.

⚠️ Must be selected manually from the list returned by bee-languages-get. AI inference or automatic generation is not allowed.


products (object, Required)

Product information.

products.productsgroup_id (integer, Required)

Product group ID.

⚠️ Only leaf groups where is_leaf === true should be selected.
Non-leaf groups should be filtered out and not used. See the product group API for details.

products.product_name (string, Required)

Product name, up to 300 characters.

products.model (string, Optional)

Product model, up to 50 characters.

products.upload_images (array, Optional)

Image upload list, up to 5 images. The first image is the main image.

Each item contains:

| Field | Type | Description | |----------|--------|-------------| | name | string | Image name | | base64 | string | Base64 image data, for example image/jpeg;base64,.... Each image must be 500 kB or smaller. |

products.attributes (array, Optional)

Attribute list, up to 15 items.

Each item contains:

| Field | Type | Description | |---------|--------|-------------| | name | string | Attribute name, up to 100 characters | | value | string | Attribute value, up to 100 characters |

products.tags (array, Optional)

Keyword tag list, up to 6 items. Each tag must be 50 characters or fewer.

products.brief_description (string, Optional)

Brief description in plain text, up to 127 characters.

products.description (string, Optional)

Detailed description in HTML, up to 100,000 characters.


Output Structure

Top-Level Structure

| Field | Type | Description | |--------|--------------|----------------| | status | boolean | Request status | | msg | string | Response message | | data | object/null | Returned data |

data

| Field | Type | Description | |---------------|---------|---------------------| | products_id | integer | Created product ID |


Dependencies

| Parameter | Dependency skill | Field source | Mode | |-----------------------------|-------------------------|-------------------------|--------| | language | bee-languages-get | list[].language | select | | products.productsgroup_id | bee-productsgroup-read | list[].productsgroup_id | select (filter: is_leaf=true) |


Usage Example

{
  "api_key": "your-api-key",
  "language": "en",
  "products": {
    "productsgroup_id": 3445,
    "product_name": "product name",
    "model": "A1386",
    "upload_images": [
      {
        "name": "image1",
        "base64": "image/jpeg;base64,..."
      }
    ],
    "attributes": [
      {
        "name": "color",
        "value": "red"
      }
    ],
    "tags": ["tags 1", "tags 2"],
    "brief_description": "brief description",
    "description": "detailed description"
  }
}

Response Example

{
  "status": true,
  "msg": "create successfully",
  "data": {
    "products_id": 8
  }
}