All Products
Search
Document Center

Energy Expert:AISearchResourceAdd

Last Updated:Feb 13, 2026

Adds a structured element to an AISearch project. Supported element types include miniapp and product.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /api/v1/aiSearch/resource/add HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body.

type

string

Yes

The type of the structured element.

Valid values:

  • product :

    product

  • miniapp :

    mini program

miniapp

data

any

No

The information about the structured element that corresponds to the type parameter. Pass the value for this parameter in the specified JSON format.

If the type is miniapp:

  • miniappId: Required. The unique ID of the miniapp.

  • title: Required. The name of the miniapp.

  • version: Required. The version number.

  • description: Required. A brief description.

  • detailDesc: Optional. A detailed description.

  • slogan: Optional. The slogan.

  • icon: Required. The URL of the icon.

  • url: Required. The URL of the miniapp.

If the type is product:

  • title: Required. The name of the product.

  • description: Required. A description of the product.

  • icon: Required. The URL of the product icon.

  • url: Required. The URL of the product.

  • price: Required. The price.

  • extra: Optional. An extension field. An object that consists of any key-value pairs.

{ "miniapp_id": "test_miniapp", "title": "testApp", "version": "1.0.5", "description": "description-mock", "slogan": "slogan-mock", "icon": "https://img.alicdn.com/test_icon.png", "detail_desc": "detail-mock" }

The type parameter is an enumeration. Only the specified values are supported. If you specify an unsupported value, the API call fails. Additional structured content types will be supported in future releases.

Response elements

Element

Type

Description

Example

object

Schema of Response

requestId

string

Id of the request

4A0AEC56-5C9A-5D47-93DF-7227836FFF82

data

object

The data returned.

type

string

The type of the structured element. The value of this parameter is the same as the type parameter in the request.

Valid values:

  • product :

    product

  • miniapp :

    mini program

miniapp

resourceId

string

The ID of the structured element resource. This ID is the unique and immutable identifier of the resource in the database. Use this ID for subsequent modification, deletion, and query operations.

WzMGQZwB7nQEs3Qk3ajH

Examples

Success response

JSON format

{
  "requestId": "4A0AEC56-5C9A-5D47-93DF-7227836FFF82",
  "data": {
    "type": "miniapp",
    "resourceId": "WzMGQZwB7nQEs3Qk3ajH"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.