Skip to main content

Use a preset

Most common compliance policies are already published as official presets — curated, versioned rulesets maintained by us. List them with:
GET /v1/rulesets?tag=preset
Then invoke any preset by ruleset_id. No need to write a ruleset from scratch for these. A few of the most-used presets:
ruleset_idWhat it checks
br-bacen-cmn-5193-credito-rural@1Brazilian rural-credit eligibility under CMN Resolution 5193 (geo + documental composite).
br-funai-tis-intersects@1Overlap with FUNAI indigenous territories (Brazil).
br-icmbio-ucs-federais-intersects@1Overlap with ICMBio federal conservation units (Brazil).
br-ibama-embargos-intersects@1Overlap with IBAMA embargoed-area registry.
br-mte-lista-suja-subject@1Subject match against the MTE forced-labor blacklist (CNPJ/CPF).
global-ofac-sdn-subject@1Subject match against the OFAC SDN list.
eu-eudr-br-due-diligence-composite@1EUDR due-diligence composite for Brazil (deforestation + protected areas + indigenous).
eu-natura2000-combined-intersects@1Overlap with EU Natura 2000 (SAC + SPA).
global-wdpa-intersects@1Overlap with the World Database on Protected Areas.
Call:
curl -X POST https://api-attestly.code4source.com/v1/evaluate \
  -H "Authorization: Bearer atk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "geometry": {
        "type": "Polygon",
        "coordinates": [[[-60,-3],[-60,-2],[-59,-2],[-59,-3],[-60,-3]]]
      }
    },
    "ruleset_id": "br-funai-tis-intersects@1"
  }'
Subject presets take an identifier instead of (or alongside) a geometry:
{
  "input": {
    "scheme": { "type": "br:cnpj", "value": "00.000.000/0001-91" }
  },
  "ruleset_id": "br-mte-lista-suja-subject@1"
}

When to author your own

Write a custom ruleset only when no preset fits:
  • Your jurisdiction is not covered by an official preset.
  • You need non-default thresholds, buffer distances, or severities.
  • You need to gate on an internal source you ingested privately.
  • You’re combining checks across sources with a custom verdict policy.
For everything else, prefer a preset — they’re maintained, versioned, and stay in sync with the underlying registers.

Custom example

A “buffer-around-protected-area” policy with a distance projection, a threshold check, and an explicit verdict policy. No existing preset covers the “warn between 500 m and 2 km, block under 500 m” pattern.
{
  "name": "uc-proximity-policy",
  "version": 1,

  "sets": {
    "nearby_uc": {
      "source": "icmbio_ucs_federais",
      "joins": [{ "dwithin": { "target": "$input", "max_m": 2000 } }]
    }
  },

  "projections": [
    {
      "id": "distance_to_uc_m",
      "terminal": { "type": "min_distance_m", "set": "$nearby_uc" }
    }
  ],

  "checks": [
    {
      "id": "uc_too_close",
      "severity": "critical",
      "predicate": {
        "type": "threshold",
        "projection": "distance_to_uc_m",
        "op": "<=",
        "value": 500
      }
    },
    {
      "id": "uc_buffer_zone",
      "severity": "medium",
      "predicate": {
        "type": "threshold",
        "projection": "distance_to_uc_m",
        "op": "<=",
        "value": 2000
      }
    }
  ],

  "verdict_policy": {
    "kind": "severity_mapping",
    "rules": {
      "critical": "non_compliant",
      "high":     "non_compliant",
      "medium":   "warning",
      "low":      "warning",
      "info":     "compliant"
    }
  }
}
All other historical examples on this page have been replaced by official presets — see the table above.