请求地址:/v5/Contracts/create.json
请求方式:POST
接口版本: 5.1.6
接口描述:
var url = "https://api-v2.1dq.com/v5/Contracts/create.json" var httpArg = "&file_id=signed-ce5858499044c9b8fbbaa272754c145a-108d9e29-0001&name=项目合同协议&open_id=e4c9cf96-a815-11ea-95b6-0242ac110003&signed_data=[ { "open_id": "e4c9cf96-a815-11ea-95b6-0242ac110003", "org_id": "de9beeae-a817-11ea-89a2-0242ac110003" } ]&attachment=[ { "file_id" : "signed-efb2124360fb5f8b109220e27f99ae35-73ff845c-0006", "file_name" : "附件1" }, { "file_id" : "signed-efb2124360fb5f8b109220e27f99ae35-73ff845c-0006", "file_name" : "附件2" } ]&ca_type=1&channel=api©_custom_user=[ { "sign_role":"甲方", "sign_name":"姓名", "sign_number":"电话", "sign_company":"选填项,公司名", "sign_seal_hand":1, "sign_seal_tpl":1, "sign_class":1 } ]©_data=&deposit_certificate_type=1&file_end_date=¬ice_signed=&org_id=de9beeae-a817-11ea-89a2-0242ac110003&pdf_password=&sign_end_date=&signed_custom_user=[ { "sign_role":"甲方", "sign_name":"姓名", "sign_number":"电话", "sign_company":"选填项,公司名", "seal_require":["印章要求"], "sign_class":1 } ]&tpl_data={ "自定义参数": "需要替换的内容1", "自定义参数2": "需要替换的内容2" }&tpl_id=" APISTORE(url, httpArg: httpArg) func APISTORE(httpUrl: String, httpArg: String) { var req = NSMutableURLRequest(URL: NSURL(string: httpUrl + "?" + httpArg)!) req.timeoutInterval = 6 req.HTTPMethod = "GET" NSURLConnection.sendAsynchronousRequest(req, queue: NSOperationQueue.mainQueue()) { (response, data, error) -> Void in let res = response as! NSHTTPURLResponse println(res.statusCode) if let e = error{ println("请求失败") } if let d = data { var content = NSString(data: d, encoding: NSUTF8StringEncoding) println(content) } } }