接口说明
上传方式创建文件
API 方法名:nuonuo.eleConShortcutSign.uploadContract 版本:V2.0
请求地址
| 环境 | 请求地址 |
|---|
| 正式环境 | https://sdk.nuonuo.com/open/v1/services |
| 沙箱环境 | https://sandbox.nuonuocs.cn/open/v1/services |
公共请求参数(消息头)
| 参数名 | 类型 | 必填 | 长度 | 说明 | 示例 |
|---|
| Content-type | String | 否 | - | MIME类型【消息头】 | - |
公共请求参数(消息体)
| 参数名 | 类型 | 必填 | 长度 | 说明 | 示例 |
|---|
| senid | String | 否 | - | 唯一标识,由企业自己生成32位随机码【消息体】 | - |
私有请求参数
| 参数名 | 类型 | 必填 | 长度 | 说明 | 示例 |
|---|
| application | String | 否 | - | 应用名称,请联系对接人员分配 | test_app_one |
| base64File | String | 否 | - | 文件base64编码的字符串,合同文件支持doc/docx/pdf格式,附件支持doc/docx/pdf/png/jpg/jpeg格式,不超过10M | 上传文件 |
| fileName | String | 否 | - | 文件名称,包括文件格式后缀 | 新建 DOCX 文档.docx |
| type | String | 否 | - | 文件类型(0:个人文件 1:企业文件) | 0 |
| operatorId | String | 否 | - | 操作人id | 860af3b991ec4d629f30188f85c939f2 |
| operatorPartId | String | 否 | - | 操作人主体id。当type=0时,operatorId和operatorPartId必须相同 | 860af3b991ec4d629f30188f85c939f2 |
| fileType | Number | 是 | - | 文件分类(0:合同 1:合同附件 2:合同模版), 非必填,默认合同文件 | 0 |
响应参数
| 参数名 | 类型 | 必填 | 长度 | 说明 | 示例 |
|---|
| code | String | 否 | - | 返回码 | H200 |
| describe | String | 否 | - | 返回说明 | 成功 |
| result | String | 否 | - | 返回结果 | 3232288381-3a4532e492a54a7cadd1282939267216 |
请求报文示例
NNOpenSDK sdk = NNOpenSDK.getIntance();
String taxnum = "23***789"; // 授权企业税号
String appKey = "Hn***XL";
String appSecret = "F65***65F";
String method = "nuonuo.eleConShortcutSign.uploadContract"; // API方法名
String token = "2d484e**************pdui"; // 访问令牌
String content = "{
\"base64File\": \"上传文件\",
\"fileName\": \"新建 DOCX 文档.docx\",
\"application\": \"test_app_one\",
\"operatorPartId\": \"860af3b991ec4d629f30188f85c939f2\",
\"type\": \"0\",
\"operatorId\": \"860af3b991ec4d629f30188f85c939f2\",
\"fileType\": 0
}";
String url = "https://sdk.nuonuo.com/open/v1/services"; // SDK请求地址
String senid = UUID.randomUUID().toString().replace("-", ""); // 唯一标识,32位随机码,无需修改,保持默认即可
String result = sdk.sendPostSyncRequest(url, senid, appKey, appSecret, token, taxnum, method, content);
System.out.println(result);
响应报文示例
{
"code":"H200",
"describe":"成功",
"result":"3232288381-3a4532e492a54a7cadd1282939267216"
}
返回码说明
| 返回码 | 说明 | 处理建议 |
|---|
H200 | 成功 | |
H99999 | 请求异常或服务器异常 | |
H88888 | 参数异常 | |