Obter Cauções por Signatário

Retorna todas as informações de uma caução solicitada através do signatário.

Cabeçalhos

Nome
Valor

Content-Type

application/json

x-api-key

<token>

Open API

get
Autorizações
Parâmetros de consulta
signerstringOpcional

Address of the user who signed the transaction to create escrow

Example: GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
rolestringOpcional

Role in escrow

Example: approver
roleAddressstringOpcional

Address of the user in the specified role

Example: GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
statusstringOpcional

Status of the escrow

Example: pending
typestring · enumOpcional

Type of the escrow

Example: single_release | multi_releaseValores possíveis:
engagementIdstringOpcional

Engagement ID of the escrow

Example: ENG-001
titlestringOpcional

Title of the escrow

Example: Website redesign
isActivebooleanOpcional

Is the escrow active

validateOnChainbooleanOpcional

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

startDatestringOpcional

Starting date range for filtering

Example: 2023-06-20 (YYYY-MM-DD)
minAmountnumberOpcional

Minimum amount for filtering

Example: 100
maxAmountnumberOpcional

Maximum amount for filtering

Example: 1000
orderBystring · enumOpcional

Field to order the results by

Default: createdAtExample: createdAt | updatedAt | amountValores possíveis:
orderDirectionstring · enumOpcional

Direction to order the results

Default: descExample: asc | descValores possíveis:
pagenumberOpcional

Page number for pagination

Example: 1
pageSizenumberOpcional

Number of items per page

Default: 8Example: 8
contractIDstringOpcional

Contract Id of the deployed escrow

Example: CBHEQBV...
endDatestringOpcional

Ending date range for filtering

Example: 2023-06-22 (YYYY-MM-DD)
Respostas
200

Collection of data containing information from different scans requested by a signatory, role or contract id.

application/json
get
/helper/get-escrows-by-signer
GET /helper/get-escrows-by-signer 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...",
      "name": "USDC"
    },
    "isActive": true,
    "updatedAt": {
      "_seconds": 1750698602,
      "_nanoseconds": 356000000
    },
    "createdAt": {
      "_seconds": 1750698602,
      "_nanoseconds": 356000000
    },
    "balance": 0
  }
]

Exemplo de uso:

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 data = await http.get(
      "/escrow/single-release/get-escrows-by-signer?signer=GPUACN...." 👈🏼 // Todos os parâmetros obrigatórios são passados no nível da query.
    ); 
  
    return data;
}

Atualizado

Isto foi útil?