/file_objects
POST https://staging-api.yousign.com/file_objects
To add text fields on the document for members of the procedure, here are the details of parameters:
Param | Description |
---|---|
type (required for text fields) | There are 2 types of fields: signature (default value) or text which will be used for text fields. |
contentRequired | true (default value) allows you to make it mandatory to enter the field or false if it’s optional. |
content | null if the text field needs to be empty or the placeholder could be added by a string (e.g. "Here is the sample text." ). |
file (required) | ID of the file where the be attached to this file object. |
member (required) | ID of the member will be attached to this file object. null is also allow if the creator of the procedure has to fill in it. |
position (required) | Defines the coordinates of the signature image. You can go to How to calculate the coordinates of signature image? if you want to understand how to calculate the position. If you want to define the position manually, you can use our free tool on: https://placeit.yousign.fr. |
page (required) | Defines the number of the page where will be located the field. |
fontFamily | Only the default value (raleway ) is currently used. |
fontSize | Only the default value (12 ) is currently used. |
fontColor | Black ("0,0,0" ) is the default color of text fields. You can edit this RGB value only through our API. |
Request Body
{"type"=>"text", "contentRequired"=>true, "content"=>"Here is the sample text.", "file"=>"/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "member"=>"/members/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "position"=>"173,642,522,676", "page"=>2}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string | This value is a secret and needs to be replaced by your API Key (Bearer). | |
Content-Type | string | This header specifies the format of the exchanges in JSON. | |
RESPONSES
status: Created
{"contentRequired":true,"content":"Here is the sample text.","fontFamily":"raleway","fontSize":12,"fontColor":"0,0,0","member":{"id":"/members/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","user":null,"type":"signer","firstname":"John","lastname":"Doe","email":"john.doe@yousign.fr","phone":"+33612345678","position":1,"createdAt":"2019-06-11T14:39:51+02:00","updatedAt":"2019-06-11T14:39:51+02:00","finishedAt":null,"status":"pending","comment":null,"parent":null,"contact":null,"fields":null},"id":"/file_objects/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","type":"text","file":"/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","page":2,"position":"173,642,522,676","createdAt":"2019-06-11T14:43:43+02:00","updatedAt":"2019-06-11T14:43:43+02:00","parent":null}