Get Transactions by Status
This guide walks you through retrieving a list of eSignature transactions filtered by status using the Stewart Sign API.
When to Use
Filtering transactions by status is useful when you need to:
- List all pending transactions awaiting signatures
- Find completed transactions ready for document download
- Monitor canceled transactions
- Build dashboards or reports based on transaction status
Requirements
- You need to have Node.js installed on your system.
- You'll also need the axios library. You can install it using the following command:
npm install axios
- A valid Bearer token (JWT) for authentication.
Endpoint
GET /transactions/status/{status}
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | Yes | The status to filter by. See available statuses below. |
Available Statuses
| Status | Description |
|---|---|
draft | Transaction created but not yet sent for signing |
esign_pending | Transaction is active and awaiting signatures |
completed | All participants have signed |
canceled | Transaction was canceled |
tagging_in_progress | Documents are being tagged |
Code Snippet
Use the following code snippet to retrieve transactions by status. Replace <status> with the desired status, and <accessToken> with your API access token.
const axios = require("axios");
const status = "esign_pending"; // Change to desired status
const config = {
method: "get",
url: `https://public-api.sign.stewart.com/transactions/status/${status}`,
headers: {
Authorization: "Bearer <accessToken>",
},
};
axios(config)
.then(function (response) {
console.log(`Transactions with status '${status}':`, response.data);
})
.catch(function (error) {
console.log(error.response?.data || error.message);
});
Successful Response
On success, the API returns an array of transaction objects matching the specified status:
[
{
"id": "391866a6-8ebb-4533-b6ab-c7bb4d6fbd38",
"status": "esign_pending",
"documents": [...],
"participants": [...]
},
{
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"status": "esign_pending",
"documents": [...],
"participants": [...]
}
]
Error Responses
| Status | Reason |
|---|---|
401 Unauthorized | Invalid or expired Bearer token |
Steps to Execute the Code Snippet
- Create a new file named
get_transactions_by_status.js. - Copy and paste the code snippet provided above into the new file.
- Replace
<accessToken>with your API access token. - Save the file and open a terminal or command prompt.
- Navigate to the folder where you saved the
get_transactions_by_status.jsfile. - Run the following command to execute the script:
node get_transactions_by_status.js
If the request is successful, you'll see the list of transactions displayed in the console. In case of an error, the error details will be displayed instead.
Additional Resources
For more information about the eSignature API, visit the API reference.
If you need further assistance or have questions, feel free to reach out to our support team.