- 小程序 OpenAPI SDK 总览
- OpenAPI 简介
- 用户登录态签名
- 签名算法
- 联合授权
- 接口调用凭证
- 登录
- 小程序码与小程序链接
- Web 化接入
- 私信和群聊
- 解决方案
- 线索组件
- 隐私协议
- 视频能力
- 搜索能力
- 任务能力
- 电商
- 生活服务
- 短剧行业
- 用户信息
- 分享
- 客服
- 交易工具
- 小程序券
- 交易系统
- 素材库
- 内容安全
- 泛知识
- 担保支付
- 评价
- 其它
- 订阅消息
- 小程序推广计划
- 挂载
- 分发
- 数据分析
- 服务类目
- 直播间能力
- 抖音开放能力
- 能力申请
- 页面结构自定义
- 普通二维码绑定
- 抖音号绑定
- 流量主
- 抖店绑定
【泛知识】查询课程
更新时间 2024-07-24 02:58:49
收藏
我的收藏接口说明
该接口用于查询已添加和审核中的课程信息,单次查询不能超过 500 个课程.
业务场景
- 以课程 id 为维度查询课程信息
基本信息
名称 | 描述 |
---|---|
HTTP URL | |
HTTP Method | POST |
Scope | developer.open.product.add |
权限要求 | 查询商品 |
请求头
名称 | 字段类型 | 是否必填 | 示例 | 描述 |
---|---|---|---|---|
content-type | String | 是 | application/json | 固定值"application/json" |
请求参数
Body
名称 | 字段类型 | 是否必填 | 示例 | 描述 |
---|---|---|---|---|
access_token | String | 是 | ||
appid | String | 是 | tt12fd9846e1023401 | 小程序AppId |
product_ids | List | 是 | [5432181212227612345, 768781212227612345] | 商品id列表 该字段通过 /product/api/add 接口返回的 data.product_id 字段获取 |
请求示例
curl --location --request POST '/product/api/query' \
--header 'content-type: application/json' \
--data '{
"access_token": "12345678467354704e4f556f66496b774337614d4239784e78513d3d",
"appid": "tt77fd0140e89bba1234",
"product_ids": [5432181212227612345, 768781212227612345]
}'
响应参数
Body
名称 | 字段类型 | 是否必填 | 示例 | 描述 |
---|---|---|---|---|
data | Struct | 否 | 返回数据,课程信息列表,只返回有效的课程id对应的入库和进审课程信息 | |
err_msg | String | 否 | successs | 错误内容 |
err_no | Int32 | 否 | 0 | 错误码 |
log_id | String | 否 | 101210271802130982251451520919C123 | 日志id,用于查询错误 |
响应示例
正常响应示例
{
"err_msg": "success",
"err_no": 0,
"log_id": "202204271324260102252431250D04BCE0",
"data": {
"products": [
{
"product_on_shelf": {
"common_product_info": {
"anchor_info": {
"video_anchor_info": {
"anchor_title": "python入门指南"
}
},
"appid": "tt77fd0140e89bba8401",
"first_class": 30000,
"industry_type": 1,
"path_info_lst": [
{
"path": "page/index/index",
"query": {
"course_id": "10348594"
}
}
],
"price_info": {
"price": 5000,
"real_price": 4900,
"unit": "节"
},
"product_detail_lst": [
{
"img_uri": "product/resource/f515d1e894139856877b9a31877e6887",
"text": "课程详情"
}
],
"product_fulfillment_lst": [
{
"fulfillment_content": {
"fulfillment_uri": "product/resource/0001d044d41140d53ce9e57d793a4321",
"text": "",
"name": "课程履约视频"
},
"fulfillment_type": 1
},
{
"fulfillment_content": {
"fulfillment_uri": "product/resource/1001d044d41140d53ce9e57d793a4321",
"text": "",
"name": "课程履约音频"
},
"fulfillment_type": 2
},
{
"fulfillment_content": {
"fulfillment_uri": "product/resource/2001d044d41140d53ce9e57d793a4321",
"text": "",
"name": "课程履约图片"
},
"fulfillment_type": 3
}
],
"purchase_precaution": "小程序内购买课程为课程兑换权益,购买成功后将自动兑换到您的账户内,可在****中重复学习观看。",
"qualification_uris": [
"product/resource/1001d044d41140d53ce9e57d793a4321"
],
"second_class": 30100,
"third_class": 0,
"title": "python入门教程"
},
"course_info": {
"teacher_introduction": "华语知名唱片制作人",
"teacher_id": "T123456",
"institution_id": "I123456",
"teacher_img_uri": "xxx",
"course_num": 12,
"refund_label": {
"type": 1,
"day_before_use_info": {
"day": 1
},
"rest_not_learn_info": {
"rest_percent": 50
}
},
"start_timestamp": 213124231,
"end_timestamp": 2131232344,
"use_label": {
"valid_date": "",
"dynamic_valid_date": {
"year": 0,
"month": 12,
"day": 0
}
}
},
"product_id": 7088891387520812000,
"product_status": {
"reject_reason": "xxx",
"status": 1,
"latest_audit_id": "KNC12312421312"
},
"product_type": 1
},
"product_reviewing": {
"common_product_info": {
"anchor_info": {
"video_anchor_info": {
"anchor_title": "python入门指南"
}
},
"appid": "tt77fd0140e89bba8401",
"first_class": 30000,
"industry_type": 1,
"path_info_lst": [
{
"path": "page/index/index",
"query": {
"course_id": "9283746293"
}
}
],
"price_info": {
"price": 100,
"real_price": 98,
"unit": "天"
},
"product_detail_lst": [
{
"img_uri": "product/resource/f515d1e894139856877b9a31877e6887",
"text": "课程详情"
}
],
"product_fulfillment_lst": [
{
"fulfillment_content": {
"fulfillment_uri": "product/resource/0001d044d41140d53ce9e57d793a4321",
"text": "",
"name": "课程履约视频"
},
"fulfillment_type": 1
},
{
"fulfillment_content": {
"fulfillment_uri": "product/resource/1001d044d41140d53ce9e57d793a4321",
"text": "",
"name": "课程履约音频"
},
"fulfillment_type": 2
},
{
"fulfillment_content": {
"fulfillment_uri": "product/resource/2001d044d41140d53ce9e57d793a4321",
"text": "",
"name": "课程履约图片"
},
"fulfillment_type": 3
}
],
"purchase_precaution": "小程序内购买课程为课程兑换权益,购买成功后将自动兑换到您的账户内,可在****中重复学习观看。",
"qualification_uris": [
"product/resource/1001d044d41140d53ce9e57d793a4321"
],
"second_class": 30100,
"third_class": 0,
"title": "python入门教程"
},
"course_info": {
"teacher_introduction": "华语知名唱片制作人",
"teacher_id": "T123456",
"institution_id": "I123456",
"teacher_img_uri": "xxx",
"course_num": 12,
"refund_label": {
"type": 1,
"day_before_use_info": {
"day": 1
},
"rest_not_learn_info": {
"rest_percent": 50
}
}
},
"product_id": 7088891387520812000,
"product_status": {
"reject_reason": "xxx",
"status": 2,
"latest_audit_id": "KNC12312421312"
},
"product_type": 1
}
}
]
}
}
异常响应示例
{
"err_msg": "无效的AccessToken",
"err_no": 10001,
"log_id": "2022042713370101022508421703050876"
}
错误码
http状态码 | 错误码 | 错误码描述 | 排查建议 |
---|---|---|---|
200 | 10000 | 系统错误 | 尝试重试,持续发生联系工程师 |
200 | 10001 | 无效的AccessToken | 检查token是否有效/过期 |
200 | 10004 | AppID错误或AppID参数缺失 | 检查appID是否填写错误 |
该文档是否有帮助?
点击纠错