Skip to main content

Get Transaction by ID

This guide walks you through retrieving the details of a specific eSignature transaction using the Stewart Sign API.

When to Use

Retrieving a transaction by ID is useful when you need to:

  • Check the current status of a transaction (e.g., draft, esign_pending, completed, canceled)
  • View participant details and signing progress
  • Get document metadata associated with the transaction
  • Verify transaction details before performing updates

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.
  2. The transaction ID of the eSignature transaction you want to retrieve.

Endpoint

GET /transactions/{id}

ParameterTypeRequiredDescription
idstring (UUID)YesThe unique identifier of the eSignature transaction.

Code Snippet

Use the following code snippet to retrieve a transaction by its ID. Replace <transactionId> with the actual transaction ID, and <accessToken> with your API access token.

const axios = require("axios");

const transactionId = "<transactionId>";

const config = {
method: "get",
url: `https://public-api.sign.stewart.com/transactions/${transactionId}`,
headers: {
Authorization: "Bearer <accessToken>",
},
};

axios(config)
.then(function (response) {
console.log("Transaction retrieved successfully:", response.data);
})
.catch(function (error) {
console.log(error.response?.data || error.message);
});

Successful Response

On success, the API returns the full transaction object including documents, participants, and status:

{
"id": "391866a6-8ebb-4533-b6ab-c7bb4d6fbd38",
"status": "esign_pending",
"documents": [
{
"id": "8d976a23-b865-4fcd-9165-ddc0aedaf614",
"title": "Purchase Agreement",
"sessionType": "esign"
}
],
"participants": [
{
"id": "37da192e-6420-4b9c-9951-a979eeaf8889",
"email": "client@example.com",
"firstName": "John",
"lastName": "Doe"
}
]
}

Error Responses

StatusReason
401 UnauthorizedInvalid or expired Bearer token
404 Not FoundNo transaction found with the provided ID

Steps to Execute the Code Snippet

  1. Create a new file named get_transaction.js.
  2. Copy and paste the code snippet provided above into the new file.
  3. Replace <transactionId> and <accessToken> with the appropriate values.
  4. Save the file and open a terminal or command prompt.
  5. Navigate to the folder where you saved the get_transaction.js file.
  6. Run the following command to execute the script:
node get_transaction.js

If the request is successful, you'll see the transaction details 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.