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 { "data" { } // required, dynamic payload } responses 200 ok (success) the response includes the following details for each rule 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 timetaken the time taken to evaluate each rule against the transaction payload { "txnid" "txn 987654", "teamid" "679ddc46 34ce 4b7a 8da8 4b8ba4848ae8", "acknowledgementid" "670f9e9d4028b83f2543fdb1", "flagged" true, "receivedat" 1729076893328, "ruleevaluationmetrics" { "3116db5a 36bb 4a70 8853 6a71cf6b91a9" { "status" "rule violated", "timetaken" 0 159074992 }, "13f913d5 8dcc 4867 b6d7 5d372956ce04" { "status" "rule evaluation failed", "timetaken" 0 003980621 }, "1484dd77 985d 4854 af45 86934f50cdd5" { "status" "rule complied", "timetaken" 0 121830409 } } 400 bad request invalid json description the request body contains invalid json, making it impossible to process the transaction response { "error" "invalid json" } missing required fields description one or more required fields are missing from the transaction payload response { "error" "missing required fields \[list of fields]" } 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 { "error" "failed to parse transaction payload" } empty database schema description the database schema is not set or configured for the team, preventing the transaction from being processed response { "error" "dbschema is empty" } 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 { "error" "missing x api key" } invalid api key description the provided api key in the x api key header is invalid or incorrect response { "error" "invalid x api key" } 403 forbidden unauthorized team description the team id provided in the request is not authorized to access the requested resources response { "error" "unknown team" } 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 { "error" "failed to register transaction" } 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