Docs

Rule Evaluation

Rule Evaluation endpoints of the Rule Engine API.

Evaluate Transaction

POST

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

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, if not provided all active rules will be evaluated

JSON

{
"transaction": {
"transaction_id": "string",
"originator_address": "string",
"originator_name": "string",
"originator_account_reference_id": "string",
"beneficiary_address": "string",
"beneficiary_name": "string",
"beneficiary_account_reference_id": "string",
"amount": 0,
"currency": "string",
"country_code": "string",
"metadata": {}
},
"rule_codes": [
"string"
]
}

Responses

Status

Description

200

Successful Response

404

Not found

422

Validation Error

JavaScript

"string"