Docs

Rule Evaluation

Evaluate a transaction against the business’s compliance rules.

Evaluate Transaction

POST

https://sandbox.ospree.io/api/v2/engine/evaluate

Required API Key Scopes: rule_engine:write

Request body

Field

Type

Required

Description

transaction

TransactionRequest

Yes

—

transaction.transaction_id

string

Yes

Unique transaction identifier

transaction.originator_address

string | null

No

Wallet involved in the transaction

transaction.originator_name

string | null

No

Sender identifier

transaction.originator_account_reference_id

string | null

No

Sender account identifier

transaction.beneficiary_address

string | null

No

Recepient wallet involved in the transaction

transaction.beneficiary_name

string | null

No

Recipient identifier

transaction.beneficiary_account_reference_id

string | null

No

Recepient account identifier

transaction.amount

number

Yes

Amount transferred

transaction.currency

string

Yes

Currency code (e.g., AED, USD) Max length 5.

transaction.country_code

string

Yes

Country to verify the threshold (use ISO 3166-1 alpha-2 country code, e.g. AE for United Arab Emirates).

transaction.metadata

object | null

No

Additional transaction metadata

rule_codes

array<string>

Yes

List of rule codes to evaluate. An empty list evaluates all of the business’s active rules. A listed code with no active configuration is reported in `data.results` with `status: “error”` rather than omitted.

JSON

{
"transaction": {
"transaction_id": "txn-2026-08-31-000417",
"originator_address": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy",
"originator_name": "Ada Tester",
"originator_account_reference_id": "acct-orig-1042",
"beneficiary_address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"beneficiary_name": "Grace Receiver",
"beneficiary_account_reference_id": "acct-benf-2087",
"amount": 18500,
"currency": "AED",
"country_code": "AE",
"metadata": {
"channel": "web",
"product": "spot"
}
},
"rule_codes": []
}

Responses

Status

Description

200

Evaluation completed. Per-rule verdicts are in `data.results`, which carries one entry for every rule evaluated and one for every requested `rule_codes` entry that has no active configuration.

401

Unauthorized

402

Payment Required

403

Forbidden - the API key does not have a Scope this operation requires

404

Not found

422

Unprocessable Entity - Validation Error

500

Internal Server Error

JSON

{
"status": "success",
"data": {
"transaction_id": "txn-2026-08-31-000417",
"evaluated_at": "2026-08-31T09:14:22.418293",
"results": [
{
"rule_code": "TransferThresholdByCountry",
"status": "pass"
}
]
}
}