| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410 |
- package asign
- type APIReqData interface {
- APIPersonBankCard4Req |
- APICompanyBankCard4Req |
- APICaptchaResendReq |
- APICaptchaVerifyReq |
- APIGetUserReq |
- APIAddPersonalUserReq |
- APIAddEnterpriseUserReq |
- APITemplateListReq |
- APICreateContractReq |
- APIAddSignerReq |
- APIContractStatusReq |
- APIDownloadContractReq |
- APICreateSealReq |
- APIModifySealReq |
- APIGetUserSealsReq |
- APIWillFaceReq
- }
- type APIReq[T APIReqData] struct {
- Data T // 请求数据
- Datas []T // 请求数据,切片类型
- }
- type APIRspData interface {
- interface{} |
- APIBankCard4Rsp |
- APIAddUserRsp |
- APICaptchaVerifyRsp |
- APIGetUserRsp |
- APIGetUserSealsRsp |
- APIWillFaceRsp
- }
- type APIRsp[T APIRspData] struct {
- Code int `json:"code"` // 响应码,100000表示成功,其他表示异常
- Msg string `json:"msg"` // 响应信息
- Data T // 响应数据
- }
- // APIPersonBankCard4Req 个人银行卡四要素认证入参
- type APIPersonBankCard4Req struct {
- RealName string `json:"realName" binding:"required"` // 真实姓名
- IdCardNo string `json:"idCardNo" binding:"required"` // 身份证号
- BankCard string `json:"bankCard" binding:"required"` // 银行卡号(仅限印有“银联”字样的银行卡)
- Mobile string `json:"mobile" binding:"required"` // 手机号码(限中国大陆11位手机号)
- }
- // APICompanyBankCard4Req 企业法人银行卡四要素认证入参
- type APICompanyBankCard4Req struct {
- CompanyName string `json:"companyName" binding:"required" mapstructure:"companyName"` // 企业名称
- CreditCode string `json:"creditCode" binding:"required" mapstructure:"creditCode"` // 社会统一信用代码
- RealName string `json:"realName" binding:"required" mapstructure:"realName"` // 法人姓名
- IdCardNo string `json:"idCardNo" binding:"required" mapstructure:"idCardNo"` // 法人身份证号
- BankCard string `json:"bankCard" binding:"required" mapstructure:"bankCard"` // 法人银行卡号(仅限印有“银联”字样的银行卡)
- Mobile string `json:"mobile" binding:"required" mapstructure:"mobile"` // 法人手机号(限中国大陆11位手机号)
- }
- // APIBankCard4Rsp 银行卡四要素认证出参
- type APIBankCard4Rsp struct {
- Result int `json:"result"` // 认证结果 0.暂无结果/认证中 1.成功 2.失败
- SerialNo string `json:"serialNo"` // 认证流水号
- Type string `json:"type"` // 认证类型
- }
- type APICaptchaResendReq struct {
- SerialNo string `json:"serialNo" binding:"required"` // 认证流水号
- }
- // CaptchaVerifyReq 认证验证码校验入参
- type APICaptchaVerifyReq struct {
- SerialNo string `json:"serialNo" binding:"required"` // 认证流水号
- Captcha string `json:"captcha" binding:"required"` // 短信验证码
- }
- // CaptchaVerifyRsp 认证验证码校验出参
- type APICaptchaVerifyRsp struct {
- Result int `json:"result"` // 认证结果 0.暂无结果/认证中 1.成功 2.失败
- SerialNo string `json:"serialNo"` // 认证流水号
- Type string `json:"type"` // 认证类型
- }
- // APIGetUserReq 查询用户信息入参
- type APIGetUserReq struct {
- Account string `json:"account" structs:",omitempty"` // 用户唯一识别码
- CreditCode string `json:"creditCode" structs:",omitempty"` // 社会统一信用代码
- IdCard string `json:"idCard" structs:",omitempty"` // 证件号码
- }
- // APIGetUserRsp 查询用户信息出参
- type APIGetUserRsp struct {
- Account string `json:"account"` // 用户账号,用户唯一识别码
- Name string `json:"name"` // 个人用户姓名/企业法人姓名
- CompanyName string `json:"companyName"` // 企业名称
- IdCard string `json:"idCard"` // 个人用户证件号/企业法人身份证号
- Mobile string `json:"mobile"` // 用户手机号(签约短信通知手机号)
- Email string `json:"email"` // 用户邮箱号
- UserType int `json:"userType"` // 用户类型: 1:企业 2:个人
- CreditCode string `json:"creditCode"` // 社会统一信用代码
- BankCard string `json:"bankCard"` // 用户银行卡号
- PortVersion int `json:"portVersion"` // 用户添加时调用的接口版本: 0:历史接口 1:V2版本接口
- IdentifyType int `json:"identifyType"` // 认证类型
- AuthType int `json:"authType"` // 认证方式: 当portVersion=0 历史接口时 0:非强制认证 1:爱签平台强制认证 当portVersion=1 (V2)版本接口时 0:平台方自行认证 1:爱签平台认证
- CreateTime string `json:"createTime"` // 创建时间
- IdentifyTime string `json:"identifyTime"` // 认证时间
- }
- // AddPersonalUserReq 添加个人用户(V2)入参
- type APIAddPersonalUserReq struct {
- Account string `json:"account" binding:"required"` // 用户唯一识别码(请转入UserID)
- SerialNo string `json:"serialNo" structs:",omitempty"` // 实名认证流水号
- Name string `json:"name" structs:",omitempty"` // 用户姓名
- IdCard string `json:"idCard" structs:",omitempty"` // 个人身份证、台胞证、港澳通行证等证件号
- IdCardType int `json:"idCardType" structs:",omitempty"` // 证件类型 1:居民身份证 2:台湾居民来往内地通行证 3:港澳居民往来内地通行证 10:武装警察身份证 11:军人身份证 15:警察(警官)证 21:外国人永久居留证 23:护照
- Mobile string `json:"mobile" structs:",omitempty"` // 手机号码
- SignPwd string `json:"signPwd" structs:",omitempty"` // 签约密码(MTP2登录密码加密方式),如果为空将随机生成签约密码(当签约方式为“签约密码签约”时会使用到,可通过重置接口修改)
- IsSignPwdNotice int `json:"isSignPwdNotice" structs:",omitempty"` // 是否将签约密码以短信形式通知用户 0:不通知(默认) 1:通知
- IsNotice int `json:"isNotice" structs:",omitempty"` // 用户发起合同或需要签署时是否进行短信通知 0:否(默认) 1:是
- }
- // APIAddEnterpriseUserReq 添加企业用户(V2)入参
- type APIAddEnterpriseUserReq struct {
- Account string `json:"account" binding:"required"` // 用户唯一识别码(可用证件号、手机号等具有唯一属性的标识作为参数传递)
- SerialNo string `json:"serialNo" structs:",omitempty"` // 实名认证流水号(若您希望不传此值,由您自行完成认证。请联系商务人员开通权限)
- CompanyName string `json:"companyName" structs:",omitempty"` // 企业名称
- CreditCode string `json:"creditCode" structs:",omitempty"` // 企业证件号
- CreditType int `json:"creditType" structs:",omitempty"` // 企业证件类型, 不传默认为1; 1:统一社会信用代码 2:表示其他证件类型
- Name string `json:"name" structs:",omitempty"` // 企业法人姓名
- IdCard string `json:"idCard" structs:",omitempty"` // 法人身份证、台胞证、港澳通行证等证件号
- IdCardType int `json:"idCardType" structs:",omitempty"` // 证件类型, 不传默认为1; 1:居民身份证 2:台湾居民来往大陆通行证 3:港澳居民来往内地通行证等...
- Mobile string `json:"mobile" structs:",omitempty"` // 签约手机,该手机号将用于企业用户合同签署时短信验证,请确保真实有效
- ContactName string `json:"contactName" structs:",omitempty"` // 联系人姓名(与企业的法定代表人可以是同一个人)
- ContactIdCard string `json:"contactIdCard" structs:",omitempty"` // 联系人身份证号(与企业的法定代表人可以是同一个人)
- SignPwd string `json:"signPwd" structs:",omitempty"` // 签约密码明文,如果为空我方将随机生成签约密码(当签约方式为“签约密码签约”时会使用到,可通过重置接口修改)
- IsSignPwdNotice int `json:"isSignPwdNotice" structs:",omitempty"` // 是否将签约密码以短信形式通知用户: 0-不通知(默认), 1-通知
- IsNotice int `json:"isNotice" structs:",omitempty"` // 用户发起合同或需要签署时是否进行短信通知: 0-否(默认), 1-是
- }
- // APIAddUserRsp 添加用户(V2)出参(包括个人和企业)
- type APIAddUserRsp struct {
- SealNo string `json:"sealNo" binding:"required"` // 生成默认印章编号
- }
- // APITemplateListReq 查询模板列表入参
- type APITemplateListReq struct {
- Page int `json:"page"` // 页数(不传默认1)
- Rows int `json:"rows"` // 每页数据量(不传默认10)
- TemplateIdent string `json:"templateIdent"` // 模板编号
- }
- // APITemplateInfo 模板信息
- type APITemplateInfo struct {
- TemplateIdent string `json:"templateIdent"` // 模板编号
- TemplateName string `json:"templateName"` // 模板名称
- TemplateType int `json:"templateType"` // 模板类型:1:word 2:pdf 3:html
- Page int `json:"page"` // 模板页数
- Sponsor bool `json:"sponsor"` // 是否含发起方填写
- ReceiverFill bool `json:"receiverFill"` // 是否含接收方填写
- Param bool `json:"param"` // 是否含填充参数
- Sign bool `json:"sign"` // 是否含签约参数
- Status int `json:"status"` // 模板状态:0:删除 1:使用中 2:停用
- Url string `json:"url"` // 模板预览地址(有效时间30分钟)
- SyncUrl string `json:"syncUrl"` // 同步模板预览地址(有效时间30分钟)
- SyncStatus int `json:"syncStatus"` // 模板同步状态:0:未同步 1:已同步 2:同步过时【注】此字段逻辑不针对老数据,当旧的模板再次同步后进入此逻辑
- CreateTime string `json:"createTime"` // 创建时间
- ModifyTime string `json:"modifyTime"` // 更新时间
- }
- // APITemplateListRsp 查询模板列表出参
- type APITemplateListRsp struct {
- Total int `json:"total"` // 总模板数量
- PageNum int `json:"pageNum"` // 页码
- PageSize int `json:"pageSize"` // 每页数据量
- Size int `json:"size"` // 当页数据量
- Pages int `json:"pages"` // 总页数
- List []APITemplateInfo `json:"list"` // 模板列表
- }
- // APIFillData 单行文本、多行文本、日期、身份证类型参数填充。
- type APIFillData struct {
- DataKey string `json:"dataKey" binding:"required"` // 参数名称
- Value string `json:"value" binding:"required"` // 填充值
- }
- // APIComponentData 单选、复选、勾选、图片类型参数填充
- type APIComponentData struct {
- Type int `json:"type" binding:"required"` // 组件类型: 2:单选 3:勾选 9:复选 11:图片
- Keyword string `json:"keyword" binding:"required"` // 参数名称
- DefaultValue string `json:"defaultValue" structs:",omitempty"` // 当填充类型为勾选(type=3)时填写: Yes:选中 Off:不选中
- Options map[string]interface{} `json:"options" structs:",omitempty"` // 选项内容
- ImageByte []byte `json:"imageByte" structs:",omitempty"` // 图片资源
- }
- // APItableData 表格填充数据
- type APItableData struct {
- Keyword string `json:"keyword" binding:"required"` // 表名称
- RowValues []map[string]interface{} `json:"rowValues"` // 表格填充值
- }
- // APITemplate 合同模板
- type APITemplate struct {
- TemplateNo string `json:"templateNo" binding:"required"` // 合同模板编号
- ContractNo string `json:"contractNo" structs:",omitempty"` // 合同编号(此处可传已完成签署的合同编号,实现追加签章的场景)
- FillData APIFillData `json:"fillData" structs:",omitempty"` // 单行文本、多行文本、日期、身份证类型参数填充。
- ComponentData []APIComponentData `json:"componentData" structs:",omitempty"` // 单选、复选、勾选、图片类型参数填充
- TableDatas []APItableData `json:"tableDatas" structs:",omitempty"` // 表格填充数据
- }
- // APICreateContractReq 上传待签署文件入参
- //
- // 参数说明:https://preweb.asign.cn/platform/openDoc/docDetail?mid=createContract
- type APICreateContractReq struct {
- ContractNo string `json:"contractNo" structs:"contractNo" binding:"required"` // 合同ID,合同唯一编号
- ContractName string `json:"contractName" structs:"contractName" binding:"required"` // 合同名称
- ValidityTime int `json:"validityTime" structs:"validityTime,omitempty"` // 合同签署剩余天数(系统当前时间+该天数=在此日期之前可以签署合同日期),【注】与合同有效截止日期必传其一,【例】可传剩余天数:15
- ValidityDate string `json:"validityDate" structs:"validityDate,omitempty"` // 合同有效截止日期(在此日期之前可以签署合同,格式要求:yyyyMMddHHmmss),【注】与合同有效天数必传其一,【例】传值“20231207190000” 为:2023年12月07日19时00分00秒
- SignOrder int `json:"signOrder" structs:"signOrder" binding:"required"` // 签约方式 1:无序签约(默认) 2:顺序签约
- ReadSeconds int `json:"readSeconds" structs:"readSeconds,omitempty"` // 强制阅读时间(秒)
- ReadType int `json:"readType" structs:"readType,omitempty"` // 强制阅读设置 1:倒计时读秒方式 2:必须滑动到文件最底部(有多个文件务必逐个阅读) 3:必须点击打开查看(有多个文件务必逐个打开查看)【注】当readType不传值,仅readSeconds传值时,倒计时读秒是针对整体合同(不强制每个文件逐个阅读)。当readType传值1时,readSeconds也传值时,倒计时(要求每个文件逐个阅读)。当readType传值2或3时,readSeconds也传值时,倒计时读秒是针对整体合同(不强制每个文件逐个阅读)。
- NeedAgree int `json:"needAgree" structs:"needAgree,omitempty"` // 同意协议开关:(开启后表示必须同意协议才可签署合同) 1 - 开,0 - 关(默认)
- AutoExpand int `json:"autoExpand" structs:"autoExpand,omitempty"` // 多文件时,是否自动展开文件列表 1 - 展开, 0 - 不展开(默认)
- NotifyUrl string `json:"notifyUrl" structs:"notifyUrl,omitempty"` // 合同签署完成后(合同状态 status=2)回调通知地址,响应【"ok"】表示接收回调成功。
- CallbackUrl string `json:"callbackUrl" structs:"callbackUrl,omitempty"` // 合同拒签或过期后(合同状态 status=3/4)回调通知地址,响应【"ok"】表示接收回调成功。
- UserNotifyUrl string `json:"userNotifyUrl" structs:"userNotifyUrl,omitempty"` // 某个用户签署完成(用户签署状态 signStatus=2,参考 查询合同信息接口)之后回调地址,响应【"ok"】表示接收回调成功。
- RedirectUrl string `json:"redirectUrl" structs:"redirectUrl,omitempty"` // 合同签署完成后同步回调地址: redirectUrl 若不为空,可以跳转业务方自己的前端过渡页面,实现业务方自己的逻辑。redirectUrl 为空,签署成功后,会回调小程序或app的方法。具体调用方法参考如下。
- RefuseOn int `json:"refuseOn" structs:"refuseOn,omitempty"` // 合同签署页退回按钮开关: 1 - 开启,0 - 关闭(默认)
- AutoContinue int `json:"autoContinue" structs:"autoContinue,omitempty"` // 当前签署人签署完成自动跳转至下一签署人签署开关(仅对顺序签合同生效): 1 - 开启,0 - 关闭(默认)
- ViewFlg int `json:"viewFlg" structs:"viewFlg,omitempty"` // 合同签署完是否允许可以通过链接查看合同内容: 1:不允许查看 不传值:可以查看(默认)
- RedirectReturnUrl string `json:"redirectReturnUrl" structs:"redirectReturnUrl,omitempty"` // 合同发起页面返回按钮跳转url 若不为空,可以跳转业务方自己的前端页面。
- RedirectCompletedUrl string `json:"redirectCompletedUrl" structs:"redirectCompletedUrl,omitempty"` // 合同发起页面完成后跳转url 若不为空,可以跳转业务方自己的前端过渡页面,实现业务方自己的逻辑。
- ContractFiles []interface{} `json:"contractFiles" structs:"contractFiles,omitempty"` // 合同附件(与合同模板必传其一)(支持多文件上传)
- Templates []APITemplate `json:"templates" structs:"templates,omitempty"` // 合同模板列表(与合同附件必传其一)
- }
- // APICreateContractRsp 上传待签署文件出参
- type APICreateContractRsp struct {
- PreviewUrl string `json:"previewUrl"` // 合同预览链接(预览链接3小时内有效,过期后可通过查询合同信息接口重新获取)
- ContractFiles []interface{} `json:"contractFiles"` // 合同文件信息(文件名称,附件编号,页数)
- }
- // APISignStrategy 签章策略
- type APISignStrategy struct {
- AttachNo int `json:"attachNo" structs:"attachNo" binding:"required"` // 附件编号 注:对应上传待签署文件接口(createContract)中,合同附件(contractFiles)或合同模板(templates)参数中的List排序序号(例如:1,2,3...)
- LocationMode int `json:"locationMode" structs:"locationMode" binding:"required"` // 定位方式:2:坐标签章 3:关键字签章 4:模板坐标签章
- CanDrag int `json:"canDrag" structs:"canDrag,omitempty"` // 签章位置是否可以拖动 1:可以, 其他值:不可以
- SignKey string `json:"signKey" structs:"signKey,omitempty"` // 关键字或签署区名称key(定位方式为关键字签章时此处需传定位关键字,定位方式为模板坐标签章时此处需传模板中设置的签署区名称)
- SignType int `json:"signType" structs:"signType,omitempty"` // 印章类型:1:签名/签章(默认) 2:时间戳
- SignPage int `json:"signPage" structs:"signPage,omitempty"` // 签章页码(定位方式为坐标签章时必传)
- SignX float64 `json:"signX" structs:"signX,omitempty"` // 签章位置与当前签约文件的左内边距与当前签约文件宽度的比例(精确到小数点后2位)(定位方式为坐标签章时必传)
- SignY float64 `json:"signY" structs:"signY,omitempty"` // 签章位置与当前签约文件的上内边距与当前签约文件高度的比例(精确到小数点后2位)(定位方式为坐标签章时必传)
- OffsetX float64 `json:"offsetX" structs:"offsetX,omitempty"` // 坐标偏移量(像素PX)
- OffsetY float64 `json:"offsetY" structs:"offsetY,omitempty"` // 坐标偏移量(像素PX)
- }
- // APIReceiverFillStrategy 接收方模板填充策略
- type APIReceiverFillStrategy struct {
- AttachNo int `json:"attachNo" binding:"required"` // 附件编号(合同上传的附件序号:1,2,3…)
- Key string `json:"key" binding:"required"` // 参数名称
- Value string `json:"value" structs:",omitempty"` // ● 填充类型为单行、多行、身份证、日期时传null或空字符串则为页面填充,传值则为即时填充 ● 填充类型为勾选时,Yes:选中;Off:不选中 ● 填充类型为图片时,传base64字符串
- FillStage int `json:"fillStage" structs:",omitempty"` // 当填充类型为单选、复选、勾选、图片时,填充场景标记:2:即时填充(调用当前接口即刻填充,默认) 3:页面填充(用户签约时填充)
- Options []interface{} `json:"options" structs:",omitempty"` // 单、复选选项内容
- RowValues []interface{} `json:"rowValues" structs:",omitempty"` // 表格填充值
- }
- // APIAddSignerReq 添加签署方入参
- //
- // 参数说明:https://preweb.asign.cn/platform/openDoc/docDetail?mid=addSigner
- type APIAddSignerReq struct {
- ContractNo string `json:"contractNo" structs:"contractNo" binding:"required"` // 合同唯一编码 (40位之内)
- Account string `json:"account" structs:"account" binding:"required"` // 用户唯一识别码
- SignType int `json:"signType" structs:"signType" binding:"required"` // 签约方式:2:无感知签约(需要开通权限) 3:有感知签约
- SealNo string `json:"sealNo" structs:"sealNo,omitempty"` // 印章编号【注】若不传值,则由当前主体的默认印章进行签署
- AuthSignAccount string `json:"authSignAccount" structs:"authSignAccount,omitempty"` // 指定授权签约用户,该用户需要有印章编号【sealNo】的有效授权记录,如若不指定则印章的默认使用者进行签署,如无默认使用者,则由当前主体【account】进行签署
- NoticeMobile string `json:"noticeMobile" structs:"noticeMobile,omitempty"` // 通知手机号(用于接收合同签署链接的通知短信)
- NoticeEmail string `json:"noticeEmail" structs:"noticeEmail,omitempty"` // 通知邮箱号(用于接收合同签署链接的通知短信)
- SignOrder string `json:"signOrder" structs:"signOrder,omitempty"` // 使用顺序签约时签约顺序编号(从1开始),无序签约都为1
- IsNotice int `json:"isNotice" structs:"isNotice,omitempty"` // 是否接收合同签署链接的短信通知,优先级高于添加用户接口同名参数:0 - 否(默认),1 - 是
- ValidateType int `json:"validateType" structs:"validateType,omitempty"` // 签署方式指定:(从以下分类中指定一种) 1:短信验证码签约(支持企业和个人) 2:签约密码签约(支持企业和个人) 3:人脸识别签约(支持企业和个人) 4:手写签名(不推荐,仅限个人,需要开通权限) 5:宋体章签名(不推荐,仅限个人,需要开通权限) 6:手写识别签名+短信签约(仅限个人) 7:手写签名+短信签约(仅限个人) 8:手写签名+人脸识别签约(仅限个人) 9:手写识别签名+人脸识别签约(仅限个人) 10:手写签名 + 认证意愿合一(仅支持个人陌生用户) 11:手写签名识别 + 认证意愿合一(仅支持个人陌生用户) 12:宋体章 + 认证意愿合一(仅支持个人陌生用户) 13:视频双录核身签约(需要开通权限)
- FaceAuthMode int `json:"faceAuthMode" structs:"faceAuthMode,omitempty"` // 人脸识别方式:1:支付宝(不可在支付宝小程序中接入) 2:H5(默认) 4:微信小程序(支持在微信小程序内唤起人脸识别,需联系商务人员开启权限后使用) 5:支付宝小程序(支持在支付宝小程序内唤起人脸识别,需联系商务人员开启权限后使用) 【注】签署方式包含人脸(3,8,9)时,可指定人脸识别方式,不传默认为H5
- ValidateTypeList string `json:"validateTypeList" structs:"validateTypeList,omitempty"` // 组合签署方式指定:(从以上分类中指定多种以逗号间隔,示例:1,2,3)。允许开发者可以自主控制展示几种签署方式,让签约用户选择。【注】 validateTypeList和validateType都有传值时,签署方式按照validateTypeList指定
- AutoSwitch int `json:"autoSwitch" structs:"autoSwitch,omitempty"` // 自动切换签约方式:开发者可以自主控制手写内容识别和人脸刷脸识别多次不通过时,是否允许用户切换方式 1 - 仅手写识别允许切换(默认) 2 - 仅人脸识别允许切换 3 - 全部允许 0 - 全部不允许 【注】手写识别三次失败时,会允许用户切换成宋体印章。人脸识别三次不通过,允许切换为短信验证码方式。
- IsNoticeComplete int `json:"isNoticeComplete" structs:"isNoticeComplete,omitempty"` // 合同签署完成后是否通知用户:1 - 是,0 - 否(默认)
- WaterMark int `json:"waterMark" structs:"waterMark,omitempty"` // 是否在距底部10px中央位置添加日期水印: 1 - 是,0 - 否(默认)
- AutoSms int `json:"autoSms" structs:"autoSms,omitempty"` // 是否自动触发验证码短信:(仅短信验证码方式签署时生效)1:是(默认) 0:否(需要用户手动点击“获取验证码”触发)
- CustomSignFlag int `json:"customSignFlag" structs:"customSignFlag,omitempty"` // 签章位置策略:0(默认)- 由该接口的参数signStrategyList或signStrikeList指定 1 - 签署用户在签署时自行拖动签章位置 2 - 签署用户在签署时自行拖动签章位置和骑缝章位置
- IsIframe int `json:"isIframe" structs:"isIframe,omitempty"` // 如果认证页面使用了iframe,且签约涉及人脸识别,则需传入此参数 1.是 0.否(默认) 接入方需要给iframe开启相机权限,方可正常使用实时检测人脸核身功能<iframe allow="camera;"></iframe>
- SignStrategyList []APISignStrategy `json:"signStrategyList" structs:"signStrategyList" binding:"required"` // 签章策略
- SignStrikeList []interface{} `json:"signStrikeList" structs:"signStrikeList,omitempty"` // 骑缝章策略
- ReceiverFillStrategyList []APIReceiverFillStrategy `json:"receiverFillStrategyList" structs:"receiverFillStrategyList,omitempty"` // 接收方模板填充策略
- AuthConfig interface{} `json:"authConfig" structs:"authConfig,omitempty"` // 添加陌生签署人认证参数配置
- }
- // APISignUserDetail 合同用户信息
- type APISignUserDetail struct {
- Account string `json:"account" binding:"required"` // 用户唯一识别码
- SignUrl string `json:"signUrl" binding:"required"` // 合同签署链接
- PwdSignUrl string `json:"pwdSignUrl" binding:"required"` // 密码签署链接
- SignOrder int `json:"signOrder" structs:",omitempty"` // 顺序签约的序号
- Name string `json:"name" binding:"required"` // 用户姓名
- IdCard string `json:"idCard" binding:"required"` // 用户身份证
- }
- // APIAddSignerRsp 添加签署方出参
- type APIAddSignerRsp struct {
- ContractNo string `json:"contractNo"` // 合同编号
- ContractName string `json:"contractName"` // 合同名称
- ValidityTime string `json:"validityTime"` // 合同有效期
- PreviewUrl string `json:"previewUrl"` // 合同预览链接
- SignUser []APISignUserDetail `json:"signUser"` // 合同用户信息
- }
- // APIContractStatusReq 查询合同状态入参
- type APIContractStatusReq struct {
- ContractNo string `json:"contractNo" binding:"required"` // 合同唯一编码
- }
- // APIContractStatusRsp 查询合同状态出参
- type APIContractStatusRsp struct {
- ContractNo string `json:"contractNo"` // 合同唯一编号
- ContractName string `json:"contractName"` // 合同名称
- Status int `json:"status"` // 合同状态:0:等待签约 1:签约中 2:已签约 3:过期 4:拒签 6:作废 -2:状态异常
- }
- // APIDownloadContractReq 下载合同入参
- type APIDownloadContractReq struct {
- ContractNo string `json:"contractNo" binding:"required"` // 合同唯一编码
- Outfile string `json:"outfile" structs:",omitempty"` // 文件本地路径(下载的文件,写到本地,当文件数为1时,下载的文件类型是pdf,否则为zip)
- Force int `json:"force" structs:",omitempty"` // 强制下载标识 0(默认):未签署完的无法下载 1:无论什么状态都强制下载
- DownloadFileType int `json:"downloadFileType" structs:",omitempty"` // 下载文件类型,多附件下载:1:PDF文件 2:多个单张PNG文件,含PDF文件,单附件对应单张图片 3:分页PNG压缩文件,含PDF文件 4:合同单张图片,不含PDF文件 5:所有分页图片,不含PDF文件
- }
- // APIDownloadContractRsp 下载合同出参
- type APIDownloadContractRsp struct {
- FileName string `json:"fileName"` // 文件名
- Md5 string `json:"md5"` // 文件md5值
- FileType int `json:"fileType"` // 文件类型:0:PDF 1:ZIP
- Size int `json:"size"` // 文件大小
- Data string `json:"data"` // Base64字符串
- }
- // APICreateSealReq 创建印章入参
- type APICreateSealReq struct {
- Account string `json:"account" binding:"required"` // 用户唯一识别码
- Image string `json:"image" structs:"-"` // 印章图片(不传以默认模板生成印章)
- IsDefault int `json:"isDefault"` // 是否为默认印章:1 - 是,0 - 否
- Base64ImageStr string `json:"base64ImageStr" structs:",omitempty"` // base64格式的印模图片
- SealName string `json:"sealName"` // 印章抬头文字(60字符以内)【注】印章下方横向展示的文字,例如“合同专用章”等。若不显示文字可传空格
- SealNo string `json:"sealNo" binding:"required"` // 印章唯一编号(32字符以内)
- Scaling float64 `json:"scaling" structs:",omitempty"` // 图片缩放百分比(介于0~1之间的数字)
- Color string `json:"color" structs:",omitempty"` // 印章颜色(仅个人印章有效)【注】参数为RGB16进制数,例如:000000(黑),FF0000(红),默认为黑色。
- HasBorder int `json:"hasBorder" structs:",omitempty"` // 是否带边框(仅个人印章有效)1 - 是,0 - 否(默认)
- Shape int `json:"shape" structs:",omitempty"` // 边框样式(仅个人印章有效)
- }
- // APIModifySealReq 修改印章入参
- type APIModifySealReq struct {
- Account string `json:"account" binding:"required"` // 用户唯一识别码
- Image string `json:"image" structs:"-"` // 印章图片(不传以默认模板生成印章)
- IsDefault int `json:"isDefault"` // 是否为默认印章:1 - 是,0 - 否
- Base64ImageStr string `json:"base64ImageStr" structs:",omitempty"` // base64格式的印模图片
- SealName string `json:"sealName"` // 印章抬头文字(60字符以内)【注】印章下方横向展示的文字,例如“合同专用章”等。若不显示文字可传空格
- SealNo string `json:"sealNo" binding:"required"` // 印章编号(搜索印章用,不做更新)
- Scaling float64 `json:"scaling" structs:",omitempty"` // 图片缩放百分比(介于0~1之间的数字)
- Color string `json:"color" structs:",omitempty"` // 印章颜色(仅个人印章有效)【注】参数为RGB16进制数,例如:000000(黑),FF0000(红),默认为黑色。
- HasBorder int `json:"hasBorder" structs:",omitempty"` // 是否带边框(仅个人印章有效)1 - 是,0 - 否(默认)
- Shape int `json:"shape" structs:",omitempty"` // 边框样式(仅个人印章有效)
- }
- // APIGetUserSealsReq 查询印章入参
- type APIGetUserSealsReq struct {
- Account string `json:"account" structs:"account" binding:"required"` // 用户唯一识别码
- SealNo string `json:"sealNo" structs:"sealNo,omitempty"` // 印章编号(不传则返回印章列表)
- }
- // APISealInfo 印章信息
- type APISealInfo struct {
- SealName string `json:"sealName"` // 印章名称(印章抬头文字)
- SealUrl string `json:"sealUrl"` // 印章图片访问地址(当印章还在做成中时,此值为空)
- IsDefault int `json:"isDefault"` // 是否默认章: 1:是 0:否
- SealNo string `json:"sealNo"` // 印章编号
- }
- // APIGetUserSealsRsp 查询印章出参
- type APIGetUserSealsRsp struct {
- Name string `json:"name"` // 个人用户名称/企业法人名称
- IdNo string `json:"idNo"` // 个人用户证件号/企业法人身份证
- Mobile string `json:"mobile"` // 用户接收短信通知的手机号
- UserType int `json:"userType"` // 用户类型:1:企业 2:个人
- CompanyName string `json:"companyName"` // 企业名称(当用户类型为企业时返回)
- List []APISealInfo `json:"list"` // 印章列表
- }
- // APIWillFaceReq 个人意愿核身认证(双录)入参
- type APIWillFaceReq struct {
- RealName string `json:"realName" binding:"required"` // 真实姓名
- IdCardNo string `json:"idCardNo" binding:"required"` // 身份证号
- Question string `json:"question"` // 意愿核身过程中的播报文本,长度120以内。默认为:“您好,为确保您本人操作,此次签约全程录音录像。请问您本次业务是本人自愿办理吗?请回答:我确认或是的”
- Answer string `json:"answer"` // 用户回答文本,单个回答长度10以内,支持多个文本作为识别内容,文本之间用“|”分割,总长度32以内默认为:“我确认|是的”。
- RedirectUrl string `json:"redirectUrl"` // 人脸认证结果回调通知URL,可拼接参数
- }
- // APIWillFaceRsp 个人意愿核身认证(双录)出参
- type APIWillFaceRsp struct {
- Result int `json:"result" binding:"required"` // 认证结果:0.暂无结果/认证中
- SerialNo string `json:"serialNo" binding:"required"` // 认证流水号
- SType string `json:"type" binding:"required"` // 认证类型
- FaceUrl string `json:"faceUrl" binding:"required"` // 意愿核身链接
- }
|