# Resolver disputa do marco

### **Cabeçalhos**

<table><thead><tr><th width="366">Nome</th><th>Valor</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

## POST /escrow/multi-release/resolve-milestone-dispute

>

```json
{"openapi":"3.0.0","info":{"title":"Trustless Work API","version":"1.0"},"security":[{}],"paths":{"/escrow/multi-release/resolve-milestone-dispute":{"post":{"operationId":"MultiReleaseController_resolveMilestoneDispute","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveMilestoneDispute"}}}},"responses":{"201":{"description":"This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.","content":{"application/json":{}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized access"},"429":{"description":"Too Many Requests"},"500":{"description":"Possible errors:\n- Escrow not found\n- Invalid milestone index\n- None of the amounts to be transferred should be less or equal than 0\n- Only the dispute resolver can execute this function\n- This milestone is already released\n- This milestone is already resolved\n- Milestone not in dispute\n- The total funds to resolve the dispute must not exceed the amount defined for this milestone\n- Insufficient funds for resolution\n- The total amount to be transferred cannot be zero\n- An unexpected error occurred","content":{"application/json":{}}}},"tags":["Multi Release"]}}},"components":{"schemas":{"ResolveMilestoneDispute":{"type":"object","properties":{"contractId":{"type":"string","description":"ID (address) that identifies the escrow contract"},"disputeResolver":{"type":"string","description":"Address of the user defined to resolve disputes in an escrow"},"milestoneIndex":{"type":"string","description":"Position that identifies the milestone within the group of milestones in the escrow"},"distributions":{"description":"Array of distributions detailing address and amount to allocate when resolving the milestone dispute. Amounts should sum the remaining milestone funds (post-fees).","type":"array","items":{"type":"array"}}},"required":["contractId","disputeResolver","milestoneIndex","distributions"]}}}}
```

<figure><img src="/files/ce8619ca6cfd3c60b214a32bce6cdda21475b5d6" alt=""><figcaption></figcaption></figure>

### **O que este Endpoint retorna?**

Este endpoint retorna a transação não assinada para que a transação possa ser assinada por meio da carteira do cliente.

### Exemplo de uso:

```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": sua_chave_api,
  },
});

export const useExample = async () => {
    // Obter o endereço do assinante
    const { address } = await kit.getAddress();

    const response = await http.post(
      "/escrow/liberação-múltipla/resolver-disputa-marco", 
      {
        // corpo solicitado para o endpoint
      },
    ); 
    
    // Obter o hash da transação não assinada
    const { unsignedTransaction } = response.data;

    // Assinar a transação pela carteira
    const { signedTxXdr } = await signTransaction(unsignedTransaction, {
      address,
      networkPassphrase: WalletNetwork.TESTNET,
    });

    // Enviar a transação para a Rede Stellar
    const tx = await http.post("/helper/send-transaction", {
      signedXdr: signedTxXdr,
    });

    const { data } = tx;

    return data;
}
```


---

# 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/v1-pt/api-rest/deploy-1/resolving-disputes.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.
