【泛知识】查询课程
开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
POST
https://developer-product.zijieapi.com/product/api/query
接口介绍
接口说明
基本信息
HTTP URL | 正式环境:https://developer-product.zijieapi.com/product/api/query 沙盒环境:https://open-sandbox.douyin.com/product/api/query |
---|---|
HTTP Method | POST |
权限要求 | 无 |
product_info--课程详情
common_product_info--通用课程信息
名称 | 类型 | 描述 | 示例值 |
---|---|---|---|
product_id | number | 课程id | 1234564871002310293 |
product_type | enum | 课程类型, 1-课程 | 1 |
appid | string | 小程序appid | "tt12fd9846e1023401" |
first_class | number | 一级课程分类,详见课程开放分类规范 | 10000 |
second_class | number | 二级课程分类,详见课程开放分类规范 | 10100 |
title | string | 课程名称 | "python入门教 程" |
qualification_urls | array[string] | 课程资质存储url列表 | ["https://abc.def.com/product/resource/qualification1.jpg", "https://abc.def.com/product/resource/qualification2.jpg"] |
purchase_precaution | string | 购物须知 | "购买后如何观看课程? 答:小程序内购买课程为课程兑换权益,购买成功后将自动兑换到您的账户内,可在****中重复学习观看。 购买后,是否可以永久观看? 答:可以,本课程为付费产品,购买成功后,即可永久性收看该课程。 观看后是否可以退款? 答:不可以/可以。" |
product_fulfillment_lst | array | 课程履约列表 | [ { "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 } ] |
industry_type | enum | 行业类目, 1-泛知识 | 1 |
price_info | object | 价格信息 | { "unit" : "节", "price" : 1000, "real_price" : 800, } |
path_info_lst | array | 路径信息列表,用于分发 | [ { "path": "page/index/index", "query": { "course_id": "382648" } } ] |
product_detail_lst | array | 课程详情列表 | [ { "text": "1. python安装步骤", "img_uri": "product/resource/5001d044d41140d53ce9e57d793a4321" }, { "rich_text": "1. python安装步骤" } ] |
anchor_info | object | 锚点信息 | { "video_anchor_info": { "anchor_title": "python入门教程" } } |
product_fulfillment--履约内容
名称 | 类型 | 描述 | 示例值 |
---|---|---|---|
fulfillment_content | object | 履约详情,用户购买课程后能学习的内容 | { "fulfillment_uri":"product/resource/0001d044d41140d53ce9e57d793a4321", "name": "课程履约视频" } |
fulfillment_type | enum | 履约类型,枚举值,详见fulfillment_type枚举列表 | 3 |
fulfillment_content--履约详情
名称 | 类型 | 描述 | 示例值 |
---|---|---|---|
fulfillment_uri | string | 履约文件资源uri | "product/resource/0001d044d41140d53ce9e57d793a4321" |
text | string | 文字内容 | "Python支持多种编程范型,包括函数式、指令式、反射式、结构化和面向对象编程。" |
name | string | 履约内容名称 | "python入门到精通" |
price_info--价格信息
名称 | 类型 | 描述 | 示例值 |
---|---|---|---|
unit | string | 价格粒度单位 | 节 |
price | number | 优惠活动前的服务原始价格 | 5000 |
real_price | number | 当前服务的实际成交价格 | 4900 |
range_min_price | number | 当前服务的实际成交价格区间:最低价格 | 3000 |
range_max_price | number | 当前服务的实际成交价格区间:最高价格 | 6000 |
rich_text--商品详情富文本内容
名称 | 类型 | 描述 | 示例值 |
---|---|---|---|
text | string | 富文本字符串,不转义 | “xxx” |
course_info--课程信息
名称 | 类型 | 描述 | 示例值 |
---|---|---|---|
teacher_introduction | string | 老师介绍 | "华语知名唱片制作人" |
teacher_id | string | 教师资质id | "T12345" |
institution_id | string | 机构资质id | "I12345" |
teacher_img_uri | string | 教师头图 | "xxx" |
course_num | number | 课程节数 | 12 |
refund_label | object | 退款标签 type为1表示"xx天未学可退", type为2表示"学习进度不足xx可退" | { "type":1, "day_before_use_info":{ "day":1 }, "rest_not_learn_info":{ "rest_percent":50 } } |
start_timestamp | number | 课程开始时间戳 | 13214312412 |
end_timestamp | number | 课程结束时间戳 | 23141231232 |
use_label | object | 使用标签,其中,区分为固定有效期及动态有效期,二者选其一生效 | { "valid_date":"", "dynamic_valid_date":{ "year":0, "month":12, "day":0 } } |
product_status--课程状态
名称 | 类型 | 描述 | 示例值 | |
---|---|---|---|---|
status | enum | 课程状态,枚举型 针对入库课程(product_onshelf): 1 - 上架,2 - 下架 针对审核中课程(product_reviewing): 1 - 审核中,2 - 审核通过,3 - 审核不通过 | 1 | |
reject_reason | string | 下架或审核不通过原因 | "图片不符合要求" | |
latest_audit_id | string | 最近一次审核ID | "KNC12344" |
枚举参数
fulfillment_type--履约类型
履约类型 | 履约类型编码 | 上传方式 |
---|---|---|
视频 | 1 | 课程资源上传接口上传 |
音频 | 2 | 课程资源上传接口上传 |
图片 | 3 | 课程资源上传接口上传 |
文字 | 4 | 功能接口字段中直接携带上传 |
图文 | 5 | 课程资源上传接口上传 |
富文本 | 6 | 功能接口字段中直接携带上传 |
其他 | 100 | 课程资源上传接口上传 |
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://developer-product.zijieapi.com/product/api/query' \
--header 'Content-Type: application/json' \
--data-raw '{
"access_token": "12345678467354704e4f556f66496b774337614d4239784e78513d3d",
"appid": "tt77fd0140e89bba1234",
"product_ids": [5432181212227612345, 768781212227612345]
}'
响应示例响应示例
200 - 示例 1
{
"err_msg": "string",
"err_no": 0,
"log_id": "string",
"data": {
"products": [
{
"product_on_shelf": {
"common_product_info": {
"anchor_info": {
"video_anchor_info": {
"anchor_title": "string"
}
},
"appid": "string",
"first_class": 0,
"industry_type": 0,
"path_info_lst": [
{
"path": "string",
"query": {
"course_id": "string"
}
}
],
"price_info": {
"price": 0,
"real_price": 0,
"unit": "string"
},
"product_detail_lst": [
{
"img_uri": "string",
"text": "string"
}
],
"product_fulfillment_lst": [
{
"fulfillment_content": {
"fulfillment_uri": "string",
"text": "string",
"name": "string"
},
"fulfillment_type": 0
}
],
"purchase_precaution": "string",
"qualification_uris": [
"string"
],
"second_class": 0,
"third_class": 0,
"title": "string"
},
"course_info": {
"teacher_introduction": "string",
"teacher_id": "string",
"institution_id": "string",
"teacher_img_uri": "string",
"course_num": 0,
"refund_label": {
"type": 0,
"day_before_use_info": {
"day": 0
},
"rest_not_learn_info": {
"rest_percent": 0
}
},
"start_timestamp": 0,
"end_timestamp": 0,
"use_label": {
"valid_date": "string",
"dynamic_valid_date": {
"year": 0,
"month": 0,
"day": 0
}
}
},
"product_id": 0,
"product_status": {
"reject_reason": "string",
"status": 0,
"latest_audit_id": "string"
},
"product_type": 0
},
"product_reviewing": {
"common_product_info": {
"anchor_info": {
"video_anchor_info": {
"anchor_title": "string"
}
},
"appid": "string",
"first_class": 0,
"industry_type": 0,
"path_info_lst": [
{
"path": "string",
"query": {
"course_id": "string"
}
}
],
"price_info": {
"price": 0,
"real_price": 0,
"unit": "string"
},
"product_detail_lst": [
{
"img_uri": "string",
"text": "string"
}
],
"product_fulfillment_lst": [
{
"fulfillment_content": {
"fulfillment_uri": "string",
"text": "string",
"name": "string"
},
"fulfillment_type": 0
}
],
"purchase_precaution": "string",
"qualification_uris": [
"string"
],
"second_class": 0,
"third_class": 0,
"title": "string"
},
"course_info": {
"teacher_introduction": "string",
"teacher_id": "string",
"institution_id": "string",
"teacher_img_uri": "string",
"course_num": 0,
"refund_label": {
"type": 0,
"day_before_use_info": {
"day": 0
},
"rest_not_learn_info": {
"rest_percent": 0
}
}
},
"product_id": 0,
"product_status": {
"reject_reason": "string",
"status": 0,
"latest_audit_id": "string"
},
"product_type": 0
}
}
]
}
}
请求参数
Header 参数
Content-Type
string
必需
Body 参数application/json