# Get Escrows By Contract Ids

### **Headers**

<table><thead><tr><th width="366">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td>x-api-key</td><td><code>&#x3C;token></code></td></tr></tbody></table>

### Open API

## GET /helper/get-escrow-by-contract-ids

>

```json
{"openapi":"3.0.0","info":{"title":"Trustless Work API","version":"1.0"},"security":[{}],"paths":{"/helper/get-escrow-by-contract-ids":{"get":{"operationId":"HelperController_getEscrowsByContractId","parameters":[{"name":"contractIds","required":true,"in":"query","description":"Array of contract IDs to query","schema":{"type":"array","items":{"type":"string"}}},{"name":"isActive","required":false,"in":"query","description":"Is the escrow active","schema":{"type":"boolean"}},{"name":"validateOnChain","required":false,"in":"query","description":"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","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Collection of data containing information from different scans requested by a signatory, role or contract ids.","content":{"application/json":{}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized access"},"429":{"description":"Too Many Requests"},"500":{"description":"\n      <p>Possible errors:</p>\n      <ul>\n        <li>The 'signer' parameter is required.</li>\n        <li>The 'contractIds' parameter is required.</li>\n        <li>No escrow found for contract ID CHASVBD...</li>\n        <li>Error fetching escrow by contract: CHASVBD...</li>\n        <li>An unexpected error occurred</li>\n      </ul>","content":{"application/json":{}}}},"tags":["Helper"]}}}}
```

### Use Example:

```typescript
import axios from "axios";

const http = axios.create({
  baseURL: "https://dev.api.trustlesswork.com",
  timeout: 10000,
  headers: {
    "Content-Type": "application/json",
    "x-api-key": your_api_key,
  },
});

export const useExample = async () => {
  const contractIds = [
    "CCR6HLU3LQMXOESNA6TOS2RZKGEBWQG3EN5FMZNC43RVXZWTTDCZ...",
    "CCA7WTCVCQ5JPKNIFSHPSJLJ3FJ3GKPNEVAIHP6T..."
  ];
  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;
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.trustlesswork.com/trustless-work/v2-en/api-rest/indexer/get-escrow-by-contract-ids.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
