> 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/account/lien-api/update-account-lien.md).

# Update Account Lien

The request body should include specific payloads such as a required `id` and other parameters like `FormOfLien`, and `amount`, allowing you to modify and update existing lien information.

<mark style="color:green;">`POST`</mark> `/api/accountlien/v1/updatelien`\
\
A successful request will return a confirmation message indicating that the lien has been updated along with any relevant details.\
\
This process allows for the secure and efficient updating of liens on accounts, ensuring that accurate and current financial information is maintained.

**Headers**

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

**Body**

<table><thead><tr><th width="168">Name</th><th width="173">Data Type (length)</th><th width="113" data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>string</td><td>true</td><td>The unique identifier of the lien (GUID)</td></tr><tr><td><code>formOfLien</code></td><td>string</td><td>false</td><td>The form or type of lien. Lien type can be a flat amount or a percentage<br><br>The enumerations are:<br><code>1</code> = FlatAmount<br><code>2</code> = Percentage </td></tr><tr><td><code>amount</code></td><td>integer</td><td>false</td><td>The amount of money to be held as a lien<br><br><em><mark style="color:orange;">The amount should be sent in the base unit of the currency. For example,</mark><mark style="color:orange;"> </mark><mark style="color:orange;"><code>1000</code></mark><mark style="color:orange;"> </mark><mark style="color:orange;">naira will be sent as</mark><mark style="color:orange;"> </mark><mark style="color:orange;"><code>1000</code></mark><mark style="color:orange;"> </mark><mark style="color:orange;">*</mark><mark style="color:orange;"> </mark><mark style="color:orange;"><code>100</code></mark><mark style="color:orange;">. (nullable)</mark></em></td></tr><tr><td><code>percentage</code></td><td>integer</td><td>false</td><td>The updated percentage of the account balance to be held<br><br><em><mark style="color:orange;">The percentage must be rounded to a maximum of three decimal places.</mark></em></td></tr><tr><td><code>description</code></td><td>string <a data-footnote-ref href="#user-content-fn-1"><em>(150)</em></a></td><td>false</td><td>Updated description or reason for the lien</td></tr><tr><td><code>tenure</code></td><td>integer</td><td>false</td><td>Updated duration of the lien in months</td></tr><tr><td><code>commencementDate</code></td><td>date</td><td>false</td><td>Updated start date of the lien</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/accountlien/v1/updatelien' \
--header 'Authorization: bearer {token}' \
--header 'request-reference: {unique_reference}' \
--header 'Content-Type: application/json' \
--data '{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "formOfLien": "string",
  "amount": 0,
  "percentage": 0,
  "description": "string",
  "tenure": 0,
  "commencementDate": "2023-01-20T23:39:49.208Z"
}'
```

</details>

<details>

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

```json
{
  "status": true,
  "message": "string",
  "data": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "referenceNumber": "string"
  }
}
```

</details>

[^1]: This is the maximum number of characters allowed.
