# Advanced Filters

## Advanced Filter for PEP Search using Identity

<mark style="color:green;">`POST`</mark> `{{baseurl}}/v2/api/verifications/advanced/identity/aml-checks`

#### Headers

| Name                                    | Type   | Description      |
| --------------------------------------- | ------ | ---------------- |
| token<mark style="color:red;">\*</mark> | String | API secret token |

#### Request Body

| Name                                               | Type    | Description                                                                        |
| -------------------------------------------------- | ------- | ---------------------------------------------------------------------------------- |
| query<mark style="color:red;">\*</mark>            | String  | Identity number of the the subject to query with                                   |
| advancedSearch<mark style="color:red;">\*</mark>   | Object  | This contains features that can streamline your search                             |
| firstName                                          | String  | First name of subject                                                              |
| lastName                                           | String  | Last name of subject                                                               |
| position                                           | String  | Position of subject                                                                |
| keyword                                            | String  | Keywords related to the subject                                                    |
| gender                                             | String  | Gender of subject                                                                  |
| country                                            | String  | Country of subject                                                                 |
| education                                          | String  | Subject's education                                                                |
| isSubjectConsent<mark style="color:red;">\*</mark> | Boolean | Indicate subject has given consent. <mark style="color:red;">`Must be true`</mark> |
| type<mark style="color:red;">\*</mark>             | String  | Entity type can be <mark style="color:red;">`all, individual or business`</mark>   |

{% tabs %}
{% tab title="Advanced Filter for PEP Search using Identity Full Sample Request" %}

```json
{
    "type": "individual",
    "query": "+2347037730852",
    "isSubjectConsent": "true",
    "advancedSearch": {
        "lastName": "Gudaji",
        "firstName": "Muhammed",
        "religion": "",
        "birthPlace": "",
        "position": "",
        "keywords": "House of Representatives",
        "gender": "",
        "country": "ng",
        "education": ""
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Advanced Filter for PEP Search using Identity Full Sample Response" %}

```json
{
    "success": true,
    "statusCode": 200,
    "message": "success",
    "data": {
        "status": "review_required",
        "parentId": null,
        "isSubjectConsent": true,
        "type": "individual",
        "sanctions": [],
        "pep": [
            {
                "title": [
                    "MUHAMMED GUDAJI"
                ],
                "entityType": "Person",
                "datasets": [
                    "wd_peps",
                    "wikidata",
                    "everypolitician"
                ],
                "gender": [
                    "male"
                ],
                "position": [
                    "member of the House of Representatives of Nigeria",
                    "member of the House of Representatives of Nigeria (2019-)",
                    "House of Representatives (member, 2015-)"
                ],
                "topics": [
                    "role.pep"
                ],
                "birthDate": [
                    "1972-01-01T00:00:00.000Z"
                ],
                "alias": [
                    "Muhammed Gudaji",
                    "Muhammad Aliyu Gudaji",
                    "MUHAMMED KAZAURE GUDAJI",
                    "Muhammed Kazaure Gudaji",
                    "Muhammed Gudaji Kazaure"
                ],
                "keywords": [
                    "National government"
                ],
                "country": [
                    "ng"
                ],
                "nationality": [
                    "ng"
                ],
                "notes": [
                    "Nigerian politician"
                ],
                "name": [
                    "Muhammed Gudaji",
                    "MUHAMMED GUDAJI"
                ],
                "phone": [
                    "+2347037730852"
                ],
                "positionOccupancies": [
                    {
                        "post": [
                            {
                                "country": [
                                    "ng"
                                ],
                                "name": [
                                    "member of the House of Representatives of Nigeria"
                                ]
                            }
                        ],
                        "status": [
                            "ended"
                        ],
                        "startDate": [
                            "2019-06-11T00:00:00.000Z"
                        ],
                        "endDate": [
                            "2023-06-11T00:00:00.000Z"
                        ]
                    },
                    {
                        "post": [
                            {
                                "country": [
                                    "ng"
                                ],
                                "name": [
                                    "member of the House of Representatives of Nigeria"
                                ]
                            }
                        ],
                        "status": [
                            "ended"
                        ],
                        "endDate": [
                            "2019-06-09T00:00:00.000Z"
                        ],
                        "startDate": [
                            "2015-06-09T00:00:00.000Z"
                        ]
                    }
                ]
            }
        ],
        "crime": [],
        "debarment": [],
        "financial_services": [],
        "government": [],
        "role": [],
        "religion": [],
        "military": [],
        "frozen_asset": [],
        "personOfInterest": [],
        "totalEntity": 1,
        "categoryCount": {
            "sanctions": 0,
            "pep": 1,
            "crime": 0,
            "debarment": 0,
            "financial_services": 0,
            "government": 0,
            "role": 0,
            "religion": 0,
            "military": 0,
            "frozen_asset": 0,
            "personOfInterest": 0
        },
        "queriedWith": "Identity Number",
        "query": "+2347037730852",
        "businessId": "6222a5ed3e7a41c29c031ecc",
        "requestedAt": "2023-09-21T07:18:47.482Z",
        "requestedById": "6222a5ed3e7a41c29c031ece",
        "createdAt": "2023-09-21T07:18:47.572Z",
        "lastModifiedAt": "2023-09-21T07:18:47.572Z",
        "_createdAt": "2023-09-21T07:18:4747+00:00",
        "_lastModifiedAt": "2023-09-21T07:18:4747+00:00",
        "id": "650bee57b5646f3c2c54a979",
        "requestedBy": {
            "firstName": "API",
            "lastName": "User",
            "middleName": "",
            "id": "6222a5ed3e7a41c29c031ece"
        }
    },
    "links": []
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.youverify.co/aml-services-anti-money-laundering/pep-and-sanction-screening/search-using-identity/advanced-filters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
