Search envelope
The Yoti Sign API has an ‘search’ function. This allows you to search for envelopes with filters to only retrieve envelopes with specific attributes.
Sandbox:
GET https://demo.api.yotisign.com/v2/organisations/envelopes/search
Production:
GET https://api.yotisign.com/v2/organisations/envelopes/search
Headers explained
The following elements are needed:
Headers | Content |
---|---|
Authorization | API Key to call the Yoti Sign API. This should be sent as a bearer token. |
Example code
x
const rp = require("request-promise");
const searchEnvelope = () => {
const request = {
method: "GET",
uri: "<BASE_URL>/v2/organisations/envelopes/search",
headers: {
authorization: "Bearer <API_KEY>",
},
};
return rp(request)
.then((body) => body)
.catch((err) => err);
};
//send request
let result = await searchEnvelope();
Query Parameters
With the search request you have the option to add the below query parameters to filter which envelopes are returned.
Parameter | Description | Example |
---|---|---|
from_date | the start position in the list sorted by created_at limited to YYYY-MM-DD. If this property isn't present in the request the default value of 3 months in the past will be used | /v2/organisation/envelopes/search?from_date=2021-01-01 |
to_date | the end position in the list sorted by created_at limited to YYYY-MM-DD. If this property isn’t present in the request the default value of tomorrow’s date at 00:00 will be used | /v2/organisation/envelopes/search?to_date=2021-02-02 |
status | the statuses of the envelopes. If this property isn’t present in the request all status types will exist in the search | /v2/organisation/envelopes/search?status[]=active&status[]=complete |
offset | the starting position in the list of all sorted envelopes, default value is 1 | /v2/organisation/envelopes/search?offset=1 |
limit | the number of results to return, default value is 10 | /v2/organisation/envelopes/search?limit=50 |
Example Response
{
"envelopes": [
{
"envelope_id": string,
"envelope": string,
"status": string,
"created_at": string
}
],
"total": number
}
Error codes
If the request is unsuccessful a response code and a message will be sent
Was this page helpful?