> For the complete documentation index, see [llms.txt](https://docs.tutelar.io/tutelar-api-document/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tutelar.io/tutelar-api-document/tutelar-api-document-v2/aml-search/decision-making.md).

# Decision Making

Welcome to AML Decision taking ,In this you can take a decision based on the details provided in the search menu.

You can look for any individual or company-related anti-money laundering compliances here and specific action for the details will be provided.

The action is solely based on the clients wish.

### Decision Making

<mark style="color:green;">`POST`</mark>` ``https://secctrl.tutelar.io/api/v2/aml/search/decision-make/:searchHistoryId`&#x20;

### Header

| Name          | Value                     |
| ------------- | ------------------------- |
| Content-Type  | `multipart/form-data`     |
| Authorization | `Bearer eyJhbGciOiJ.....` |

### Sample Response

{% tabs %}
{% tab title="201: OK " %}

```json
{
   "success": true,
   "code": 201,
   "message": "Decisions created successfully",
   "data": {
       "decisionId": "decision_atanqCUkqz",
       "decisionAt": "2024-07-29T10:39:16.382Z",
       "decisionStatus": "true_match"
   }
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity" %}

```json
{
   "success": false,
   "code": 1001,
   "message": "Invalid Sanction",
   "data": {}
}
{
   "success": false,
   "code": 1001,
   "message": "Invalid Search History Id",
   "data": {}
}
{
   "success": false,
   "code": 1001,
   "message": "Decision Status field is missing",
   "data": {}
}
{
   "success": false,
   "code": 1001,
   "message": "Invalid data received from Decision Status",
   "data": {}
}
{
   "success": false,
   "code": 1001,
   "message": "Already Decision placed for this search id",
   "data": {}
}
{
    "success": false,
    "code": 1001,
    "message": "Please Enter any one sanctionId | adverseResultId",
    "data": {}
}
{
    "success": false,
    "code": 1001,
    "message": "Already Decision placed for this search id",
    "data": {}
}               
```

{% endtab %}
{% endtabs %}

### Path param values &#x20;

<table><thead><tr><th>Path parameter</th><th width="144">Type</th><th>Is Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>searchHistoryId</td><td>String</td><td>yes</td><td>Search history Id will be generated for every Individual search made in the client panel.</td></tr></tbody></table>

### Post values are:

<table><thead><tr><th width="206">Post Parameter</th><th width="135">Type</th><th width="139">Is  Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>decisionStatus</td><td>String</td><td>Yes</td><td>Status of a Decision ( <strong>"true_match," "false_positive,"</strong> or <strong>"no_match" and "track"</strong> )</td></tr><tr><td>sanctionId </td><td>String</td><td>Yes</td><td>sanctionId is unique Id. sanctionId required to make a decision if search search via aml alone search product.</td></tr><tr><td>remarks</td><td>String</td><td>No</td><td>Add remarks for decision purpose.</td></tr><tr><td>file</td><td>Binary</td><td>No</td><td>Upload reference documents for decision.</td></tr></tbody></table>

### Sample post data format&#x20;

If make decision for aml alone search result

```json
{
   "decisionStatus": "true_match",
   "sanctionId": "SANCL_yZwvS457ed",
   "remarks": "Testing ",
   "file": "sample.pdf"
}
```

### **Success response :**

If already  decisions is not created for searchHistoryId.

```json
{
   "success": true,
   "code": 201,
   "message": "Decisions created successfully",
   "data": {
       "decisionId": "decision_atanqCUkqz",
       "decisionAt": "2024-07-29T10:39:16.382Z"
       "decisionStatus": "true_match"
   }
}
```

### Failure response :

If already decisions created for searchHistoryId

```json
{
   "success": false,
   "code": 1001,
   "message": "Invalid Sanction",
   "data": {}
}
{
   "success": false,
   "code": 1001,
   "message": "Invalid Search History Id",
   "data": {}
}
{
   "success": false,
   "code": 1001,
   "message": "Decision Status field is missing",
   "data": {}
}
{
   "success": false,
   "code": 1001,
   "message": "Invalid data received from Decision Status",
   "data": {}
}
{
   "success": false,
   "code": 1001,
   "message": "Please provide valid searchData Mode",
   "data": {}
}
{
   "success": false,
   "code": 1001,
   "message": "Enter valid Search Data",
   "data": {}
}
{
   "success": false,
   "code": 1001,
   "message": "Invalid date formate on Search Date ",
   "data": {}
}
{
   "success": false,
   "code": 1001,
   "message": "Please enter Search History Id",
   "data": {}
}
{
   "success": false,
   "code": 1001,
   "message": "Already Decision placed for this search id",
   "data": {}
}

If already decisions created for searchHistoryId

{
   "success": false,
   "code": 1001,
   "message": "Already Decision placed for this search id",
   "data": {}
}
```
