# Cashflow monitoring

Endpoints for submitting cash transactions and retrieving AML cashflow monitoring results.

## Submit client cash transactions for AML monitoring

> Send a cash transaction for automated AML/KYC evaluation.

```json
{"openapi":"3.0.3","info":{"title":"Apentis API","version":"1.1.0"},"tags":[{"name":"Cashflow monitoring","description":"Endpoints for submitting cash transactions and retrieving AML cashflow monitoring results."}],"servers":[{"url":"https://www.riskquadrant.com/api","description":"API for Production environment - Luxembourg"},{"url":"https://www.riskquadrant.ch/api","description":"API for Production environment - Switzerland"},{"url":"https://www.rq-test.com/api","description":"API for Test environment (for sandbox integration)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CashTransaction":{"type":"object","required":["crmCode","transactionDate","portfolioId","currency","amount","transactionType","externalTransactionId"],"properties":{"crmCode":{"type":"string","maxLength":100,"description":"Business relation executing the transaction"},"transactionDate":{"type":"string","format":"date","description":"Transaction date in YYYY-MM-DD format"},"valueDate":{"type":"string","format":"date","description":"Date of value or settlement in YYYY-MM-DD format (optional)"},"portfolioId":{"type":"string","maxLength":100,"description":"Identifier of the account or portfolio"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code (e.g., EUR, USD)"},"amount":{"type":"number","format":"double","description":"Net cash amount of the transaction"},"transactionType":{"type":"string","enum":["dividend","coupon","interest-payment","bond-reimbursement","forex","cash-transfer","fee","tax","time-deposit","loan","margin-call","capital-call","distribution","other"],"description":"Type of transaction"},"transactionDirection":{"type":"string","enum":["inflow","outflow"]},"description":{"type":"string","maxLength":200,"description":"Optional free-text description"},"externalTransactionId":{"type":"string","maxLength":100,"description":"Unique transaction ID from the external system"},"originCountry":{"type":"string","maxLength":2,"pattern":"^[A-Z]{2}$","description":"ISO 2-letter country code of the transaction's origin (e.g., FR)"},"originIban":{"type":"string","maxLength":34,"description":"IBAN of the originating bank account"},"originatorName":{"type":"string","maxLength":100,"description":"Name of the counterparty sending the funds"},"destinationCountry":{"type":"string","maxLength":2,"pattern":"^[A-Z]{2}$","description":"ISO 2-letter country code of the transaction's destination (e.g., DE)"},"destinationIban":{"type":"string","maxLength":34,"description":"IBAN of the beneficiary bank account"},"beneficiaryName":{"type":"string","maxLength":100,"description":"Name of the counterparty receiving the funds"},"complianceNote":{"type":"string","maxLength":200,"description":"Optional field from the back office with context or risk flag"},"isInternalTransfer":{"type":"boolean","description":"Indicates if the cash movement is internal (between client’s own portfolios)"},"isSuspicious":{"type":"boolean","description":"Optional pre-flag from source system if already suspected"}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Short description of the error"},"code":{"type":"integer","description":"Application-specific or HTTP error code"}}}}},"paths":{"/v1.1/cash-transactions":{"post":{"summary":"Submit client cash transactions for AML monitoring","description":"Send a cash transaction for automated AML/KYC evaluation.","tags":["Cashflow monitoring"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CashTransaction"}}}}},"responses":{"201":{"description":"Transactions accepted for analysis","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"receivedCount":{"type":"integer"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown business relation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Duplicate transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## GET /v1.1/cash-transactions/{externalTransactionId}/aml-result

> Get AML cashflow monitoring result for a cash transaction

```json
{"openapi":"3.0.3","info":{"title":"Apentis API","version":"1.1.0"},"tags":[{"name":"Cashflow monitoring","description":"Endpoints for submitting cash transactions and retrieving AML cashflow monitoring results."}],"servers":[{"url":"https://www.riskquadrant.com/api","description":"API for Production environment - Luxembourg"},{"url":"https://www.riskquadrant.ch/api","description":"API for Production environment - Switzerland"},{"url":"https://www.rq-test.com/api","description":"API for Test environment (for sandbox integration)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CashFlowResult":{"type":"object","properties":{"externalTransactionId":{"type":"string"},"crmCode":{"type":"string"},"portfolioId":{"type":"string"},"transactionDate":{"type":"string","format":"date"},"analysisResult":{"type":"object","properties":{"status":{"type":"string","enum":["clear","flagged","pending-review"]},"riskScore":{"type":"integer","minimum":0,"maximum":100},"riskLevel":{"type":"string","enum":["low","medium","high"]},"automatedComment":{"type":"string"},"screeningHits":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"details":{"type":"string"}}}}}},"complianceReview":{"type":"object","properties":{"reviewedBy":{"type":"string"},"reviewDate":{"type":"string","format":"date"},"status":{"type":"string","enum":["approved","under_investigation","escalated","dismissed"]},"comment":{"type":"string"}}}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Short description of the error"},"code":{"type":"integer","description":"Application-specific or HTTP error code"}}}}},"paths":{"/v1.1/cash-transactions/{externalTransactionId}/aml-result":{"get":{"summary":"Get AML cashflow monitoring result for a cash transaction","tags":["Cashflow monitoring"],"parameters":[{"name":"externalTransactionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"AML result retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashFlowResult"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## GET /v1.1/cash-transactions/aml-results

> List AML results for a business relation or portfolio

```json
{"openapi":"3.0.3","info":{"title":"Apentis API","version":"1.1.0"},"tags":[{"name":"Cashflow monitoring","description":"Endpoints for submitting cash transactions and retrieving AML cashflow monitoring results."}],"servers":[{"url":"https://www.riskquadrant.com/api","description":"API for Production environment - Luxembourg"},{"url":"https://www.riskquadrant.ch/api","description":"API for Production environment - Switzerland"},{"url":"https://www.rq-test.com/api","description":"API for Test environment (for sandbox integration)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CashFlowResult":{"type":"object","properties":{"externalTransactionId":{"type":"string"},"crmCode":{"type":"string"},"portfolioId":{"type":"string"},"transactionDate":{"type":"string","format":"date"},"analysisResult":{"type":"object","properties":{"status":{"type":"string","enum":["clear","flagged","pending-review"]},"riskScore":{"type":"integer","minimum":0,"maximum":100},"riskLevel":{"type":"string","enum":["low","medium","high"]},"automatedComment":{"type":"string"},"screeningHits":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"details":{"type":"string"}}}}}},"complianceReview":{"type":"object","properties":{"reviewedBy":{"type":"string"},"reviewDate":{"type":"string","format":"date"},"status":{"type":"string","enum":["approved","under_investigation","escalated","dismissed"]},"comment":{"type":"string"}}}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Short description of the error"},"code":{"type":"integer","description":"Application-specific or HTTP error code"}}}}},"paths":{"/v1.1/cash-transactions/aml-results":{"get":{"summary":"List AML results for a business relation or portfolio","tags":["Cashflow monitoring"],"parameters":[{"name":"crmCode","in":"query","required":false,"schema":{"type":"string"}},{"name":"portfolioId","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","schema":{"type":"string","format":"date"}},{"name":"toDate","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"List of AML results","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CashFlowResult"}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# 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://apentis.gitbook.io/apentis-api/api-reference/cashflow-monitoring.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.
