GridZen · Reviewed 2026-10-09

Decision API quickstart: local development

Run a local payout request to inspect GridZen’s event contract and starter policy. The example uses synthetic data and local-baseline, which makes no external calls. A country mismatch returns review with score 55 for this payout example; this is a development policy result, not a fraud prediction.

Run the local service

Use Python 3.10 or later, install requirements.txt in a virtual environment and run uvicorn app.main:app --reload. Send the example to localhost:8000. Development authentication depends on your local configuration; when a decision key is configured, include X-API-Key. Do not send this development example to an unapproved public or pilot endpoint.

Read the result

The request declares MX and expected_country ID. local-baseline emits identifier_present=true and country_context_match=false. The starter policy adds 45 for the mismatch and another 10 for a payout with a nonzero score. It returns review, risk_score=55 and country_context_mismatch. Trace IDs and timestamps vary on every evaluation.

Next integration step

Use the response reference to handle policy decisions separately from HTTP failures. For real signals, scope an approved adapter, credentials and permitted data with the pilot team. Public documentation does not issue a production API key or imply an open live sandbox.

Executable synthetic example

python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/uvicorn app.main:app --reload

# In another terminal:
curl http://localhost:8000/api/v1/decisions/payout \
  -H "Content-Type: application/json" \
  -d '{
  "event": "payout",
  "subject": {
    "email": "person@example.com"
  },
  "context": {
    "country": "MX",
    "expected_country": "ID",
    "consent_reference": "synthetic-test-1"
  },
  "providers": [
    "local-baseline"
  ]
}'

Selected response fields; trace ID, timestamps, evidence and audit note are omitted here.

{
  "event": "payout",
  "decision": "review",
  "risk_score": 55,
  "reason_codes": [
    "country_context_mismatch"
  ],
  "providers_used": [
    "local-baseline"
  ]
}

Sources and scope

Based on the alpha contract and source implementation. Live route availability requires separate confirmation.

Continue reading