Skip to main content

Customer

The Customer endpoints form the operational backbone of the TruRisk AI module, facilitating the end-to-end lifecycle of compliance screening—from initial AI analysis to final human disposition.

What is a "Customer"?

In the context of the AML Watcher API, a Customer represents a distinct entity—either an Individual or a Corporate Body—submitted for risk assessment. A Customer record is not merely static data; it is a dynamic object that contains:

  1. Identity Profile: The core input data (Name, DOB, National IDs, Corporate Registration).
  2. Risk Intelligence: The AI-generated output, including Match Scores, Verdicts, and Natural Language Narratives.
  3. Compliance Status: The current state of the record (e.g., Pending AI Review, Completed, Analyst Confirmed/Declined).

Using the endpoints below, you can programmatically submit entities for real-time AI screening, retrieve detailed risk narratives for your compliance dashboard, and log audit-trail decisions made by your human analysts.

When Adverse Media is included in categories, TruRisk links each article to the specific screened entity rather than matching on name alone, and factors in the recency of the reporting when generating the verdict and key drivers.


1. Create & Screen Customer

TruRisk Customer Screening is the main entry point for AI-driven risk assessment. This endpoint submits an entity to the system for AML database matching and AI narrative generation.

The API supports two distinct modes: TruRisk Lite for basic screening and TruRisk Advanced for deep-dive analysis requiring identifiers and relationship data. You may pass tru_risk_mode to choose a mode; if omitted, the organization default_mode from Configuration is used.

TruRisk Lite verifies identity using core identifiers only—full name and date of birth or incorporation date, with an optional biometric image—and returns a concise verification summary. It is optimized for speed and best suited to high-volume onboarding and initial screening. TruRisk Advanced evaluates the extended identity and relationship attributes supplied in the request (nationality, identification numbers, address, occupation, industry, known aliases, parent/spouse/sibling, and entity-specific identifiers) to produce a detailed, audit-ready narrative. It is intended for complex or higher-risk investigations, where documentation depth matters more than processing speed.

When a webhook is registered for your organization, the system will deliver TruRisk results to that endpoint.

Endpoint: https://api.amlwatcher.com/api/tru-risk-customers

Method: POST

Sample Request
POST /api/tru-risk-customers HTTP/1.1
Host: api.amlwatcher.com
Content-Type: application/json
Authorization: Bearer Token

{
"name": "Entity Name",
"tru_risk_mode": "TruRisk Advanced",
"birth_incorporation_date": "25-12-1952",
"entity_type": ["Person", "Company"],
"categories": ["Adverse Media", "PEP", "Sanctions", "Insolvency"],
"countries": ["PK", "US"],
"match_score": 80,
"exact_search": false,
"nationality": "Pakistani",
"identification_number": "42201-XXXXXXX-X",
"occupation": "Director",
"industry": "Finance",
"address": "123 Business Ave, Karachi",
"parent": "Parent Name",
"spouse": "Jane Doe",
"sibling": "Alix Doe",
"known_alias": "Person Alias",
"biometric_search_image": "data:image/png;base64,iVBORw0KGgo..."
}

Request Body

Core Fields (Mandatory)

ParameterTypeDescription
nameStringRequired. The full name of the person or company.
entity_typeArrayRequired. Type of entity. Allowed values: Person, Company, Organization, Crypto_Wallet, Vessel, Aircraft. Example: ["Person"], ["Company"].
categoriesArrayRequired. AML databases to screen against (e.g., ["PEP"], ["Sanctions"]).
match_scoreIntegerRequired. Threshold for matching (0-100).

Optional Fields

ParameterTypeDescription
tru_risk_modeEnumOptional. Must be TruRisk Lite or TruRisk Advanced if provided. If omitted, the organization default_mode from TruRisk Configuration is used.

Identifier Logic (Mutually Exclusive)

Mutually Exclusive Fields

Only one of the following identifiers can be provided in a single request. Providing multiple identifiers will result in a validation error.

ParameterTypeDependency
identification_numberStringPassport, National ID, or Emirates ID.
imo_numberStringValid only if entity_type includes Vessel.
tail_numberStringValid only if entity_type includes Aircraft.
business_registration_numberStringUsed for Corporate entities.

Advanced Identity and Relationships

These fields are utilized by the AI Agent in Advanced Mode to generate high-fidelity risk narratives.

ParameterTypeDescription
birth_incorporation_dateStringFormat: DD-MM-YYYY.
nationalityStringThe country of citizenship.
occupationStringCurrent professional role.
industryStringSector of business activity.
parentStringName of parent for enhanced screening.
spouseStringName of spouse for enhanced screening.
siblingStringName of sibling for enhanced screening.
addressStringPhysical residence or business address.
known_aliasStringAlternative names or AKAs.
biometric_search_imageStringBase64 encoded image string for biometric screening.

Success Response

Sample Response
{
"status": "SUCCESS",
"data": {
"customer_id": "Your Customer ID",
"search_reference": "Your Search Reference",
"organization_id": "Your Organization ID",
"name": "Entity Name",
"tru_risk_mode": "TruRisk Advanced",
"status": "Pending",
"verdict": "",
"recommendation": "",
"narrative": null,
"key_drivers": [],
"analyst_decision": "",
"analyst_decision_reason": "",
"match_score": 80,
"birth_incorporation_date": "01-01-1990",
"nationality": "Generic Land",
"identification_number": "ID-12345-XYZ",
"business_registration_number": "",
"imo_number": "",
"tail_number": "",
"occupation": "Professional",
"industry": "Generic Industry",
"address": "123 Main Street, Suite 100",
"parent": "Parent Name",
"spouse": "Spouse Name",
"sibling": "Sibling Name",
"known_alias": "J-Doe",
"entity_type": ["Person"],
"categories": ["PEP", "Sanctions"],
"countries": ["US"],
"biometric_search_image": null,
"upload_source": "API",
"deleted_at": null,
"deleted_reason": null,
"created_at": "2026-02-16T08:00:00.000Z",
"updated_at": "2026-02-16T08:00:00.000Z"
},
"error": false
}

2. Get Customers (Queue)

This endpoint allows you to retrieve a paginated list of screened entities from the TruRisk queue. It supports extensive filtering by AI verdict, analyst decision, date ranges, and screening modes.

Endpoint: https://api.amlwatcher.com/api/tru-risk-customers

Method: GET

Sample Request
GET /api/tru-risk-customers?page=1&page_size=10&verdict=potential_match&tru_risk_mode=TruRisk Advanced HTTP/1.1
Host: api.amlwatcher.com
Authorization: Bearer Token

Query Parameters

ParameterTypeDescription
pageIntegerPage number for pagination.
page_sizeIntegerNumber of records per page (Default: 10).
searchStringSearch by name or upload source (e.g., CSV filename).
verdictEnumFilter by AI result: true_positive, false_positive, true_negative, uncertain, potential_match.
analyst_decisionEnumFilter by human review: Confirmed, Declined, or empty for Pending.
tru_risk_modeStringFilter by mode: TruRisk Lite or TruRisk Advanced.
start_dateStringFilter by creation date start. Format: DD-MM-YYYY.
end_dateStringFilter by creation date end. Format: DD-MM-YYYY.

Response Fields

Root & Pagination

ParameterTypeDescription
statusStringStatus of the API request (e.g., SUCCESS).
errorBooleanIndicates if the request encountered an error.
data.customersArrayList of customer screening records.
data.paginationObjectMetadata for current page, size, total count, and total pages.

Customer Object Details

ParameterTypeDescription
customer_idStringUnique internal identifier for the record.
search_referenceStringExternal reference ID used for case linking.
nameStringName of the entity screened.
tru_risk_modeStringMode used for analysis (TruRisk Lite or TruRisk Advanced).
statusStringAnalysis status: COMPLETED, Pending, or in-progress.
verdictEnumThe AI assessment result (e.g., true_positive, potential_match).
recommendationStringAI-suggested action (e.g., Enhanced Due Diligence Required).
narrativeStringAI-generated text explanation of the risk findings. In TruRisk Lite this is a concise verification summary; in TruRisk Advanced it is a detailed, audit-ready narrative documenting the reasoning behind the verdict.
key_driversArraySpecific data points that triggered the AI verdict.
analyst_decisionStringFinal decision by a human reviewer (Confirmed or Declined).
analyst_decision_reasonStringNotes provided by the analyst regarding their decision.
match_scoreIntegerConfidence score of the match (0-100).
entity_typeArrayClassifications assigned to the entity.
categoriesArrayAML database categories screened against.
countriesArrayList of countries associated with the entity.
birth_incorporation_dateStringDate of birth or incorporation in YYYY-MM-DD or DD-MM-YYYY format.
identification_numberStringPassport or National ID used for screening.
imo_numberStringVessel identification number (if applicable).
tail_numberStringAircraft identification number (if applicable).
addressStringPhysical address of the entity.
nationalityStringCountry of citizenship.
occupationStringProfessional role of the entity.
industryStringBusiness sector.
parent / spouse / siblingStringRelationship data points used for PEP/RCA screening.
known_aliasStringAlternate names or AKAs.
created_atStringTimestamp of record creation.
updated_atStringTimestamp of the last modification.
deleted_atStringTimestamp of soft deletion (null if active).
deleted_reasonStringAudit reason provided for deletion.

Success Response

Sample Response
{
"status": "SUCCESS",
"data": {
"customers": [
{
"address": "",
"analyst_decision": "",
"analyst_decision_reason": "",
"biometric_search_image": null,
"birth_incorporation_date": null,
"business_registration_number": "",
"categories": [
"SIE",
"Adverse Media",
"PEP",
"Insolvency",
"Warnings and Regulatory Enforcement",
"PEP Level 4",
"PEP Level 1",
"SIP",
"PEP Level 2",
"PEP Level 3",
"Fitness and Probity",
"Sanctions"
],
"countries": ["US", "UK"],
"created_at": "2026-02-16T10:18:34.076000Z",
"customer_id": "Your Customer ID",
"deleted_at": null,
"deleted_reason": null,
"entity_type": [
"Aircraft",
"Company",
"Crypto_Wallet",
"Organization",
"Person",
"Vessel"
],
"identification_number": "",
"imo_number": "",
"industry": "",
"key_drivers": [],
"known_alias": "",
"match_score": 80,
"name": "Entity Name",
"narrative": "Any narrative.",
"nationality": "",
"occupation": "",
"organization_id": "Your Organization ID",
"parent": "",
"recommendation": "Enhanced Due Diligence Required",
"search_reference": "Your Search Reference",
"sibling": "",
"spouse": "",
"status": "COMPLETED",
"tail_number": "",
"tru_risk_mode": "TruRisk Lite",
"updated_at": "2026-02-16T10:18:34.076000Z",
"upload_source": "",
"verdict": "true_positive"
}
],
"pagination": {
"page": 1,
"page_size": 10,
"total_count": 613,
"total_pages": 62
}
}
}

3. Update Customer (Analyst Decision)

Use this endpoint to confirm or decline the AI's verdict. This is a critical step for closing the compliance loop.

Provide analyst_decision, analyst_decision_reason, or both — but at least one must be non-empty. Both fields cannot be omitted or empty at the same time.

Endpoint: https://api.amlwatcher.com/api/tru-risk-customers/update

Method: POST

Request
POST /api/tru-risk-customers/update HTTP/1.1
Host: api.amlwatcher.com
Content-Type: application/json
Authorization: Bearer Token

{
"customer_id": "Your Customer ID",
"analyst_decision": "Declined",
"analyst_decision_reason": "Your analyst decision reason."
}

Request Body

ParameterTypeDescription
customer_idStringRequired. The unique ID of the customer record.
analyst_decisionEnumConditionally required. Must be Confirmed or Declined if provided. At least one of analyst_decision or analyst_decision_reason must be non-empty.
analyst_decision_reasonStringConditionally required. A brief explanation for the decision (max 500 characters). At least one of analyst_decision or analyst_decision_reason must be non-empty.
At least one field required

You may send analyst_decision, analyst_decision_reason, or both. However, both cannot be empty — at least one must contain a value.

Success Response

{
"data": {
"address": "",
"analyst_decision": "Declined",
"analyst_decision_reason": "Your analyst decision reason.",
"biometric_search_image": null,
"birth_incorporation_date": "25-12-1952",
"business_registration_number": "",
"categories": [
"Adverse Media",
"PEP",
"Insolvency",
"PEP Level 4",
"PEP Level 1",
"PEP Level 2",
"PEP Level 3",
"Sanctions"
],
"countries": [],
"created_at": "2026-02-16T08:26:52.342000Z",
"customer_id": "Your Customer ID",
"deleted_at": null,
"deleted_reason": null,
"entity_type": ["Company", "Person"],
"identification_number": "",
"imo_number": "",
"industry": "",
"key_drivers": ["Adverse Media"],
"known_alias": "",
"match_score": 80,
"name": "Entity Name",
"narrative": "your narrative.",
"nationality": "",
"occupation": "",
"organization_id": "Your Organization ID",
"parent": "",
"recommendation": "Compliance Review Required",
"search_reference": "Your Search Reference",
"sibling": "",
"spouse": "",
"status": "COMPLETED",
"tail_number": "",
"tru_risk_mode": "TruRisk Advanced",
"updated_at": "2026-02-16T10:08:38.121000Z",
"upload_source": "",
"verdict": "potential_match"
},
"error": false,
"status": "SUCCESS"
}

4. Delete Customer

Performs a soft delete on a customer record. A reason is mandatory for compliance audit trails.

Endpoint: https://api.amlwatcher.com/api/tru-risk-customers/delete

Method: POST

Request
POST /api/tru-risk-customers/delete HTTP/1.1
Host: api.amlwatcher.com
Content-Type: application/json
Authorization: Bearer Token

{
"customer_id": "Your Customer ID",
"deleted_reason": "Duplicate entry created by API test."
}

Request Body

ParameterTypeDescription
customer_idStringRequired. The unique ID of the customer record.
deleted_reasonStringRequired. A brief explanation for the decision.

Success Response

{
"status": "SUCCESS",
"data": {
"deleted_reason": "Duplicate entry created by API test.",
"message": "Customer deleted successfully"
},
"error": false
}

5. Bulk Operations

The Bulk Operations endpoints allow you to process large volumes of customers efficiently by uploading CSV files. You can upload batches for screening and track the status of past uploads.

Once a batch is uploaded, TruRisk screens every customer in the file, assigns a verdict and recommendation to each, and—if enabled in Configuration—automatically creates a case for records that need follow-up. Every bulk execution is logged for audit purposes and can be reviewed through the upload history endpoint below.

Upload Bulk File

Uploads a CSV file for batch processing. The system will queue the file and process customers asynchronously. tru_risk_mode is optional; if omitted, the organization default_mode from Configuration is used.

Endpoint: https://api.amlwatcher.com/api/customers/bulk-upload
Method: POST
Content-Type: multipart/form-data

Request
POST /api/customers/bulk-upload HTTP/1.1
Host: api.amlwatcher.com
Authorization: Bearer Token
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="tru_risk_mode"

TruRisk Advanced
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="trurisk-template-lite.csv"
Content-Type: text/csv

(CSV file content here)
------WebKitFormBoundary7MA4YWxkTrZu0gW--

Request Body Parameters

ParameterTypeDescription
fileFileRequired. The CSV file containing customer data.
tru_risk_modeEnumOptional. Must be TruRisk Lite or TruRisk Advanced if provided. If omitted, the organization default_mode from TruRisk Configuration is used.

Success Response

{
"data": {
"message": "Bulk upload queued for processing",
"status": "Pending",
"total_customers": 150,
"upload_id": "Your Upload ID"
},
"error": false,
"status": "SUCCESS"
}

Get Bulk Upload History

Retrieves a paginated history of all bulk file uploads, including their processing status and mode.

Endpoint: https://api.amlwatcher.com/api/customers/bulk-upload/history

Method: GET

Request
GET /api/customers/bulk-upload/history?status=Completed&tru_risk_mode=TruRisk Advanced HTTP/1.1
Host: api.amlwatcher.com
Authorization: Bearer Token

Query Parameters

ParameterTypeDescription
pageIntegerPagination page number.
page_sizeIntegerRecords per page (Default 10).
searchStringSearch by upload ID or filename.
statusEnumFilter by status: Pending, Processing, Completed, Failed.
tru_risk_modeStringFilter by mode: TruRisk Lite or TruRisk Advanced.
start_dateStringFilter by upload date start (DD-MM-YYYY).
end_dateStringFilter by upload date end (DD-MM-YYYY).

Response Fields

ParameterTypeDescription
upload_idStringUnique ID for the bulk batch.
file_nameStringOriginal name of the uploaded CSV.
tru_risk_modeStringMode used for this batch.
statusStringCurrent processing status (Completed, Pending, etc.).
customersIntegerTotal customers found in the file.
customers_createdIntegerNumber of customers successfully created.
customers_processedIntegerNumber of customers fully processed by AI.
upload_dateStringTimestamp of the upload.
uploaded_byStringUser who performed the upload.

Success Response

{
"data": {
"pagination": {
"page": 1,
"page_size": 1,
"total_count": 106,
"total_pages": 11
},
"uploads": [
{
"cases_created": 0,
"customers": 1,
"customers_created": 1,
"customers_processed": 1,
"file_name": "trurisk-template-lite.csv",
"status": "Completed",
"tru_risk_mode": "TruRisk Advanced",
"upload_date": "2026-02-16T12:07:32.569000Z",
"upload_id": "Your Upload ID",
"uploaded_by": "User Name"
}
]
},
"error": false,
"status": "SUCCESS"
}