All Products
Search
Document Center

:Recommend

Last Updated:Mar 01, 2024

Queries the recommendation results of a specified instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

GET /v2/openapi/instances/{instanceId}/actions/recommend

Request parameters

ParameterTypeRequiredDescriptionExample
instanceIdstringYes

The ID of the instance.

airec-test001
sceneIdstringNo

The number of result entries to return. Valid values: 0 to 50.

test
userIdstringYes

The items used for related recommendations in specified scenes.

123
ipstringNo

The HTTP status code.

192.168.1.1
imeistringNo

The ID of the scene in which the item is to be recommended.

06e1565409c9fc4887036b974421****
returnCountintegerYes

The returned results.

10
itemsstringNo

The information about event tracking. The value of this parameter varies based on different items and needs to be uploaded together with the corresponding behavior data.

1001
serviceTypestringNo

The position at which the recommended item is displayed. The position number starts from 0. The return results are ranked by position. You can ignore this parameter.

1
userInfostringNo

The ID of the request.

1
rankOpenbooleanNo

N/A

true
recTypestringNo

The type of the recommended item.

gul
filterstringNo

The status of the execution.

eyJqb2luIjoiYW5kIiwiZmlsdGVycyI6W3siY29uZCI6ImNvbnRhaW4iLCJmaWVsZCI6InRhZ3MiLCJ2YWx1ZSI6IuWPjOS6uiJ9XX0.

Response parameters

ParameterTypeDescriptionExample
object
resultobject []

The unique ID of the user.

matchInfostring

N/A

xxx
traceIdstring

The status of the execution.

ali
positioninteger

The string for filtering during recommendation.

1
itemIdstring

The returned results.

123
itemTypestring

The ID of the recommended item.

item
traceInfostring

Specifies whether to perform personalized ranking based on the user IDs in the filtering and ranking phases.

"1007.62381.131491.100200300000000:bcb946ed-3f09-4e9b-bf4a-c19862f42231:792783::0:s101:::15:content___130788_stall:item:i2i_common_common:0.0205279946753756:null:null:1673258031504::context__recall_index=156,context__hour=17,context__trigger_num=2::C7EF99C9-6C55-5D45-A8D5-0754082E9DCF:hot_common,i2i_common_common,i2i_swing_common,hot_full:::::"
weightfloat

The weight of the recommended item.

1
flowWeightdouble

The ID of the device.

0
messagestring

The event tracking ID. This parameter is uploaded together with user behaviors on the recommended item. In this case, the value of this parameter is ali.

Successful
codestring

This parameter may be used in the debugging process. You can ignore this parameter.

200
requestIdstring

The weight of the specified process.

04707E49-642A-4649-827A-F8EEB07D4C27
messagestring

Queries the recommendation results of a specified instance.

"i2i_common_common;NotFound;1673254401;similar product/content of clicked ones;2023-01-09 16:53:21"

Examples

Sample success responses

JSONformat

{
  "result": [
    {
      "matchInfo": "xxx",
      "traceId": "ali",
      "position": 1,
      "itemId": "123",
      "itemType": "item",
      "traceInfo": "\"1007.62381.131491.100200300000000:bcb946ed-3f09-4e9b-bf4a-c19862f42231:792783::0:s101:::15:content___130788_stall:item:i2i_common_common:0.0205279946753756:null:null:1673258031504::context__recall_index=156,context__hour=17,context__trigger_num=2::C7EF99C9-6C55-5D45-A8D5-0754082E9DCF:hot_common,i2i_common_common,i2i_swing_common,hot_full:::::\"",
      "weight": 1,
      "flowWeight": 0,
      "message": "Successful"
    }
  ],
  "code": "200",
  "requestId": "04707E49-642A-4649-827A-F8EEB07D4C27",
  "message": "\"i2i_common_common;NotFound;1673254401;similar product/content of clicked ones;2023-01-09 16:53:21\""
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-03-20The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: strategy