商品详情
根据商品 ID 与索引名获取单条商品详情。
接口概览
| 方法 | GET |
|---|---|
| 路径 | /insight/product/details |
| 查询参数 |
id、indexName、_source(可选)
|
| Base URL 示例 | https://api.prophetes.ai |
| 完整 URL 示例 |
https://api.prophetes.ai/insight/product/details?id={id}&indexName={indexName}&_source={_source}
|
Demo 下载
下载我们的官方 Demo,快速将 Insight 搜索集成到您的应用中:
鉴权
| Header | 说明 |
|---|---|
x-insight-application-id |
应用 ID |
x-insight-api-key |
API Key |
Content-Type |
application/json |
查询参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
id |
string | 是 | 商品唯一 ID |
indexName |
string | 是 | 索引名称 |
_source |
string | 否 | 来源或需返回的字段控制(依服务端约定) |
响应结构
成功时返回商品 JSON
对象,字段示例(节选):objectID、title、price、description、brand_name、category_name_path
等,具体以索引数据为准。
示例
curl "https://api.prophetes.ai/insight/product/details?id=INSIGHT_OBJECT_ID&indexName=INSIGHT_INDEX_NAME&_source=" \
-H 'x-insight-application-id: INSIGHT_APPLICATION_ID' \
-H 'x-insight-api-key: INSIGHT_API_KEY'