Hattabitos | Posts: 24

Using Text Anchor to add 3 signatures

0 votes
I have a client who is using REST API to create package. They were able to create a package with one signature, but they got error 500 when adding 3 signatures. Payload: `{ "name":"TEST 32.pdf", "approvals":[ { "signed":null, "accepted":null, "data":null, "fields":[ { "type":"SIGNATURE", "width":200, "height":50, "page":0, "extract":false, "extractAnchor":{ "text":"Dealer Signature", "index":0, "width":150, "height":40, "anchorPoint":"TOPRIGHT", "characterIndex":17, "leftOffset":0, "topOffset":0 } }, { "type":"SIGNATURE", "width":200, "height":50, "page":0, "extract":false, "extractAnchor":{ "text":"Dealer Signature", "index":1, "width":150, "height":40, "anchorPoint":"TOPRIGHT", "characterIndex":17, "leftOffset":0, "topOffset":0 } }, { "type":"SIGNATURE", "width":200, "height":50, "page":0, "extract":false, "extractAnchor":{ "text":"Signed for and on behalf of Dealer\/Supplier", "index":0, "width":150, "height":40, "anchorPoint":"BOTTOMLEFT", "characterIndex":1, "leftOffset":0, "topOffset":10 } } ], "role":"Dealer" } ], "extract":true }` The response they got :
Cake\Network\Http\Response Object
(
    [_code:protected] => 200
    [_body:protected] => {"status":"","id":"631a735b9dba34f3","approvals":[{"role":"Dealer","id":"uEh2GmWB890Z","signed":null,"accepted":null,"data":null,"fields":[{"validation":null,"page":6,"top":774.5703735351562,"id":"sXtQe37Gph45","subtype":"FULLNAME","height":40.29999923706055,"binding":null,"extractAnchor":null,"left":157.2237091064453,"width":149.5,"extract":false,"data":null,"type":"SIGNATURE","value":"","name":"sXtQe37Gph45"}],"name":""}],"pages":[{"top":0.0,"id":"ae7ae014bfb7e7f4_1.png","height":1095.0,"left":0.0,"width":774.0,"version":635205,"index":0},{"top":0.0,"id":"ae7ae014bfb7e7f4_2.png","height":1095.0,"left":0.0,"width":774.0,"version":635206,"index":1},{"top":0.0,"id":"ae7ae014bfb7e7f4_3.png","height":1095.0,"left":0.0,"width":774.0,"version":635207,"index":2},{"top":0.0,"id":"ae7ae014bfb7e7f4_4.png","height":1095.0,"left":0.0,"width":774.0,"version":635208,"index":3},{"top":0.0,"id":"ae7ae014bfb7e7f4_5.png","height":1095.0,"left":0.0,"width":774.0,"version":635209,"index":4},{"top":0.0,"id":"ae7ae014bfb7e7f4_6.png","height":1095.0,"left":0.0,"width":774.0,"version":635210,"index":5},{"top":0.0,"id":"ae7ae014bfb7e7f4_7.png","height":1095.0,"left":0.0,"width":774.0,"version":635211,"index":6},{"top":0.0,"id":"ae7ae014bfb7e7f4_8.png","height":1095.0,"left":0.0,"width":774.0,"version":635212,"index":7},{"top":0.0,"id":"ae7ae014bfb7e7f4_9.png","height":1095.0,"left":0.0,"width":774.0,"version":635213,"index":8},{"top":0.0,"id":"ae7ae014bfb7e7f4_10.png","height":1095.0,"left":0.0,"width":774.0,"version":635214,"index":9},{"top":0.0,"id":"ae7ae014bfb7e7f4_11.png","height":1095.0,"left":0.0,"width":774.0,"version":635215,"index":10},{"top":0.0,"id":"ae7ae014bfb7e7f4_12.png","height":1095.0,"left":0.0,"width":774.0,"version":635216,"index":11},{"top":0.0,"id":"ae7ae014bfb7e7f4_13.png","height":1095.0,"left":0.0,"width":774.0,"version":635217,"index":12},{"top":0.0,"id":"ae7ae014bfb7e7f4_14.png","height":1095.0,"left":0.0,"width":774.0,"version":635218,"index":13},{"top":0.0,"id":"ae7ae014bfb7e7f4_15.png","height":1095.0,"left":0.0,"width":774.0,"version":635219,"index":14},{"top":0.0,"id":"ae7ae014bfb7e7f4_16.png","height":1095.0,"left":0.0,"width":774.0,"version":635220,"index":15},{"top":0.0,"id":"ae7ae014bfb7e7f4_17.png","height":1095.0,"left":0.0,"width":774.0,"version":635221,"index":16},{"top":0.0,"id":"ae7ae014bfb7e7f4_18.png","height":1095.0,"left":0.0,"width":774.0,"version":635222,"index":17},{"top":0.0,"id":"ae7ae014bfb7e7f4_19.png","height":1095.0,"left":0.0,"width":774.0,"version":635223,"index":18},{"top":0.0,"id":"ae7ae014bfb7e7f4_20.png","height":1095.0,"left":0.0,"width":774.0,"version":635224,"index":19},{"top":0.0,"id":"ae7ae014bfb7e7f4_21.png","height":1095.0,"left":0.0,"width":774.0,"version":635225,"index":20},{"top":0.0,"id":"ae7ae014bfb7e7f4_22.png","height":1095.0,"left":0.0,"width":774.0,"version":635226,"index":21},{"top":0.0,"id":"ae7ae014bfb7e7f4_23.png","height":1095.0,"left":0.0,"width":774.0,"version":635227,"index":22},{"top":0.0,"id":"ae7ae014bfb7e7f4_24.png","height":1095.0,"left":0.0,"width":774.0,"version":635228,"index":23},{"top":0.0,"id":"ae7ae014bfb7e7f4_25.png","height":1095.0,"left":0.0,"width":774.0,"version":635229,"index":24},{"top":0.0,"id":"ae7ae014bfb7e7f4_26.png","height":1095.0,"left":0.0,"width":774.0,"version":635230,"index":25},{"top":0.0,"id":"ae7ae014bfb7e7f4_27.png","height":1095.0,"left":0.0,"width":774.0,"version":635231,"index":26},{"top":0.0,"id":"ae7ae014bfb7e7f4_28.png","height":1095.0,"left":0.0,"width":774.0,"version":635232,"index":27},{"top":0.0,"id":"ae7ae014bfb7e7f4_29.png","height":1095.0,"left":0.0,"width":774.0,"version":635233,"index":28}],"external":null,"extract":false,"index":4,"data":null,"description":"","fields":[],"name":"TEST2  32","size":200373}
    [_xml:protected] => 
    [_json:protected] => 
    [_exposedProperties:protected] => Array
        (
            [cookies] => _cookies
            [headers] => _headers
            [body] => _body
            [code] => _code
            [json] => _getJson
            [xml] => _getXml
        )

    [_headers:protected] => Array
        (
            [Server] => nginx
            [Date] => Fri, 29 Jan 2016 10:44:05 GMT
            [Content-Type] => text/html
            [Connection] => close
            [Expires] => Fri, 29 Jan 2016 10:44:05 GMT
            [Cache-Control] => no-cache, no-transform, max-age=0
            [X-Powered-By] => Undertow 1
        )

    [_cookies:protected] => Array
        (
        )

    [_version:protected] => 1.1

harishaidary | Posts: 1812

Reply to: Using Text Anchor to add 3 signatures

0 votes
I was able to create 3 signatures using text anchor with the following json:
{  
   \"name\":\"Document With Anchors\",
   \"index\":0,
   \"approvals\":[  
      {  
         \"fields\":[  
            {  
               \"type\":\"SIGNATURE\",
               \"width\":200.0,
               \"height\":50.0,
               \"page\":0,
               \"extract\":false,
               \"extractAnchor\":{  
                  \"text\":\"Dealer Signature\",
                  \"index\":0,
                  \"width\":150,
                  \"height\":40,
                  \"anchorPoint\":\"BOTTOMRIGHT\",
                  \"characterIndex\":9,
                  \"leftOffset\":0,
                  \"topOffset\":0
               },
               \"left\":0.0,
               \"subtype\":\"FULLNAME\",
               \"top\":0.0
            }
         ],
         \"role\":\"Dealer\"
      },
      {  
         \"fields\":[  
            {  
               \"type\":\"SIGNATURE\",
               \"width\":200.0,
               \"height\":50.0,
               \"page\":0,
               \"extract\":false,
               \"extractAnchor\":{  
                  \"text\":\"Dealer Signature\",
                  \"index\":1,
                  \"width\":150,
                  \"height\":40,
                  \"anchorPoint\":\"BOTTOMRIGHT\",
                  \"characterIndex\":9,
                  \"leftOffset\":0,
                  \"topOffset\":0
               },
               \"left\":0.0,
               \"subtype\":\"FULLNAME\",
               \"top\":0.0
            }
         ],
         \"role\":\"Dealer\"
      },
      {  
         \"fields\":[  
            {  
               \"type\":\"SIGNATURE\",
               \"width\":200.0,
               \"height\":50.0,
               \"page\":0,
               \"extract\":false,
               \"extractAnchor\":{  
                  \"text\":\"Signed for and on behalf of Dealer\",
                  \"index\":0,
                  \"width\":150,
                  \"height\":40,
                  \"anchorPoint\":\"BOTTOMRIGHT\",
                  \"characterIndex\":9,
                  \"leftOffset\":0,
                  \"topOffset\":0
               },
               \"left\":0.0,
               \"subtype\":\"FULLNAME\",
               \"top\":0.0
            }
         ],
         \"role\":\"Dealer\"
      }
   ],
   \"extract\":true
}
I got the following result: text_anchor Please let your client know that when making his request, the accept header field should include "text/html". I apologize if it wasn't clear in our documentation. We are actively working on improving it. Documentation is a priority going forward and you will see some changes over the coming months. Hope this helps!

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off