# AML

## Update step action check-aml

<mark style="color:green;">`POST`</mark> `https://biometrid.com/api/processes/:id/step`

This endpoint allows you to update a process step with action check-aml

#### Path Parameters

| Name | Type   | Description              |
| ---- | ------ | ------------------------ |
| id   | string | ID of the process to get |

#### Headers

| Name            | Type   | Description                             |
| --------------- | ------ | --------------------------------------- |
| Accept-Language | string | en (default), pt                        |
| Content-type    | string | application/json or multipart/form-data |
| Authorization   | string | Authentication account token            |

#### Request Body

| Name                  | Type   | Description                                                                                                      |
| --------------------- | ------ | ---------------------------------------------------------------------------------------------------------------- |
| searchTerm            | string | Search term - general, required when searchTermLastName, searchTermMiddleNames or searchTermFirstName is missing |
| searchTermLastName    | string | Search term by last name                                                                                         |
| searchTermMiddleNames | string | Search term by middle names                                                                                      |
| searchTermFirstName   | string | Search term by first name                                                                                        |
| birthYear             | string | Filter by birth year                                                                                             |
| countryCodes          | string | Filter by country codes (ISO 3166-1 alpha-2)                                                                     |

{% tabs %}
{% tab title="200 " %}

```
{
  "data": {SHOW_CURRENT_STEP},
  "meta": {
    "message": "ProcessStep updated with success."
  },
  "status": true
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
It is recommended that the post fields be configured in the step as automatic payload from a previous step. If yes, post empty body to proceed to next step.

Step action "check-aml" fields settings example:
{% endhint %}

```
...
        fields: [
              {
                type: 'text',
                alias: 'searchTerm',
                label: 'Search term - general',
                payload: {
                  stepId: stepForm._id,
                  action: 'form',
                  field: 'name'
                }
              },
              {
                type: 'text',
                alias: 'birthYear',
                label: 'Birth year',
                payload: {
                  stepId: stepForm._id,
                  action: 'form',
                  field: 'birthday'
                }
              },
              {
                type: 'text',
                alias: 'countryCodes',
                label: 'Country codes',
                payload: {
                  stepId: stepForm._id,
                  action: 'form',
                  field: 'country'
                }
              }
            ]
...
```
