{"_id":"5536e73f9f7f2d0d00b1cd59","version":{"_id":"553591cd63cc650d00312925","project":"55357364e02d480d0003c6d3","__v":13,"forked_from":"55357365e02d480d0003c6d6","createdAt":"2015-04-20T23:54:53.134Z","releaseDate":"2015-04-20T23:54:53.134Z","categories":["553591cd63cc650d00312926","553591cd63cc650d00312927","5536e4d39f7f2d0d00b1cd54","5536e55c20d5ca0d0001580a","5536e6bf7fe60f0d000fd1c0","5536f5bba171250d00c00556","553a974369c2630d00a8562e","553a97c60074c80d00621c2a","553a98332af5f20d000fc32a","553a9b9869c2630d00a85642","556e0f23d02e0b190042f13d","563249b1dcc27a1700823650","5639113f049e420d00476b03","59a5dd94aaa11d003334edb4"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"project":"55357364e02d480d0003c6d3","user":"55356ede6040a20d00454508","category":{"_id":"5536e6bf7fe60f0d000fd1c0","__v":18,"pages":["5536e6ed9f7f2d0d00b1cd56","5536e736bbb4a70d00a53534","5536e73f9f7f2d0d00b1cd59","5536e74dbbb4a70d00a53536","5536e7569f7f2d0d00b1cd5b","5536e7609f7f2d0d00b1cd5d","5536e76b20d5ca0d0001580d","5536e78220d5ca0d0001580f","5536e797b91d030d004c3d91","5536e7a120d5ca0d00015811","5536e7b320d5ca0d00015813","5536e7bbbbb4a70d00a5353a","5536e7c99f7f2d0d00b1cd60","5536e7d29030530d0007f860","5536e7dbbbb4a70d00a5353c","5536e7e69f7f2d0d00b1cd62","5571ef581cd8283500a8b4de","55b80d6be89bbf25009f045b"],"project":"55357364e02d480d0003c6d3","version":"553591cd63cc650d00312925","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-04-22T00:09:35.017Z","from_sync":false,"order":9,"slug":"form-fields","title":"Form Fields"},"__v":13,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-04-22T00:11:43.769Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"The Signature Field is used to capture the lines that represent a signature. \n\nEach line in a signature has a start point and an end point.  The start point is represented in the line by `x1` and `y1`.  Similarly, the end point is represented in the line by `x2` and `y2`.  The following `JSON` details how a single line is represented in the `lines` collection.  \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\\"lines\\\": [\\n    {\\n      // start point\\n      \\\"x1\\\": 100, \\n      \\\"y1\\\": 49,\\n      \\n      // end point\\n      \\\"x2\\\": 100,\\n      \\\"y2\\\": 49\\n    },\\n  \\n    // ... additional lines\\n\\t\\n\\t]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nIn order to set or update the signature add or remove lines from the `lines` property of the signature field.  \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"Customer Signature\\\": {\\n    \\\"lines\\\": [\\n      {\\n        \\\"x1\\\": 100,\\n        \\\"y1\\\": 49,\\n        \\\"x2\\\": 100,\\n        \\\"y2\\\": 49\\n      },\\n      {\\n        \\\"x1\\\": 100,\\n        \\\"y1\\\": 49,\\n        \\\"x2\\\": 100,\\n        \\\"y2\\\": 49\\n      }\\n      ….    // lines omitted for brevity\\n    ],\\n    \\\"id\\\": \\\"f28d66c0-9432-4da5-aa3b-a46c0108d3c5\\\",\\n    \\\"name\\\": \\\"Customer Signature\\\",\\n    \\\"type\\\": \\\"Signature\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"NOTE:\",\n  \"body\": \"The id, name, and type are not necessary when setting or updating the Signature Field.  These properties are returned in the `JSON` of the request for readability.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Location\"\n}\n[/block]\nIn addition to the `lines` property, the Signature Field also contains a `location` property which can be set to capture where (using a geographic coordinate) a signature was performed.  \n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"NOTE:\",\n  \"body\": \"The `location` property is an optional property on the Signature Field.\"\n}\n[/block]\nThe `location` property has three properties:\n1. `latitude` - The latitudinal position of a geographic coordinate.\n2. `longitude` - The longitudinal position of a geographic coordinate.\n3. `accuracy` - The accuracy of the captured geographic coordinate.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"NOTE:\",\n  \"body\": \"The `accuracy` property of a `location` is optional.\"\n}\n[/block]\nThe following `JSON` snippet shows how to set the location:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n \\\"location\\\": {\\n  \\\"latitude\\\": 32.715410, \\n  \\\"longitude\\\": -117.168705,\\n  // accuracy omitted since it's not required...\\n }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"signature-field","type":"basic","title":"Signature Field"}
The Signature Field is used to capture the lines that represent a signature. Each line in a signature has a start point and an end point. The start point is represented in the line by `x1` and `y1`. Similarly, the end point is represented in the line by `x2` and `y2`. The following `JSON` details how a single line is represented in the `lines` collection. [block:code] { "codes": [ { "code": "{\n\"lines\": [\n {\n // start point\n \"x1\": 100, \n \"y1\": 49,\n \n // end point\n \"x2\": 100,\n \"y2\": 49\n },\n \n // ... additional lines\n\t\n\t]\n}", "language": "json" } ] } [/block] In order to set or update the signature add or remove lines from the `lines` property of the signature field. [block:code] { "codes": [ { "code": "{\n \"Customer Signature\": {\n \"lines\": [\n {\n \"x1\": 100,\n \"y1\": 49,\n \"x2\": 100,\n \"y2\": 49\n },\n {\n \"x1\": 100,\n \"y1\": 49,\n \"x2\": 100,\n \"y2\": 49\n }\n …. // lines omitted for brevity\n ],\n \"id\": \"f28d66c0-9432-4da5-aa3b-a46c0108d3c5\",\n \"name\": \"Customer Signature\",\n \"type\": \"Signature\"\n }\n}", "language": "json" } ] } [/block] [block:callout] { "type": "info", "title": "NOTE:", "body": "The id, name, and type are not necessary when setting or updating the Signature Field. These properties are returned in the `JSON` of the request for readability." } [/block] [block:api-header] { "type": "basic", "title": "Location" } [/block] In addition to the `lines` property, the Signature Field also contains a `location` property which can be set to capture where (using a geographic coordinate) a signature was performed. [block:callout] { "type": "info", "title": "NOTE:", "body": "The `location` property is an optional property on the Signature Field." } [/block] The `location` property has three properties: 1. `latitude` - The latitudinal position of a geographic coordinate. 2. `longitude` - The longitudinal position of a geographic coordinate. 3. `accuracy` - The accuracy of the captured geographic coordinate. [block:callout] { "type": "info", "title": "NOTE:", "body": "The `accuracy` property of a `location` is optional." } [/block] The following `JSON` snippet shows how to set the location: [block:code] { "codes": [ { "code": "{\n \"location\": {\n \"latitude\": 32.715410, \n \"longitude\": -117.168705,\n // accuracy omitted since it's not required...\n }\n}", "language": "json" } ] } [/block]