# Single Search Process ```mermaid flowchart TD; A([Authenticate]) --> B([AML Search Business / Individual]) B --> C([Return AML Search Hits]) C --> D([Return Full AML Search Information]) ``` ## 1. Authenticate Before using any of the endpoints, you must authenticate. This ensures you have the necessary permissions to access the data. ### Example Request ```http POST /authenticate ``` ## 2. Single Search Use these endpoints to perform a single AML search on either a business or an individual. The required properties in the payload differ for each scenario. Please refer to the main API documentation for a complete list of available parameters. > **Note:** The `datasets` property is defined in the API documentation and can also be found in the product documentation [here](https://doc.creditsafe.com/connect-apis-catalog/product-catalog/kycprotect/documentation/additionalinformation/datasetdefinitions). ### Business Search ```http POST /compliance/kyc-protect/searches/businesses ``` #### Example Request Body This example uses only the required parameters. Additional parameters are available for more targeted results. ```json { "countryCodes": [ "GB" ], "threshold": 85, "name": "Creditsafe", "datasets": [ "AM" ] } ``` #### Example Response ```json { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "Creditsafe Ltd", "countryCodes": [ "GB" ], "threshold": 0, "type": "business", "datasets": [ "AM" ], "status": "new", "riskRating": "veryLow", "assignedToUserId": 0, "assignedUser": "Test User", "createdById": 0, "createdBy": "Test User", "createdAt": "2019-08-24T14:15:22Z", "modifiedById": 0, "modifiedBy": "Test User", "modifiedAt": "2019-08-24T14:15:22Z", "note": "No Notes", "scheduleId": "b7b4f318-018f-4d71-ac1a-f61e4bfaefbe", "totalHitCount": 1, "truePositiveHitsCount": 1, "falsePositiveHitsCount": 0, "undecidedHitsCount": 0, "correlationId": "string" } ``` ### Individual Search ```http POST /compliance/kyc-protect/searches/individuals ``` #### Example Request Body This example uses only the required parameters. Additional parameters are available for more targeted results. > **Note:** You may use either the `name` property or a combination of `firstName` and `lastName`. - The `name` property is **required** if `firstName` and `lastName` are not provided. - If `firstName` is used, then `lastName` becomes **required**. ```json { "threshold": 80, "name": "Donald Trump", "datasets": [ "AM" ] } ``` #### Example Response ```json { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "donald trump", "threshold": 80, "type": "individual", "datasets": [ "AM" ], "status": "new", "riskRating": "notApplicable", "assignedToUserId": 0, "assignedUser": "test user", "createdById": 0, "createdBy": "test user", "createdAt": "2019-08-24T14:15:22Z", "modifiedById": 0, "modifiedBy": "test user", "modifiedAt": "2019-08-24T14:15:22Z", "totalHitCount": 4, "truePositiveHitsCount": 0, "falsePositiveHitsCount": 0, "undecidedHitsCount": 4 } ``` > **Important:** Not all properties will be returned in every response. Refer to the API documentation for a full list of possible response properties. ## 3. Return AML Search Hits At this stage, use the `searchId` from the previous response to retrieve the search hits. This endpoint returns an array of results. Each result includes a unique `id`, which is required to retrieve the full details for that hit. ```http GET /compliance/kyc-protect/searches/individuals/{searchId}/hits ``` ```http GET /compliance/kyc-protect/searches/businesses/{searchId}/hits ``` Additional parameters are available to filter results if needed. Please refer to the main API documentation for [Businesses](https://doc.creditsafe.com/connect-apis-catalog/product-catalog/kycprotect/kycprotect/aml-screening-businesses/getkycsearchbusinesshitsbysearchid) and [Individuals](https://doc.creditsafe.com/connect-apis-catalog/product-catalog/kycprotect/kycprotect/aml-screening-individuals/getstheindividualsearchhits). ## 4. Return Full AML Search Information To retrieve the full report for a specific search hit, you will need: - The original `searchId` - The `hitId` from the previous step ```http GET /compliance/kyc-protect/searches/businesses/{searchId}/hits/{hitId} ``` ```http GET /compliance/kyc-protect/searches/individuals/{searchId}/hits/{hitId} ``` Refer to the API documentation for a comprehensive breakdown of the response data: - [Businesses](https://doc.creditsafe.com/connect-apis-catalog/product-catalog/kycprotect/kycprotect/aml-screening-businesses/getkycsearchbusinesshitsbysearchidandhitid) - [Individuals](https://doc.creditsafe.com/connect-apis-catalog/product-catalog/kycprotect/kycprotect/aml-screening-individuals/returnsfullprofileinformationofaindividualhitbyhitid)