> For the complete documentation index, see [llms.txt](https://docs.udara360.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.udara360.io/udara360-docs-1/fixed-deposit-account/liquidate.md).

# Liquidate

The "Liquidate" endpoint allows customers to liquidate a fixed deposit account, either fully or in part.

<mark style="color:yellow;">`POST`</mark> `/api/fixeddepositaccount/v1/liquidate`

To liquidate a fixed deposit, you need to provide the necessary body parameters, such as accountNumber, liquidationType, and other relevant details.

**Headers**

| Name                                                | Value                |
| --------------------------------------------------- | -------------------- |
| Content-Type<mark style="color:red;">\*</mark>      | `application/json`   |
| Authorization<mark style="color:red;">\*</mark>     | `Bearer`             |
| Request-Reference<mark style="color:red;">\*</mark> | `{unique_reference}` |

**Body**

<table><thead><tr><th>Name</th><th>Data Type (Length)</th><th data-type="checkbox"></th><th>Description</th></tr></thead><tbody><tr><td>accountNumber</td><td>string (50)</td><td>true</td><td>This is the Savings Account that will be debited.<br><br><em>This is not the Liquidation Account.</em></td></tr><tr><td>liquidationAmount</td><td>number</td><td>true</td><td>The amount to be liquidated.<br><br><em>The amount should be sent in the base unit of the currency. For example, 1000 naira will be sent as 1000 * 100.</em><br><em>(This is Required if liquidationType = PartLiquidation</em>)</td></tr><tr><td>partLiquidationFee</td><td>number</td><td>false</td><td>The percentage fee applied if there is a Pre-Liquidation Fee.<br><br><em>If there is a Pre-Liquidation Fee, it should be passed here.</em></td></tr><tr><td>liquidationType</td><td>Enum (FullLiquidation = 1, PartLiquidation = 2)</td><td>true</td><td>The type of liquidation to be performed.<br><br><em>If it is FullLiquidation, the full Principal will be liquidated and the Savings account will close, liquidationAmount is not required. For PartLiquidation, only an amount not greater than or equal to the Savings balance is accepted, and liquidationAmount is required.</em></td></tr></tbody></table>

Here is an example request and response with a sample payload sent to the endpoint in Curl format.

<details>

<summary>Sample Request</summary>

```json
curl --location -g '{{baseurl}}/api/fixeddepositaccount/v1/liquidate' \
--header 'Authorization: bearer {token}' \
--header 'request-reference: {unique_reference}' \
--header 'Content-Type: application/json' \
--data '{
  "accountNumber": "string",
  "partLiquidationFee": 0,
  "liquidationType": "FullLiquidation",
  "liquidationAmount": 0
}'
```

</details>

<details>

<summary>Respose: <code>200</code></summary>

```json
{
  "status": true,
  "message": "string",
  "data": {
    "statusCode": "string",
    "referenceNumber": "string",
    "instrumentNumber": "string",
    "message": "string",
    "duration": "string",
    "sessionID": "string"
  },
  "isSuccessful": true,
  "statusCode": "string",
  "referenceNumber": "string",
  "instrumentNumber": "string",
  "duration": "string",
  "sessionID": "string"
}
```

</details>
