电子合同API开发文档 v5

设置签署位置

请求地址:/v5/Contracts/positionSign.json

请求方式:POST

接口版本: 5.2.3

接口描述:

NSString *httpUrl = @"https://api-v2.1dq.com/v5/Contracts/positionSign.json";
NSString *httpArg = @"easy_id=175592531139104768&position=[
    {
        "x": "200",
        "y": "200",
        "page": "第几页",
        "seal_type": "1、普通印章,2、骑缝章",
        "user_type": "类型,1为个人,2为企业",

        "seal_width": "无特殊要求,不用传递,为空默认即可。签署区域宽度",
        "seal_height": "无特殊要求,不用传递,为空默认即可。签署区域高度",
        "area_title": "无特殊要求,不用传递,为空默认即可。签署提示",
        "page_width": "无特殊要求,不用传递,为空默认即可。指定页面宽度",
        "sign_id": "无特殊要求,不用传递,为空默认即可。签署人或填写人id"
    }
]&words_id=&number=test@1dq.com";
[self request: httpUrl withHttpArg: httpArg];

-(void)request: (NSString*)httpUrl withHttpArg: (NSString*)HttpArg  {
    NSString *urlStr = [[NSString alloc]initWithFormat: @"%@?%@", httpUrl, HttpArg];
    NSURL *url = [NSURL URLWithString: urlStr];
    NSMutableURLRequest *request = [[NSMutableURLRequest alloc]initWithURL: url cachePolicy: NSURLRequestUseProtocolCachePolicy timeoutInterval: 10];
    [request setHTTPMethod: @"GET"];
    [NSURLConnection sendAsynchronousRequest: request
        queue: [NSOperationQueue mainQueue]
        completionHandler: ^(NSURLResponse *response, NSData *data, NSError *error){
            if (error) {
                NSLog(@"Httperror: %@%ld", error.localizedDescription, error.code);
            } else {
                NSInteger responseCode = [(NSHTTPURLResponse *)response statusCode];
                NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
                NSLog(@"HttpResponseCode:%ld", responseCode);
                NSLog(@"HttpResponseBody %@",responseString);
            }
        }];
}