Skip to main content

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

  1. You need to have Node.js installed on your system.
  2. You'll also need the axios library. You can install it using the following command:
npm install axios
  1. A valid Bearer token (JWT) for authentication.

Endpoint

GET /transactions/status/{status}

ParameterTypeRequiredDescription
statusstringYesThe status to filter by. See available statuses below.

Available Statuses

StatusDescription
draftTransaction created but not yet sent for signing
esign_pendingTransaction is active and awaiting signatures
completedAll participants have signed
canceledTransaction was canceled
tagging_in_progressDocuments 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

StatusReason
401 UnauthorizedInvalid or expired Bearer token

Steps to Execute the Code Snippet

  1. Create a new file named get_transactions_by_status.js.
  2. Copy and paste the code snippet provided above into the new file.
  3. Replace <accessToken> with your API access token.
  4. Save the file and open a terminal or command prompt.
  5. Navigate to the folder where you saved the get_transactions_by_status.js file.
  6. 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.