# 批量新增合集资源单品
# 调用方式: POST
# 接口地址:
https://api.freelog.com/v2/resources/catalogues/drafts/{resourceId}/items
1
# url传入参数说明:
参数 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
resourceId | 必选 | 资源ID | 合集目前固定版本,所以无需传递版本号,只需要资源ID |
# body传入参数说明:
参数 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
isPublish | 可选 | boolean | 本次新增的单品是否同步发布到正式合集 |
addCollectionItems | 必选 | object[] | 新增的单品集合 |
**resourceId | 必选 | string | 单品对应的资源ID |
**itemTitle | 必选 | string | 单品标题 |
**batchSignContracts | 可选 | object[] | 如果需要在添加单品本时签约,则需要传递此参数 |
****resourceId | 必选 | string | 解决的资源ID |
**** policyIds | 必选 | string[] | 策略ID |
**authExcludedItems | 可选 | object[] | 当前单品的授权排除项 |
****resourceId | 必选 | string | 受影响的资源ID |
****excludedType | 必选 | string | 排除类型(contractId:以合约ID作为排除属性 policyId:以策略ID作为排除属性) |
****excludedValue | 必选 | string | 具体的排除值,例如合约ID或者策略ID |
# body示例
{
"addCollectionItems": [{
"resourceId": "644b72caa1d385002e4d1bfd",
"itemTitle": "resolveResources",
"authExcludedItems": []
}]
}
1
2
3
4
5
6
7
2
3
4
5
6
7
# 返回说明:
返回值字段 | 字段类型 | 字段说明 |
---|---|---|
addSuccessfulItems | object[] | 成功加入合集的单品集 |
**resourceId | string | 资源ID |
**itemTitle | string | 单品标题 |
addFailedItems | object[] | 加入合集失败的单品集 |
**resourceId | string | 资源ID |
**itemTitle | string | 单品标题 |
ignoreItems | object[] | 忽略的单品集(此前已经存在合集中) |
**resourceId | string | 资源ID |
**itemTitle | string | 单品标题 |
# 返回示例
{
"ret": 0,
"errCode": 0,
"errcode": 0,
"msg": "success",
"data": {
"addSuccessfulItems": [],
"addFailedItems": [],
"ignoreItems": [
{
"itemId": "a194c499",
"itemTitle": "hehe",
"resourceId": "644b72caa1d385002e4d1bfd"
}
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17