# Claim a settled bond

`POST /sigmafi/claims/{tokenId}` · Lithos client API · SigmaFi Bonds · requires the `api_key` header

Source: https://lithosprotocol.org/docs/api/claim-sf-bond

Take the vault output the bond's settlement paid, found from the bond's own confirmed spend, burning the bond asset. Up to 8 other vault boxes naming the asset, largest first, come with it, each box into an output of its own. Burning the asset locks every vault box naming it that the claim leaves, for good; the quote's `warnings` and the result's `warnings` say what is left. Refused while a bond still holds the asset's other unit, for an asset that is not verified, and while the settlement cannot be established from the node's index.

## Parameters

| Name | In | Type | Required | Description |

|---|---|---|---|---|

| `tokenId` | path | string | yes | The bond asset's token id. |

## Responses

### 200: The transaction was sent; `outcome` says whether the node accepted it.

`SFResult`

- `txId` (string, required)
- `outcome` (string, required, one of accepted, rejected, uncertain)
- `boxId` (string): The output that matters: the new order or bond, the vault box a repayment or liquidation pays, or the first box a cancel or claim returns to this wallet.
- `assetId` (string): The bond asset a fill minted.
- `warnings` (string[]): What to know about the sent transaction: vault boxes a claim left locked for good, or a repayment sent with two blocks or fewer left to be mined in.

### 403: Missing or wrong api_key.

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 404: No unspent box has that id, it is not the kind named, or it is not this wallet's.

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 409: A pending transaction already spends a box this names. Re-read and resend.

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 422: Valid, but not possible now: the box's terms are refused, maturity has passed or not come, the wallet cannot cover it, or no wallet box can authorize a cancel.

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 503: Node, wallet or transaction engine unavailable, or the request ran out of time. The message says whether anything was sent. When it says the outcome is unknown, check `GET /sigmafi/portfolio` before retrying.

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

## Example request

```bash
curl -X POST "http://localhost:9000/sigmafi/claims/{tokenId}" \
  -H "api_key: $LITHOS_API_KEY"
```

## Example response

```json
{
  "txId": "string",
  "outcome": "accepted",
  "boxId": "string",
  "assetId": "string",
  "warnings": [
    "string"
  ]
}
```
