Skip to content

Quick Start

Let’s build a “sanctions screening” policy step by step.

We want: screenings with no sanctions match pass sanctions screening.

A **screening** passes sanctions screening
if __sanctions_match__ of **screening** is equal to false.

Let’s break this down:

PartMeaning
A **screening**We’re evaluating a screening object
passes sanctions screeningThe outcome if conditions pass
__sanctions_match__Access the sanctions_match property
of **screening**From the screening object
is equal to falseThe comparison
.End of rule

Interactive Example

Policy Rule
Test Data (JSON)

Try changing sanctions_match to true and running again — the result should flip to Fail.

Let’s require that the customer is also from a supported country:

A **screening** passes sanctions screening
if __sanctions_match__ of **screening** is equal to false
and __country__ of **screening** is not equal to "IR".

Interactive Example

Policy Rule
Test Data (JSON)

You can evaluate this policy via a simple HTTP call:

Terminal window
curl -X POST https://api.policy2.net/run \
-H "Content-Type: application/json" \
-H "x-api-key: <your-api-key>" \
-d '{
"rule": "A **screening** passes sanctions screening if __sanctions_match__ of **screening** is equal to false.",
"data": { "screening": { "sanctions_match": false } }
}'
  • Install an official client from the SDKs page if you want to call Policies from application code
  • Learn about Core Concepts — selectors, properties, and rules
  • Explore Operators — all the ways to compare values
  • Learn how stored resources, roles, and visibility work in Platform RBAC
  • Learn how saved policies and flows are managed in the General API
  • Try the Playground — experiment freely