Skip to main content
POST
curl
Didit’s transaction rule backtest evaluates a candidate configuration against recent transactions and reports overlaps with active rules.

Authorizations

x-api-key
string
header
required

Your application's API key, from Developers -> API keys in the Business Console. The primary key has full access. A named key can be scoped: none, read or write per resource, limited to some workflows or to approved sessions, to a list of IP addresses, and to an expiry date. 401 means the key is wrong, revoked or expired; 403 means no key was sent, the key has no access to this resource or action, or the request came from an address outside its IP list; 404 on a session route means the session is outside the key's workflows or statuses. A key without media access receives image, video and PDF URLs as null, and a key without sessions write receives session links and tokens as null. See https://docs.didit.me/console/api-keys.

Headers

Idempotency-Key
string

Optional retry-safety key you choose for one operation, up to 255 characters (a UUID works). A request repeated with the same key, endpoint, query and body is answered with the first response, same status and same body, and runs and bills nothing a second time. The same key with another endpoint, query or body returns 409 idempotency_key_reused, and while the first request is still running, 409 idempotency_key_in_progress with Retry-After. A failed request (any 4xx or 5xx) is not stored, so you can send it again with the same key. Keys belong to your application, whether you call with an API key or an access token. See Retries and idempotency.

Required string length: 1 - 255

Body

application/json

Hypothetical rule configuration to evaluate against recent transactions. Read-only and free: nothing is created or modified. Send the same conditions, aggregation, evaluation_mode AND scope as the rule you intend to activate. Omitted conditions, aggregation and scope add no constraints of their own; dropping scope can include directions or transaction types the saved rule skips. Omitted evaluation_mode defaults to ALL (which can reduce matches for an ANY rule), and omitted period_days defaults to 90 days, not unlimited history.

conditions
object[]
aggregation
object[]
evaluation_mode
enum<string>
default:ALL
Available options:
ALL,
ANY
scope
object

Which transactions the rule applies to. Only these three keys are accepted.

period_days
integer
default:90
Required range: 1 <= x <= 365
rule_id
string<uuid>

Optional ID of the rule being edited. Excludes that rule from overlap comparisons; does not change the candidate configuration.

Response

200 - application/json

Backtest statistics.

evaluated
integer
required

Transactions evaluated (most recent first, capped).

matched
integer
required

Transactions the configuration would have matched.

affected_entities
integer
required

Distinct subjects (by vendor_data) among the matches.

period_days
integer
required
truncated
boolean
required

True only when additional transactions in the requested period were omitted by the replay cap.

overlapping_rules
object[]
required

Active rules matching the candidate hits, excluding rule_id. Empty when none matched within the comparison bounds.

overlapping_rules_truncated
boolean
required

True when the overlap comparison is partial: more than 50 eligible active rules, more than 1000 rule/transaction comparisons, or a truncated replay with candidate hits and eligible rules. False when there are no candidate hits or no eligible rules, even if truncated is true. Counts are not exhaustive when true.

Last modified on November 11, 2026