User manual

Transaction Monitoring : API

15min

This describes the request body and the various responses from the transaction monitoring system after processing a transaction. The responses detail the rule evaluation, any detected violations, and errors encountered during the rule evaluation or transaction processing.

Endpoint: /stream/v1

Method: POST

Headers:

  • x-api-key (Required): A valid API key associated with the team. (Present in the API Key Curl Command)

Request Body:

The request body must be a JSON object that includes the following fields:

JSON


Responses:

200 OK (Success)

The response includes the following details for each rule :

  1. status: The status for each rule, which can be:
    • RULE_COMPILED: The rule was successfully checked with the payload, and no violations were found.
    • RULE_VIOLATED: The transaction violated the rule.
    • RULE_EVALUATION_FAILED: An error occurred while evaluating the rule, likely due to misconfiguration or invalid logic in the rule.
  2. timetaken: The time taken to evaluate each rule against the transaction payload.
JSON


400 Bad Request

  • INVALID_JSON
    • Description: The request body contains invalid JSON, making it impossible to process the transaction.
    • Response :
JSON

  • Missing Required Fields
    • Description: One or more required fields are missing from the transaction payload.
    • Response:
JSON

  • Failed to Parse Transaction Payload
    • Description: The system encountered an error while parsing the transaction payload, possibly due to improper data formatting or structure.
    • Response:
JSON

  • Empty Database Schema
    • Description: The database schema is not set or configured for the team, preventing the transaction from being processed.
    • Response:
JSON


401 Unauthorized

  • Missing API Key
    • Description: The x-api-key header is not present in the request, and the server cannot authenticate the request.
    • Response:
JSON

  • Invalid API Key
    • Description: The provided API key in the x-api-key header is invalid or incorrect.
    • Response:
JSON


403 Forbidden

  • Unauthorized Team
    • Description: The team ID provided in the request is not authorized to access the requested resources.
    • Response:
JSON


422 Unprocessable Entity

  • Failed to Register Transaction :
    • This indicates that there was an error in the transaction payload. The potential reasons for this could include:
      • Datatype mismatch: A field’s value does not match its expected datatype.
      • Missing keys: Certain required keys are missing from the transaction payload, preventing proper rule evaluation.
    • Response:
JSON


These response categories provide detailed feedback about whether the transaction was processed successfully, the status of each rule evaluated, and if any errors occurred during the evaluation.

Updated 17 Oct 2024
Doc contributor
Did this page help you?