Get Escrows By Contract Ids
Returns all the information of a security deposit requested through one or more requested contract ids.
Headers
Name
Value
Content-Type
application/json
Authorization
Bearer <token>
Open API
get
Query parameters
signerstringRequired
Address of the user who signed the transaction to create escrow
contractIdsstring[]RequiredExample:
Array of contract IDs to query
[CB25FW...,CBHEQBV...]
validateOnChainbooleanOptional
When set to true, the endpoint will verify each escrow’s data against the blockchain to ensure accuracy and integrity. Enabling this adds an extra security layer but may increase the response time slightly due to the additional validation step
isActivebooleanOptional
Is the escrow active
Responses
200
Collection of data containing information from different scans requested by a signatory, role or contract ids.
application/json
400
Bad request
401
Unauthorized access
429
Too Many Requests
500
Possible errors:
- The 'signer' parameter is required.
- The 'contractIds' parameter is required.
- No escrow found for contract ID CHASVBD...
- Error fetching escrow by contract: CHASVBD...
- An unexpected error occurred
application/json
get
GET /helper/get-escrow-by-contract-ids?signer=text&contractIds=[CB25FW...%2CCBHEQBV...] HTTP/1.1
Host:
Accept: */*
[
{
"contractId": "CB25FW....",
"signer": "GBPUA....",
"type": "multi-release",
"engagementId": "ENG-003",
"title": "Title of the Escrow",
"description": "Description of the Escrow",
"milestones": [
{
"description": "Initial payment",
"amount": 2,
"status": "pending",
"flags": {
"disputed": false,
"released": false,
"resolved": false,
"approved": false
}
},
{
"description": "Final payment",
"amount": 5,
"status": "pending",
"flags": {
"disputed": false,
"released": false,
"resolved": false,
"approved": false
}
}
],
"platformFee": 5,
"receiverMemo": 0,
"roles": {
"approver": "GBPUACN....",
"serviceProvider": "GA2RRI....",
"platformAddress": "GBPA2LO....",
"releaseSigner": "GCPZUO....",
"disputeResolver": "GDBMRV...",
"receiver": "GA2RRI...",
"issuer": "GBPUAC..."
},
"trustline": {
"address": "CBIELT...",
"decimals": 10000000
},
"isActive": true,
"updatedAt": {
"_seconds": 1750698602,
"_nanoseconds": 356000000
},
"createdAt": {
"_seconds": 1750698602,
"_nanoseconds": 356000000
},
"balance": 0
},
{
"contractId": "CF35XW....",
"signer": "GBPUA....",
"type": "single-release",
"engagementId": "ENG-003",
"title": "Title of the Escrow",
"description": "Description of the Escrow",
"milestones": [
{
"description": "Initial payment",
"amount": 5,
"status": "pending",
"flags": {
"disputed": false,
"released": false,
"resolved": false,
"approved": false
}
},
{
"description": "Final payment",
"amount": 3,
"status": "pending",
"flags": {
"disputed": false,
"released": false,
"resolved": false,
"approved": false
}
}
],
"platformFee": 3,
"receiverMemo": 0,
"roles": {
"approver": "GBPUACN....",
"serviceProvider": "GA2RRI....",
"platformAddress": "GBPA2LO....",
"releaseSigner": "GCPZUO....",
"disputeResolver": "GDBMRV...",
"receiver": "GA2RRI...",
"issuer": "GBPUAC..."
},
"trustline": {
"address": "CBIELT...",
"decimals": 10000000
},
"isActive": true,
"updatedAt": {
"_seconds": 1750698602,
"_nanoseconds": 356000000
},
"createdAt": {
"_seconds": 1750698602,
"_nanoseconds": 356000000
},
"balance": 3
}
]
Use Example:
import axios from "axios";
const http = axios.create({
baseURL: "https://dev.api.trustlesswork.com",
timeout: 10000,
headers: {
"Content-Type": "application/json",
Authorization: `Bearer your_api_key`,
},
});
export const useExample = async () => {
const contractIds = [
"CCR6HLU3LQMXOESNA6TOS2RZKGEBWQG3EN5FMZNC43RVXZWTTDCZ...",
"CCA7WTCVCQ5JPKNIFSHPSJLJ3FJ3GKPNEVAIHP6T..."
];
const signer = "GBPUACN7QETR4TCYTKINBDHTYTFXD3BQQV7VSM...";
const validateOnChain = true;
const params = new URLSearchParams();
contractIds.forEach(id => params.append("contractIds[]", id));
params.append("signer", signer);
params.append("validateOnChain", validateOnChain.toString());
const response = await http.get(`/helper/get-escrow-by-contract-ids?${params.toString()}`);
return response;
}
Last updated
Was this helpful?