Warddocs
Guides

Outcomes

Availability: turned on per API deployment; until then these endpoints answer 404. Ask Mandate to enable it for your account.

Every answer carries id and ref (wref_...). Keep either, or none: an outcome can also name the decision by your own reference or by the network's.

Name the decision

Field on the outcome Matches
decision_id Ward's decision id
ref The ref Ward returned
reference Your id sent as reference on /decide, or transaction_id, client_reference, external_ref, case_id in the input
card {"rrn", "stan", "auth_code"} together
network_reference The card network reference
crypto {"chain", "tx_hash"}

Identifiers are kept as keyed hashes, never in clear. One decision: linked. None yet: kept and linked when the decision arrives. Several: 409 ambiguous_reference with the candidates; Ward never guesses.

Send outcomes

curl https://api.mandatelabs.ai/api/v1/ward/outcomes \
  -H "X-API-Key: $WARD_API_KEY" -H "Content-Type: application/json" \
  -d '{"card": {"rrn": "612345678901", "stan": "000777", "auth_code": "AB12CD"},
       "event_type": "chargeback", "network": "visa", "reason_code": "10.4",
       "occurred_at": "2026-11-02T10:00:00Z", "source_event_id": "cb-88231"}'

Bulk: POST /api/v1/ward/outcomes/bulk with {"items": [...]}, up to 5,000. The same event (same source_event_id, else the same references, type, day and code) is stored once.

event_type: chargeback, chargeback_won_by_merchant, chargeback_lost_by_merchant, fraud_report, scam_report, customer_cancelled, account_closed (with reason: mule, money_laundering, ...), sar_filed, suspected_flag, cleared_by_review, refund, other. client_label takes your own word, mapped by your label dictionary.

The label Ward derives

GET /api/v1/ward/decisions/{id}/outcomes shows the events and the label (rule labels-1):

Events Label Trains
Fraud chargeback fraud, provisional after 45 days with no merchant win
... then the merchant wins first-party misuse yes
Consumer dispute, processing or authorisation chargeback dispute no (not fraud)
Fraud or scam report, SAR, account closed for mule activity that label yes
Suspected flag alone suspected never as confirmed
Cleared by review genuine yes
No outcome, an approved card payment over 120 days old genuine (matured) yes
No outcome, an approved transfer over 13 months old (your policy) genuine (matured) yes

AML monitoring never becomes genuine by silence. Set your own windows with PUT /api/v1/ward/thresholds: {"maturity": {"card_days": 180, "transfer_days": 365}} (card from 120 to 540 days, transfers 30 to 800).

Decisions and the queue

  • GET /api/v1/ward/decisions: your decisions, newest first, filtered by type, decision, label_state, purpose, since, until; page with before.
  • GET /api/v1/ward/outcome-queue: stepped-up decisions and the review sample of approvals with no outcome yet, outcomes not matched, words your dictionary does not map, and suspected replays.
  • POST /api/v1/ward/decisions/{id}/replay-review {"clear": true}: a production call whose event happened long before Ward saw it, or whose reference Ward saw on an older decision, is held out of your model's training until you clear it.

Learning settings

GET / PUT /api/v1/learning/settings: train_on_outcomes (your own model trains on your outcomes; on by default) and review_sample (2% of approvals go to your queue; with it off your models are marked as trained on stopped cases only).