
outTrackId唯一标识一张卡片,通过openSpaceId标识需要被投放的场域及其场域Id,通过openDeliverModels传入不同场域下的投放属性。| 场域类型 | SpaceType | SpaceId | SpaceId含义 |
|---|---|---|---|
| IM群聊 | IM_GROUP | openConversationId | 会话id |
| IM机器人单聊 | IM_ROBOT | userId/unionId | 员工id |
| 吊顶 | ONE_BOX | openConversationId | 会话id |
| 协作 | COOPERATON_FEED | userId/unionId | 员工id |
| 文档 | DOC | docKey | 文档key |
| 应用类型 | 是否支持 | 权限 | API Explorer调试 |
|---|---|---|---|
| 企业内部应用 | 支持 | 互动卡片实例写权限 | API Explorer |
| 第 三方企业应用 | 支持 | 互动卡片实例写权限 | API Explorer |
| 第三方个人应用 | 暂不支持 | 互动卡片实例写权限 | 暂不支持 |
| HttpCode | 错误码 | 错误信息 | 说明 |
|---|---|---|---|
| 400 | param.empty | param.empty | 入参为空 |
| 400 | param.outTrackIdEmpty | param.outTrackIdEmpty | 业务标识outTrackId为空 |
| 400 | param.openSpaceIdEmpty | param.openSpaceIdEmpty | 投放openSpaceId为空 |
| 400 | param.openDeliverModelEmpty | param.openDeliverModelEmpty | 场域投放模型为空 |
| 400 | param.spaceDeliverModelEmpty | param.spaceDeliverModelError | 场域投放模型格式错误 |
| 400 | param.openSpaceIdInvalid | param.openSpaceIdInvalid | openSpaceId不符合规范 |
| 400 | param.cardNotExist | param.cardNotExist | 卡片不存在 |
| 500 | system.busy | system.busy | 系统繁忙 |
| 500 | system.busy | system.busy | 系统繁忙 |
{
"outTrackId" : "String",
"openSpaceId" : "String",
"imRobotOpenDeliverModel" : {
"spaceType" : "String"
},
"imGroupOpenDeliverModel" : {
"robotCode" : "String",
"atUserIds" : {
"key" : "String"
},
"recipients" : [ "String" ]
},
"topOpenDeliverModel" : {
"expiredTimeMillis" : Long,
"userIds" : [ "String" ],
"platforms" : [ "String" ]
},
"coFeedOpenDeliverModel" : {
"bizTag" : "String",
"gmtTimeLine" : Long
},
"docOpenDeliverModel" : {
"userId" : "String"
},
"userIdType" : Integer
}curl --location --request POST '/v1.0/card/instances/deliver' \
--header 'x-acs-dingtalk-access-token;' \
--header 'Content-Type: application/json' \
--data-raw '{
"outTrackId" : "String",
"openSpaceId" : "String",
"imRobotOpenDeliverModel" : {
"spaceType" : "String"
},
"imGroupOpenDeliverModel" : {
"robotCode" : "String",
"atUserIds" : {
"key" : "String"
},
"recipients" : [ "String" ]
},
"topOpenDeliverModel" : {
"expiredTimeMillis" : Long,
"userIds" : [ "String" ],
"platforms" : [ "String" ]
},
"coFeedOpenDeliverModel" : {
"bizTag" : "String",
"gmtTimeLine" : Long
},
"docOpenDeliverModel" : {
"userId" : "String"
},
"userIdType" : Integer
}'{
"success": true,
"result": [
{
"spaceType": "string",
"spaceId": "string",
"success": true,
"carrierId": "string",
"errorMsg": "string"
}
]
}