/file_objects
POST {{base-api-url}}/file_objects
File objects are used to represent the visual of signatures on documents once they have been signed.
Param | Description |
---|---|
file | Defined by the ID received in the previous response. |
member | Defines the member by his own UUID linked with the fileObjects . |
page | Defines the number of the page where the signature image will be displayed on the file. You can duplicate the fileObjects block if you want to add multiple signature images on your document. |
position | 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. |
mention | Optional field that add information on the signature image. mention is displayed on top of signature image. |
mention2 | Optional field that add information on the signature image. mention2 is displayed on bottom of signature image. |
reason | Defines the reason of the signature. This information will be added into the signature panel, directly in the signed PDF document. For more information, please refer to Reason section. |
If you don't want a visual signature on your file, you must create a fileObjects
anyway with no position and the page at 0 => "page": 0,
. Otherwise, the file will be NOT SIGNED (visually) by the member.
You can add several signature images for the same signer and on the same file (for example on page 2 and also on the page 7 and 12) by simply doing several POST.
Request Body
{"file"=>"/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "member"=>"/members/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "position"=>"230,499,464,589", "page"=>2, "mention"=>"Read and approved", "mention2"=>"Signed by John Doe", "reason"=>"Signed by John Doe (Yousign)"}
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
{"id":"/file_objects/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","file":"/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","page":2,"position":"230,499,464,589","fieldName":null,"mention":"Read and approved","mention2":"Signed By John Doe","createdAt":"2018-12-01T17:18:27+01:00","updatedAt":"2018-12-01T17:18:27+01:00","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":"2018-12-01T17:07:40+01:00","updatedAt":"2018-12-01T17:07:40+01:00","finishedAt":null,"status":"pending","comment":null,"parent":null,"reason":"Signed by Yousign"},"parent":null}