Workflow
Evaluate JsonLogic rule API
Evaluates a JsonLogic expression against a data object (var, comparisons, and/or/not, arithmetic, if, in, missing) and returns the result, truthiness and type. Answers 'Does this rule pass for this data?', 'What value does this JsonLogic produce?'.
Price$0.02per request
MethodPOST
Route/v1/workflow/jsonlogic-eval
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
jsonlogicrulerules-engineevaluatelogicconditionbooleanworkflow
API URL
Integration docshttps://x402.hexl.dev/v1/workflow/jsonlogic-evalExample request
{
"rule": {
">": [
{
"var": "age"
},
18
]
},
"data": {
"age": 25
}
}Example response
{
"result": true,
"truthy": true,
"resultType": "boolean",
"interpretation": "Rule evaluated to true (truthy)."
}Input schema
{
"type": "object",
"required": [
"rule"
],
"properties": {
"rule": {
"description": "A JsonLogic expression object",
"examples": [
{
">": [
{
"var": "age"
},
18
]
}
]
},
"data": {
"type": "object",
"description": "Data the rule reads via var",
"examples": [
{
"age": 25
}
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}