Sign offline
The Yoti Sign API has a ‘signed-documents’ function. This allows you to upload a file which has been physically signed by the user. When processing is successful the file will be added to the sign receipt and the recipient will be marked as having signed. If there are errors during this process, integrators will be notified through the sign_ offline _ upload_errors notification.
Sandbox POST https://demo.api.yotisign.com/v2/envelopes/:envelopeId/recipients/:recipientId/signed-documents
Production POST https://api.yotisign.com/v2/envelopes/:envelopeId/recipients/:recipientId/signed-documents
Headers explained
The following elements are needed:
Header | Content |
---|---|
Authorization | API Key to call the Yoti Sign API. This should be sent as a bearer token. |
Content-Type | multipart/form-data |
Example Code
x
const rp = require("request-promise");
const fs = require("fs");
const options = {}; //options object
const signOffline = () => {
const request = {
method: "POST",
uri: `<BASE_URL>/v2/envelopes/<envelopeId>/recipients/<recipientId>/signed-documents`,
formData: {
file: fs.createReadStream("path/to.pdf")
},
headers: {
authorization: "Bearer <API_KEY>",
},
};
return rp(request)
.then((body) => body)
.catch((err) => err);
};
//send request
let result = await signOffline();
Response Body
{
"status": "QUEUED"
}
Error Codes
Error code | Description |
---|---|
400 | Bad Request, example: id provided not a UUID |
401 | Unauthorised request, example: requesting the status on an envelope you are not authorised to view |
413 | The combined file sizes have exceeded the 75MB limit |
422 | The request body did not pass validation |
Was this page helpful?