基本信息
- 用途说明:先调附件上传的接口,拿到出参后调当前接口获取附件基础资料的id
- 请求方式:POST
- 请求地址:http://api.kingdee.com/weigusoft/wg_crm/commonApi
请求参数
headers参数
- 所有的接口必须携带header参数
| 参数名称 | 参数示例 | 是否必填 | 参数说明 |
|---|---|---|---|
| Content-Type | application/json | true | 固定传:application/json |
| groupName | ns-v7g6 | true | 分组名称,获取授权信息时返回的groupName |
| accountId | 16xxxxxxxxxxxx | true | 账套ID,获取授权信息时返回的accountId |
| X-GW-Router-Addr | https://tf.jdy.com | true | IDC域名,获取授权信息时返回的domain |
特别注意:gruopName是变动的,若调用接口出现11010001返回码,则需要主动获取授权信息,以获取最新groupName。
params参数
| 参数名称 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
| access_token | string | true | 金蝶云通行证token |
body参数
| 参数名称 | 类型 | 必选 | 说明 |
|---|---|---|---|
api_name |
String | true |
api.LoadAttachmentFieldApi |
url |
String | true | 取附件上传接口的出参file |
name |
String | 文件名称 | |
size |
String | 文件大小 |
请求示例
curl ^"https://api.kingdee.com/weigusoft/wg_crm/commonApi?access_token=1755049347761c5a5518401624732e3a^&authority_info=WbQRZHq+SJZ1JDCjzGrcGtKnurO8MacsqBYBtiWkEoX708Emip/UKW0pBplvfUjj^" ^
-H ^"Accept: */*^" ^
-H ^"Accept-Language: zh-CN,zh;q=0.9^" ^
-H ^"Appuserid: 11479714^" ^
-H ^"Connection: keep-alive^" ^
-H ^"Content-Type: application/json;charset=UTF-8^" ^
-H ^"Origin: http://localhost:5173^" ^
-H ^"Referer: http://localhost:5173/^" ^
-H ^"Sec-Fetch-Dest: empty^" ^
-H ^"Sec-Fetch-Mode: cors^" ^
-H ^"Sec-Fetch-Site: cross-site^" ^
-H ^"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1^" ^
-H ^"X-GW-Router-Addr: https://tf-ek.jdy.com^" ^
-H ^"access_token: 1755049347761c5a5518401624732e3a^" ^
-H ^"accountId: 1675743896569628608^" ^
-H ^"groupName: ns-isv5^" ^
--data-raw ^"^{^\^"api_name^\^":^\^"api.LoadAttachmentFieldApi^\^",^\^"url^\^":^\^"https://tf-ek.jdy.com/ierp/tempfile/download.do?configKey=redis.serversForCache.tempfile^&id=tempfile-7281a787-9ea7-4472-aa11-58da0e0b3f5e^\^",^\^"name^\^":^\^"^开^发2.png^\^",^\^"size^\^":1007^}^"
-H ^"Accept: */*^" ^
-H ^"Accept-Language: zh-CN,zh;q=0.9^" ^
-H ^"Appuserid: 11479714^" ^
-H ^"Connection: keep-alive^" ^
-H ^"Content-Type: application/json;charset=UTF-8^" ^
-H ^"Origin: http://localhost:5173^" ^
-H ^"Referer: http://localhost:5173/^" ^
-H ^"Sec-Fetch-Dest: empty^" ^
-H ^"Sec-Fetch-Mode: cors^" ^
-H ^"Sec-Fetch-Site: cross-site^" ^
-H ^"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1^" ^
-H ^"X-GW-Router-Addr: https://tf-ek.jdy.com^" ^
-H ^"access_token: 1755049347761c5a5518401624732e3a^" ^
-H ^"accountId: 1675743896569628608^" ^
-H ^"groupName: ns-isv5^" ^
--data-raw ^"^{^\^"api_name^\^":^\^"api.LoadAttachmentFieldApi^\^",^\^"url^\^":^\^"https://tf-ek.jdy.com/ierp/tempfile/download.do?configKey=redis.serversForCache.tempfile^&id=tempfile-7281a787-9ea7-4472-aa11-58da0e0b3f5e^\^",^\^"name^\^":^\^"^开^发2.png^\^",^\^"size^\^":1007^}^"
响应参数
| 参数名称 | 参数类型 | 参数说明 |
|---|---|---|
| errorCode | string | 返回码,调用成功时为success |
| message | string | 返回信息,调用失败时会返回具体信息 |
| data | obj | 业务数据 |
data
| 参数名称 | 类型 | 必选 | 说明 |
|---|---|---|---|
| name | Strnig | true | 文件名称 |
| url | 文件地址 | ||
| id | |||
| uid | |||
| size |
响应示例
{
"data": {
"number": "cd735e77-2db6-4fac-97fc-b47b91199239",
"uid": "tempfile-7281a787-9ea7-4472-aa11-58da0e0b3f5e",
"size": 1007,
"name": "开发2.png",
"id": "2285710355013451776",
"url": "https://tf-ek.jdy.com/ierp//attachment/download.do?path=/jdyattachmentimage/1675743896569628608/796196029114386/1675743896569628608/202508/attachmentupload/E5BC80E58F912.png"
},
"errorCode": "success",
"status": true,
"success": true
}