Skip to content

Instantly share code, notes, and snippets.

@cw6365
Created March 5, 2015 18:28
Show Gist options
  • Save cw6365/e68da6ddba87d115beda to your computer and use it in GitHub Desktop.
Save cw6365/e68da6ddba87d115beda to your computer and use it in GitHub Desktop.
Post {{url}}/documents
{
"title" : "testdoc1133",
"signers" : [
{
"name" : "Test Account",
"email" : "[email protected]"
}
],
"fields" : [
7
],
"file" : "g_G8pdHpLORAoMxutsRzR1WHSxVgIA",
"auth_token" : "2p1ze2yUJuebGqFLRVGp"
}
-- response --
{"title":"testdoc1133","description":null,"status":"Pending","id":"d_0LnrROyRcfr6jy-PmclD0gmtcjEA","date":"2015-03-05T17:22:12+00:00","href":"http://esign.dev/api/documents/d_0LnrROyRcfr6jy-PmclD0gmtcjEA","signed_file":{"url":null},"original_file":{"id":"g_G8pdHpLORAoMxutsRzR1WHSxVgIA","url":"https://esign-development.s3-eu-west-1.amazonaws.com/uploads/original_file/file/000/012/561/test_title.pdf?AWSAccessKeyId=AKIAIJH7DXPWFDMMAQ2Q&Signature=GfyX8UAdaV6g%2F%2FZB11bRjVHthyA%3D&Expires=1425576732","filename":"test_title.pdf","processing":true},"author":{"current":true,"name":"Chris Ward","email":"[email protected]"},"signer_id":null,"additional_info":null,"signers":[{"name":"Test Account","email_address":"[email protected]","last_viewed":null,"response_ip":null,"response_os":null,"response_browser":null,"response_browser_version":null,"passport_check":null,"driving_licence_check":null,"utility_bill_check":null,"signed_at":null,"uuid":"VtZf_-M6PyZY1cOMeTg0ShceZT4fzQ","status":"Pending","current":false,"registered":false}],"labels":[]}
---
PUT {{url}}/signers/VtZf_-M6PyZY1cOMeTg0ShceZT4fzQ?auth_token={{auth_token}}
{
"title" : "testdoc1133",
"signers" : [
{
"name" : "Test Account",
"email" : "[email protected]"
}
],
"fields" : [
7
],
"file" : "g_G8pdHpLORAoMxutsRzR1WHSxVgIA",
"auth_token" : "2p1ze2yUJuebGqFLRVGp"
}
-- response --
{"title":"testdoc1133","description":null,"status":"Pending","id":"d_0LnrROyRcfr6jy-PmclD0gmtcjEA","date":"2015-03-05T17:22:12+00:00","href":"http://esign.dev/api/documents/d_0LnrROyRcfr6jy-PmclD0gmtcjEA","signed_file":{"url":null},"original_file":{"id":"g_G8pdHpLORAoMxutsRzR1WHSxVgIA","url":"https://esign-development.s3-eu-west-1.amazonaws.com/uploads/original_file/file/000/012/561/test_title.pdf?AWSAccessKeyId=AKIAIJH7DXPWFDMMAQ2Q&Signature=GfyX8UAdaV6g%2F%2FZB11bRjVHthyA%3D&Expires=1425576732","filename":"test_title.pdf","processing":true},"author":{"current":true,"name":"Chris Ward","email":"[email protected]"},"signer_id":null,"additional_info":null,"signers":[{"name":"Test Account","email_address":"[email protected]","last_viewed":null,"response_ip":null,"response_os":null,"response_browser":null,"response_browser_version":null,"passport_check":null,"driving_licence_check":null,"utility_bill_check":null,"signed_at":null,"uuid":"VtZf_-M6PyZY1cOMeTg0ShceZT4fzQ","status":"Pending","current":false,"registered":false}],"labels":[]}
-- correct --
PUT {{url}}/signers/VtZf_-M6PyZY1cOMeTg0ShceZT4fzQ?auth_token={{auth_token}}
{
"passport_check" : "true",
"utility_bill_check" : "false",
"id" : "VtZf_-M6PyZY1cOMeTg0ShceZT4fzQ",
"system" : {
"os" : "Safari",
"browser" : "iphone",
"browser_version" : 1
},
"required_fields" : [
{
"id" : 7,
"field_type" : "checkbox",
"label" : "Passport",
"slug" : "passport"
}
],
"driving_licence_check" : "false",
"stamps" : [
{
"y" : "36",
"stamp_type" : "signature",
"page" : 1,
"x" : "38"
}
],
"agreed" : true
}
-- response --
{"success":true,"document":{"title":"testdoc1133","description":null,"status":"Signed","id":"d_0LnrROyRcfr6jy-PmclD0gmtcjEA","date":"2015-03-05T17:22:12+00:00","href":"http://esign.dev/api/documents/d_0LnrROyRcfr6jy-PmclD0gmtcjEA","signed_file":{"url":"https://esign-development.s3-eu-west-1.amazonaws.com/uploads/document/file/000/011/898/testdoc1133-d_0LnrROyRcfr6jy-PmclD0gmtcjEA.pdf?AWSAccessKeyId=AKIAIJH7DXPWFDMMAQ2Q&Signature=ZbxhjK0WwtMTPq8kLa7Lp4IC0nE%3D&Expires=1425580155"},"original_file":{"id":"g_G8pdHpLORAoMxutsRzR1WHSxVgIA","url":"https://esign-development.s3-eu-west-1.amazonaws.com/uploads/original_file/file/000/012/561/test_title.pdf?AWSAccessKeyId=AKIAIJH7DXPWFDMMAQ2Q&Signature=IP7D7hPVHHZYEIhIjs4KDoNHqCE%3D&Expires=1425580155","filename":"test_title.pdf","processing":true},"images":[{"url":"https://esign-development.s3-eu-west-1.amazonaws.com/uploads/document_image/000/000/060/d_0LnrROyRcfr6jy-PmclD0gmtcjEA_1.png?AWSAccessKeyId=AKIAIJH7DXPWFDMMAQ2Q&Signature=uZXpNDCqGEZTPB7tBU96mj1jUrM%3D&Expires=1425580155"},{"url":"https://esign-development.s3-eu-west-1.amazonaws.com/uploads/document_image/000/000/061/d_0LnrROyRcfr6jy-PmclD0gmtcjEA_2.png?AWSAccessKeyId=AKIAIJH7DXPWFDMMAQ2Q&Signature=lgZygc6aoPkL8HtH2WxZpyGDcNk%3D&Expires=1425580155"}],"author":{"current":true,"name":"Chris Ward","email":"[email protected]"},"signer_id":null,"additional_info":null,"signers":[{"name":"Test Account","email_address":"[email protected]","last_viewed":null,"response_ip":"127.0.0.1","response_os":"Safari","response_browser":"iphone","response_browser_version":1,"passport_check":true,"driving_licence_check":null,"utility_bill_check":null,"signed_at":"2015-03-05T18:10:57+00:00","uuid":"VtZf_-M6PyZY1cOMeTg0ShceZT4fzQ","status":"Signed","current":false,"registered":false,"required_fields":[{"id":7,"slug":"passport","label":"Passport","field_type":"checkbox"}],"required_additional_fields":[]}],"labels":[]}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment