Quick Start
Let’s build a “sanctions screening” policy step by step.
Step 1: Define the Rule
Section titled “Step 1: Define the Rule”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:
| Part | Meaning |
|---|---|
A **screening** | We’re evaluating a screening object |
passes sanctions screening | The outcome if conditions pass |
__sanctions_match__ | Access the sanctions_match property |
of **screening** | From the screening object |
is equal to false | The comparison |
. | End of rule |
Step 2: Try It
Section titled “Step 2: Try It”Interactive Example
Policy Rule
Test Data (JSON)
Try changing sanctions_match to true and running again — the result should flip to Fail.
Step 3: Add More Conditions
Section titled “Step 3: Add More Conditions”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)
Step 4: Call the API Directly
Section titled “Step 4: Call the API Directly”You can evaluate this policy via a simple HTTP call:
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 } } }'Next Steps
Section titled “Next Steps”- 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