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

# Place Account Lien

\
To place a lien on an account, you need to make a POST request to the designated API endpoint with the required URL path parameters. The request body should include specific payloads, such as `accountNumber`, `formOfLien`, and `referenceNumber`.\
\ <mark style="color:green;">`POST`</mark> `/api/accountlien/v1/placelien`\
\
A successful request will return a confirmation message along with the lien `ID` for future reference in the response.\
\
This process enables you to securely place liens on accounts, providing important financial safeguards.

**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="185">Name</th><th width="174">Data Type (length)</th><th width="101" data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>accountNumber</code></td><td>string <a data-footnote-ref href="#user-content-fn-1"><em>(10)</em></a></td><td>true</td><td>The account number to be placed on the lien</td></tr><tr><td><code>formOfLien</code></td><td>string</td><td>true</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>referenceNumber</code></td><td>string <a data-footnote-ref href="#user-content-fn-1"><em>(500)</em></a></td><td>true</td><td>A unique reference number for the lien<br><br><em><mark style="color:orange;">"This is necessary when processing a transaction that requires the automatic release of the lien."</mark></em></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 percentage of the account balance to be held as a lien</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>Description/reason for placing the lien <br><br><em><mark style="color:orange;">The percentage should be shown with a maximum of three decimal places. (nullable)</mark></em></td></tr><tr><td><code>tenure</code></td><td>integer</td><td>false</td><td>The duration of the lien in months</td></tr><tr><td><code>commencementDate</code></td><td>date</td><td>false</td><td>The date when the lien will start</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/placelien' \
--header 'Authorization: bearer {token}' \
--header 'request-reference: {unique_reference}' \
--header 'Content-Type: application/json' \
--data '{
  "accountNumber": "string",
  "formOfLien": "string",
  "referenceNumber": "string",
  "amount": 0,
  "percentage": 0,
  "description": "string",
  "tenure": 0,
  "commencementDate": "2023-01-20T23:38:50.196Z"
}'
```

</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.
