In the modern times we live in now, most organizations are going paperless. There are very many reasons behind this; my personal favorite is coz we want to save the earth so we should all go green.
在我们现在生活的现代时代,大多数组织都变得无纸化 。 这背后有很多原因。 我个人最喜欢的是因为我们想拯救地球,所以我们都应该走向绿色。
However, this paperless dream seems to be blocked when it comes to signatures. Having to print and physically sign documents, letters etc. is highly inefficient and messes up the electronic workflow we have going on. In comes eSignatures, with this tech we can create and send signed documents without much hustle and even have a better way to authenticate and prove integrity compared to handwritten signatures.
但是,当涉及签名时,这个无纸化的梦想似乎被阻止了。 必须打印和物理签名文档,信件等效率很低,并且搞乱了我们正在进行的电子工作流程。 eSignatures附带了这项技术,与手写签名相比,我们可以毫不费力地创建和发送签名文档,甚至拥有更好的身份验证和证明完整性的方法。
什么是Eversign eSignature API? ( What is the Eversign eSignature API? )
It is a RESTful API that provides methods that give us some really cool functionality in our web apps. These include:
它是一个RESTful API,提供的方法可以为我们的Web应用程序提供一些非常酷的功能。 这些包括:
- Creating and viewing documents and templates 创建和查看文档和模板
- Accessing your documents and templates lists 访问您的文档和模板列表
- Canceling and deleting documents and templates 取消和删除文档和模板
With this API you can have all these documents and templates are signed. You can also have Embedded Signing which when set up allows your signers to sign documents/templates directly on your website!
使用此API,您可以对所有这些文档和模板进行签名。 您还可以使用嵌入式签名 ,该签名在设置时允许签名人直接在您的网站上签名文档/模板!
Pretty sweet!
真可爱!
Most of the actions the API offers are core functionalities offered by eversign itself. Have a look at their website they offer helpful services for businesses that are looking to go paperless and much much more.
API提供的大多数操作是eversign本身提供的核心功能。 看看他们的网站,他们为希望无纸化的企业提供有用的服务。
入门 ( Getting started )
So what do you need to integrate this API? Just head on over to this site. Sign up for free! (PS. No credit card needed) create a profile it should open up your dashboard.
那么,您需要集成什么API? 只需转到该站点即可 。 免费注册! (PS。不需要信用卡)创建一个配置文件,它将打开您的仪表板。
![](https://i-blog.csdnimg.cn/blog_migrate/74954a1d38d3d3bdbcf19ee069d70cc6.png)
On top right corner of you dashboard, click to open up a dropdown and select developer
.
在信息中心的右上角,单击以打开一个下拉列表,然后选择developer
。
![](https://scotch-res.cloudinary.com/image/upload/w_auto,q_auto:good,f_auto/media/1/oQ0I9uGKR7eXZ5KcDfNF_screen_shot.png)
The page that loads up is where we'll get all the keys
and ids
we'd need for our API requests.
在加载的页面上,我们将获得API请求所需的所有keys
和ids
。
We'll look into making a simple request to the API just to see how an example request would look like. Fortunately for us, eversign's documentation is very well written and easy to follow so integrating the API and using the methods you require shouldn't be hard.
我们将研究对API的简单请求,以查看示例请求的外观。 对我们来说幸运的是,eversign的文档写得很好并且易于遵循,因此集成API并使用所需的方法并不难。
上市业务 ( Listing businesses )
When you signed up you noticed that you had to add a business. You can have many different businesses. Let's say we want a list of these businesses.
注册时,您注意到您必须添加一家公司。 您可以有许多不同的业务。 假设我们要列出这些业务。
All we need is to make a HTTP GET
request to this URL:
我们所需要做的就是对此URL发出HTTP GET
请求:
https://api.eversign.com/api/business?access_key=YOUR_ACCESS_KEY
We now need to change this part YOUR_ACCESS_KEY
with your specific access key from the developer dashboard.
现在,我们需要使用开发人员信息中心中的特定访问密钥来更改此部分YOUR_ACCESS_KEY
。
A successful API call should return a response of this pattern:
成功的API调用应返回以下模式的响应:
[{
"business_id": 1,
"business_status": 1,
"business_identifier": "first",
"business_name": "My First Business",
"creation_time_stamp": 1490203825,
"is_primary": 1
}, {
"business_id": 2,
"business_status": 1,
"business_identifier": "second",
"business_name": "My Second Business",
"creation_time_stamp": 1490203925,
"is_primary": 0
}]
Thats it!
而已!
Just for fun let's create a document.
为了好玩,让我们创建一个文档。
建立文件 ( Create a document )
This as you may have guessed will be a HTTP POST
request. The URL to create a document is:
您可能已经猜到这将是HTTP POST
请求。 创建文档的URL为:
https://api.eversign.com/api/document?access_key=YOUR_ACCESS_KEY&business_id=YOUR_BUSINESS_ID
We then replace YOUR_ACCESS_KEY
and YOUR_BUSINESS_ID
with the ones on the developer dashboard. If you do not specify the business_id
it will default to your primary business.
然后,我们将开发人员信息中心上的YOUR_ACCESS_KEY
和YOUR_BUSINESS_ID
替换为。 如果您未指定business_id
,它将默认为您的主要业务 。
Because it is a POST
request we will obviously need a body which for example would be this:
因为这是一个POST
请求,所以我们显然需要一个正文,例如:
{
"sandbox": 0,
"is_draft": 0,
"embedded": 0,
"title": "Sample Document",
"message": "This is my general document message.",
"use_signer_order": 1,
"reminders": 1,
"require_all_signers": 1,
"custom_requester_name": "",
"custom_requester_email": "",
"redirect": "https://myredirect.com/completed",
"redirect_decline": "https://myredirect.com/declined",
"client": "",
"expires": 1494276966,
"embedded_signing_enabled": 0,
"flexible_signing": 0,
"use_hidden_tags": 0,
"files": [{
"name": "My Document File",
"file_url": "https://website.com/contract.pdf",
"file_id": "",
"file_base64": ""
}, {
"name": "My Second Document File",
"file_url": "https://website.com/second_contract.pdf",
"file_id": "",
"file_base64": ""
}],
"signers": [{
"id": 1,
"name": "Paul McSign",
"email": "paul@mcsign.com",
"order": 1,
"pin": "3874",
"message": "This is my custom message to Paul.",
"deliver_email": "",
"language": "en"
}],
"recipients": [{
"name": "Jane McSign",
"email": "jane@mcsign.com",
"language": "en"
}],
"meta": {
"some_key": "some_value",
"another_key": "another_value"
},
"fields": [
[{
"type": "signature",
"x": "120.43811219946572",
"y": "479.02760463045416",
"width": "120",
"height": "35",
"page": "2",
"signer": "1",
"name": "",
"identifier": "unique_field_identifier_1",
"required": 1,
"readonly": 0,
"validation_type": "",
"text_size": "",
"text_color": "",
"text_font": "",
"text_style": "",
"value": "",
"options": [],
"group": ""
}]
]
}
For more details about the fields on the message body, have a look at this, it is a section of the eSignature API.
有关消息正文中字段的更多详细信息,请查看this ,它是eSignature API的一部分。
A successful request will return the entire document in a JSON format.
成功的请求将以JSON格式返回整个文档。
eversign eSignature API的其他好处 ( Additional perks of the eversign eSignature API )
Embedding Signatures - I mentioned a bit about this in the beginning of this article. This is a really cool feature to add. It is also very clearly documented on here.
嵌入签名-我在本文开头提到了一些相关信息。 这是一个非常酷的功能。 它也很清楚地记录在这里 。
Libraries - They have a Python, NodeJS and PHP SDK that wraps the eversign API.
There are a ton of great stuff you can play around with using eversign's API. They have a great documentation so feel free to go around and look around.
您可以使用eversign的API玩很多很棒的东西。 他们有很棒的文档,所以随时随地看看。
结论 ( Conclusion )
In this article, I just pulled back the curtain on Eversign's API. Make sure to explore it. If you have not been using eSignatures you should highly consider changing your mind on that. While creating apps that deal with user documents, contracts etc. give your users the ability to sign electronically for efficiency and consistency. Enjoy!
在本文中,我只是拉开了Eversign API的帷幕。 确保探索它。 如果您没有使用过eSignatures,则应高度考虑改变主意。 在创建处理用户文档,合同等的应用程序时,您的用户可以进行电子签名以提高效率和一致性。 请享用!