API Reference v1.0-beta
System Concept Calculator Request Access →

Overview

The Warisan API is a REST interface for integrating with the Warisan estate resolution infrastructure. It exposes endpoints across six layers: identity verification, estate state machine management, asset registry, distribution calculation (Faraid & civil), SBT settlement issuance, and institutional case ingestion.

Beta notice. This API is in pre-production beta. Endpoints are stable but schema fields may be extended. All breaking changes are versioned and announced 30 days in advance. Use version prefix /v1/ for all requests.

Core Concepts
01 — ESTATE
Estate Object
Central record. Holds state, heirs, assets, track (Syariah/Civil), and proof hashes.
02 — STATE MACHINE
Lifecycle
PENDING → IDENTITY_VERIFIED → ASSET_MAPPED → [ARBITRATION] → SETTLEMENT_ISSUED → DISTRIBUTED
03 — SBT
Settlement Token
Soulbound Token minted per heir on settlement. Non-transferable. Ethereum-anchored. FI-verifiable.

Authentication

All API requests require Bearer token authentication. Tokens are institution-scoped — each partner organisation receives a unique token with defined permission scopes.

API Key Header
Authorization: Bearer wrs_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: application/json
X-Warisan-Institution: YOUR_INSTITUTION_ID
Token Types
PrefixEnvironmentUsage
wrs_live_ProductionReal estate cases, live SBT issuance
wrs_test_SandboxTest cases, dummy SBTs, no blockchain writes
wrs_ar_AR IntegrationAmanah Raya node — elevated query permissions
wrs_fi_FI VerificationRead-only SBT verification for financial institutions

Security. API keys must never be exposed client-side. All production calls must originate from your server. Keys are rotatable via the Warisan Partner Portal. Compromised keys should be revoked immediately.

Base URL & Versioning

# Production
https://api.warisan.com.my/v1

# Sandbox
https://sandbox.api.warisan.com.my/v1

All responses return JSON. Dates use ISO 8601 (2025-01-15T10:30:00Z). Currency amounts are in Malaysian Ringgit (MYR) as integers in sen (1 MYR = 100 sen) to avoid floating-point errors.

Rate Limits

TierRequests/minRequests/dayNotes
Pilot301,00090-day AR sprint partners
Standard12010,000FI integration tier
Enterprise600UnlimitedAmanah Raya, bulk processing

Rate limit headers are returned on every response: X-RateLimit-Remaining, X-RateLimit-Reset. Exceeding limits returns HTTP 429 with a Retry-After header.

Error Codes

All errors return a consistent JSON envelope with a machine-readable code and a human-readable message.

{
  "error": {
    "code":    "HAJB_BLOCKED",
    "message": "Heir is blocked (Hajb Hirman) by a higher-priority relative.",
    "details": { "blocked_heir_id": "heir_abc123", "blocked_by": "heir_def456" }
  }
}
INVALID_IC
IC number format invalid or not found in JPN registry
DEATH_NOT_CONFIRMED
Death certificate not yet confirmed via JPN API
ESTATE_STATE_INVALID
Requested state transition is not valid from current state
ASSET_ALREADY_MAPPED
Asset UUID already registered to a different estate
HAJB_BLOCKED
Heir is blocked (Hajb Hirman) by a higher-priority relative
FARAID_OVERFLOW
Fixed shares exceed 1.0 — estate configuration is invalid
TRACK_MISMATCH
Requested operation is not available on the estate's track (Syariah/Civil)
SBT_ALREADY_ISSUED
SBT has already been issued for this heir on this estate
NDE_NEGATIVE
Net Distributable Estate is zero or negative after deductions
MIXED_RELIGION_ESCALATE
Mixed-religion estate requires human adjudicator — auto-escalated
UNAUTHORIZED
API key missing, invalid, or insufficient scope for this operation
RATE_LIMITED
Request rate exceeded — see Retry-After header

Identity Layer

All heirs and the deceased must be identity-verified before an estate can advance. Identity hashes are stored off-chain; only a cryptographic proof-of-inclusion is written to the consortium chain.

POST /identity/verify Verify heir or deceased identity

Submits identity details for verification against the JPN (Jabatan Pendaftaran Negara) registry. Returns a credential_hash that is stored on the consortium chain as proof-of-inclusion without exposing the raw IC data.

Request Body
FieldTypeRequiredDescription
ic_numberstringrequired12-digit Malaysian IC number (YYMMDDSSNNNG)
full_namestringrequiredFull legal name as per IC
roleenumrequiredDECEASED | HEIR | REPRESENTATIVE
religionenumrequiredISLAM | CHRISTIAN | BUDDHIST | HINDU | OTHER
liveness_tokenstringoptionalToken from biometric liveness SDK (required for HEIR role in production)
Response 200
{
  "identity_id":       "idn_7x9k2m4p",
  "credential_hash":   "0x3a8f...c4b2",
  "status":            "VERIFIED",
  "religion":          "ISLAM",
  "track_suggestion":  "SYARIAH",
  "verified_at":       "2025-03-12T08:44:00Z"
}
200 Verified 400 Invalid IC format 404 IC not found in JPN 503 JPN API unavailable
POST /identity/death-certificate Register and confirm death

Registers a death certificate and triggers JPN confirmation. This is a prerequisite before an estate can be created. The JPN confirmation may be asynchronous — poll GET /identity/{id} or listen on the identity.death_confirmed webhook.

Request Body
FieldTypeRequiredDescription
identity_idstringrequiredIdentity ID of the deceased (from /identity/verify)
death_cert_nostringrequiredOfficial death certificate number (JPN format)
date_of_deathstringrequiredISO 8601 date (2025-01-10)
place_of_deathstringoptionalHospital, city, or country
Response 200
{
  "identity_id":       "idn_7x9k2m4p",
  "death_status":      "PENDING_JPN_CONFIRMATION",
  "death_cert_hash":   "0xf7b1...22e9",
  "jpn_case_ref":      "JPN-2025-0382941"
}
GET /identity/{identity_id} Get identity & death status

Returns the current verification status of an identity record, including JPN confirmation status for deceased individuals.

200 OK 404 Identity not found

Estate Management

The estate is the central object in Warisan. It progresses through a strict state machine. State transitions can only move forward and cannot be skipped.

POST /estates Create a new estate

Creates a new estate record. The deceased must already have a confirmed death certificate (DEATH_CONFIRMED status). The estate is created in PENDING_VERIFICATION state.

Request Body
FieldTypeRequiredDescription
deceased_identity_idstringrequiredIdentity ID of the deceased with confirmed death
trackenumrequiredSYARIAH | CIVIL. Typically derived from deceased's religion.
heir_identity_idsstring[]requiredArray of identity IDs for all known heirs (min 1)
deceased_genderenumrequiredMALE | FEMALE. Required for Faraid calculation.
external_refstringoptionalYour internal reference ID (e.g. AR case number, bank account ID)
Response 201
{
  "estate_id":    "est_m3k9p7xr",
  "state":        "PENDING_VERIFICATION",
  "track":        "SYARIAH",
  "ipfs_hash":    null,
  "on_chain_id":  null,
  "filed_at":     "2025-03-15T09:00:00Z",
  "heirs": [
    { "identity_id": "idn_a1b2c3", "status": "PENDING" }
  ]
}
GET /estates/{estate_id} Get full estate record

Returns the full estate record including current state, all heirs, all assets, distribution result (if computed), and settlement SBT references (if issued).

200 OK 404 Estate not found 403 Insufficient scope to view this estate
PATCH /estates/{estate_id}/state Advance estate state

Advances the estate to the next state. The system validates all prerequisites before allowing the transition. For example, advancing from ASSET_MAPPED to SETTLEMENT_ISSUED requires a confirmed distribution calculation.

Request Body
FieldTypeRequiredDescription
target_stateenumrequiredTarget state. Must be the immediate next state.
notesstringoptionalOperator notes attached to this transition (immutable once written)
Valid Transitions
PENDING_VERIFICATION  → IDENTITY_VERIFIED
IDENTITY_VERIFIED     → ASSET_MAPPED
ASSET_MAPPED          → ARBITRATION        (if dispute flag set)
ASSET_MAPPED          → SETTLEMENT_ISSUED  (undisputed path)
ARBITRATION           → SETTLEMENT_ISSUED  (after arbitrator resolution)
SETTLEMENT_ISSUED     → DISTRIBUTED
GET /estates List estates (paginated)

Returns a paginated list of estates scoped to your institution. Supports filtering by state, track, and date range.

Query Parameters
ParamTypeDescription
stateenumFilter by estate state
trackenumSYARIAH | CIVIL
fromdateFiled on or after (ISO 8601)
limitintegerMax results per page (default 20, max 100)
cursorstringPagination cursor from previous response

Asset Registry

Assets must be declared and mapped to an estate before distribution can be calculated. Each asset is assigned a UUID and linked to the estate's on-chain record. Supports all asset classes including illiquid assets with resolution mode assignment.

POST /estates/{estate_id}/assets Register an asset

Registers a new asset against the estate. For illiquid assets, specify resolution_mode and urgency to enable liquidity discount calculation in the NDE computation.

Request Body
FieldTypeRequiredDescription
namestringrequiredHuman-readable asset name
asset_typeenumrequiredCASH | PROPERTY | VEHICLE | SHARES | BUSINESS | OTHER
appraised_value_senintegerrequiredAppraised value in Malaysian sen (e.g. 50000000 = RM 500,000)
resolution_modeenumoptionalA (Collective Sale) | B (Buyout) | C (Co-ownership / Musya')
urgencyintegeroptionalSale urgency 0–3. 0=Voluntary, 1=Court Order, 2=Forced, 3=Distress. Used for liquidity discount.
external_refstringoptionalLand title, vehicle reg, company reg, share cert number
valuation_sourcestringoptionalName of licensed valuer, auditor, or appraiser
Response 201
{
  "asset_id":              "ast_k2p8n4xm",
  "estate_id":             "est_m3k9p7xr",
  "asset_type":            "PROPERTY",
  "appraised_value_sen":   50000000,
  "resolution_mode":       "A",
  "urgency":               0,
  "liquidity_discount":    0.00,
  "adjusted_value_sen":    50000000,
  "on_chain_uuid":         "0xa3f1...8b4c"
}
GET /ar/query?ic={ic_number} Query Amanah Raya holdings

Queries the Amanah Raya asset database for unclaimed holdings linked to the given IC number. Requires wrs_ar_ or wrs_live_ token with ar:read scope. Returns a list of AR case numbers and asset summaries — not full asset values, which require a separate AR confirmation flow.

AR partnership required. This endpoint is only active for institutions operating under the Amanah Raya integration agreement. Sandbox mode returns synthetic test data.

Response 200
{
  "ic_number":  "820315XXXXXX",
  "ar_holdings": [
    {
      "ar_case_ref":   "AR-2019-082341",
      "asset_type":    "CASH",
      "status":        "UNCLAIMED",
      "est_value_band": "RM 10,000 – RM 50,000"
    }
  ]
}
PUT /estates/{estate_id}/assets/{asset_id} Update valuation or resolution mode

Updates the appraised value, resolution mode, or urgency of an asset. Only permitted while the estate is in IDENTITY_VERIFIED or ASSET_MAPPED state. Each update is recorded as an immutable audit event.

200 Updated 409 Estate state does not permit asset updates

Distribution Engine

The distribution engine applies Faraid rules (Quran 4:11–12, 4:176, Shafi'i school) for the Syariah track, or Distribution Act 1958 for the civil track. Both engines output heir shares as basis points and calculated amounts.

POST /distribution/faraid Calculate Faraid distribution

Computes the Faraid distribution for a Syariah-track estate. Automatically applies Hajb (blocking) rules and identifies Asabah (residuary) heirs. Returns the full distribution matrix including blocked heirs and Bayt al-Mal residue if applicable.

Request Body
FieldTypeRequiredDescription
estate_idstringrequiredEstate must be in ASSET_MAPPED state
heir_matrixobjectrequiredHeir relationship counts (see schema below)
heir_matrix Schema
{
  "husband":          0,   // Max 1 (if deceased is female)
  "wives":            1,   // Max 4 (if deceased is male)
  "sons":             2,
  "daughters":        1,
  "father":           1,   // Max 1
  "mother":           1,   // Max 1
  "full_brothers":    0,
  "full_sisters":     0,
  "paternal_gf":      0,   // Paternal grandfather
  "maternal_gm":      0    // Maternal grandmother
}
Response 200
{
  "estate_id":  "est_m3k9p7xr",
  "nde_sen":    48000000,
  "heirs": [
    {
      "role":          "WIFE",
      "count":         1,
      "fraction":      "1/8",
      "share_bps":     1250,
      "total_sen":     6000000,
      "per_person_sen":6000000,
      "basis":         "1/8 — descendants exist",
      "type":          "FIXED"
    },
    {
      "role":          "SON",
      "count":         2,
      "fraction":      "residue",
      "share_bps":     5833,
      "total_sen":     28000000,
      "per_person_sen":14000000,
      "basis":         "Asabah — 2x unit",
      "type":          "RESIDUARY"
    }
  ],
  "blocked_heirs": [],
  "total_allocated_bps": 10000
}
POST /distribution/nde Compute Net Distributable Estate

Computes the Net Distributable Estate (NDE) from all registered assets. Applies liquidity discounts based on each asset's resolution mode and urgency, then deducts liabilities. The resulting NDE is the basis for all distribution calculations.

Request Body
FieldTypeRequiredDescription
estate_idstringrequiredEstate ID with assets registered
liabilities_senintegerrequiredTotal debts + funeral + admin costs in sen
Response 200
{
  "gev_sen":        60000000,  // Gross Estate Value
  "adj_gev_sen":    55500000,  // After liquidity discounts
  "liabilities_sen":7500000,   // Debts + costs
  "nde_sen":        48000000,  // Net Distributable Estate
  "assets_breakdown": [
    {
      "asset_id":          "ast_k2p8n4xm",
      "appraised_sen":     50000000,
      "discount_rate":     0.10,
      "adjusted_sen":      45000000,
      "resolution_mode":   "A"
    }
  ]
}
POST /distribution/confirm Confirm and lock distribution

Locks the distribution calculation to the estate record. This is an irreversible action that writes the distribution to the consortium chain and is a prerequisite for SBT issuance. All heirs with HEIR role must have VERIFIED identity status before confirmation is permitted.

200 Confirmed — distribution locked 409 Unverified heirs exist 409 Distribution already confirmed

Settlement (SBT)

Settlement Soulbound Tokens are issued per heir after distribution is confirmed. Each SBT is non-transferable, anchored to Ethereum mainnet via Merkle proof, and accepted by Warisan partner FIs as proof of beneficial interest for collateralised financing.

POST /sbt/issue Issue Settlement SBT

Issues a Settlement SBT for a specific heir on a confirmed estate. The SBT is minted on the Warisan consortium chain and simultaneously anchored to Ethereum mainnet via OpenTimestamps Merkle proof. The process is asynchronous — poll GET /sbt/{sbt_id} or listen on the sbt.issued webhook.

Request Body
FieldTypeRequiredDescription
estate_idstringrequiredEstate must be in SETTLEMENT_ISSUED state
heir_identity_idstringrequiredIdentity ID of the heir receiving the SBT
Response 202 Accepted
{
  "sbt_id":          "sbt_p9x3k7mn",
  "status":          "MINTING",
  "estate_id":       "est_m3k9p7xr",
  "heir_identity_id":"idn_a1b2c3",
  "share_bps":       1250,
  "check_url":       "/v1/sbt/sbt_p9x3k7mn"
}
GET /sbt/{sbt_id} Verify SBT (FI endpoint)

Returns the full SBT record including Ethereum anchor proof, IPFS hash, and heir entitlement breakdown per asset. This is the primary endpoint used by partner financial institutions to verify an heir's SBT before extending financing. Accessible with wrs_fi_ read-only tokens.

Response 200
{
  "sbt_id":          "sbt_p9x3k7mn",
  "status":          "ISSUED",
  "transferable":    false,
  "share_bps":       1250,
  "nde_sen":         48000000,
  "heir_amount_sen": 6000000,
  "issued_at":       "2025-03-22T14:30:00Z",
  "ethereum_anchor": "0x7f3c...a8d1",
  "ipfs_hash":       "QmXz...kP9",
  "jpn_attestation": "JPN-SIG-2025-0384",
  "last_validated_at":"2026-03-22T00:00:00Z",
  "asset_entitlements": [
    {
      "asset_id":        "ast_k2p8n4xm",
      "asset_type":      "PROPERTY",
      "resolution_mode": "A",
      "entitlement_sen": 5625000
    }
  ],
  "fi_collateral_note": {
    "max_ltv_pct":    85,    // Mode A/B resolved; 40-60 if Mode C
    "collateral_type":"BENEFICIAL_INTEREST"
  }
}
SBT On-Chain Schema
SettlementSBT
sbt_idbytes32Unique identifier, hash(estate_id + heir_address)
estate_idbytes32Parent estate on consortium chain
heir_addressaddressHeir's wallet address on consortium chain
share_bpsuint256Ownership in basis points (10000 = 100%)
transferableboolAlways false — Soulbound, non-transferable
resolution_modesbytesEncoded resolution mode per asset (A|B|C)
sunset_trigger_dateuint256Unix timestamp — Mode C compulsory sale trigger
ipfs_bundle_cidbytes32IPFS CID of full estate document bundle
ethereum_anchorbytes32Ethereum tx hash of Merkle root anchor
jpn_sigbytesJPN digital signature of estate record
issued_atuint256Unix timestamp of issuance — immutable
last_validated_atuint256Annual re-attestation timestamp

Institutional API

The Institutional API allows partner organisations — banks, EPF, Bursa, insurers — to push unresolved estate cases to Warisan for resolution. Warisan resolves the estate and returns a settlement hash and SBT references via webhook.

POST /institutional/cases Push unresolved case

Submits an unresolved estate case from a partner institution. Warisan creates an estate record, triggers identity verification, and notifies the institution via webhook at each state transition.

Request Body
FieldTypeRequiredDescription
institution_case_refstringrequiredYour internal case / account / policy reference
deceased_icstringrequiredIC number of the deceased account/policy holder
asset_typeenumrequiredBANK_ACCOUNT | EPF_BALANCE | SHARES | INSURANCE_POLICY | OTHER
asset_value_senintegerrequiredCurrent balance / surrender value in sen
known_heirsobject[]optionalArray of {ic_number, name, relationship} if known
webhook_urlstringoptionalOverride your account-level webhook URL for this case
Response 202
{
  "warisan_case_id":      "wcase_n8m3k2px",
  "institution_case_ref": "ACC-2024-089234",
  "estate_id":            "est_m3k9p7xr",
  "status":               "INTAKE",
  "estimated_resolution": "21-30 days"
}
Webhooks

Warisan posts a JSON payload to your registered webhook URL on every estate state transition. Verify authenticity with the X-Warisan-Signature header (HMAC-SHA256 of the raw body using your webhook secret).

EventTrigger
identity.death_confirmedJPN confirms death certificate
estate.state_changedAny state machine transition
estate.dispute_openedA dispute flag is raised by a heir
distribution.confirmedDistribution locked to chain
sbt.issuedSBT minted and Ethereum-anchored
estate.distributedFinal state — assets transferred
sbt.annual_revalidationAnnual re-attestation completed
// Example webhook payload
{
  "event":      "sbt.issued",
  "timestamp":  "2025-03-22T14:35:00Z",
  "data": {
    "sbt_id":     "sbt_p9x3k7mn",
    "estate_id":  "est_m3k9p7xr",
    "heir_ic":    "820315XXXXXX",
    "share_bps":  1250,
    "eth_anchor": "0x7f3c...a8d1"
  }
}
GET /fi/sbt/verify?sbt_id={sbt_id} FI quick-verify SBT

Lightweight endpoint for financial institutions to quickly verify an SBT's validity and retrieve the collateral note. Returns a condensed response suitable for loan origination systems. No distribution details are exposed — only validity, heir entitlement amount, and recommended LTV.

Response 200
{
  "valid":            true,
  "sbt_id":           "sbt_p9x3k7mn",
  "heir_amount_sen":  6000000,
  "recommended_ltv": 85,
  "collateral_type": "BENEFICIAL_INTEREST",
  "ethereum_verified":true,
  "last_validated":  "2026-03-22"
}

Enums & Constants

Estate States
PENDING_VERIFICATION
IDENTITY_VERIFIED
ASSET_MAPPED
ARBITRATION
SETTLEMENT_ISSUED
DISTRIBUTED
CLOSED
Track
SYARIAH   // Faraid — Quran 4:11–12
CIVIL     // Distribution Act 1958
Resolution Mode
A  // Collective Sale (بيع جماعي)
B  // Buyout (افتداء)
C  // Co-ownership / Musya' (مشاع)
Asset Types
CASH
PROPERTY
VEHICLE
SHARES
BUSINESS
OTHER
Urgency (Liquidity Discount)
0  // Voluntary (0% discount)
1  // Court Order (10–20%)
2  // Forced Sale (20–30%)
3  // Distress Auction (30–40%)

Changelog

2025-03-01
newIlliquid asset resolution modes (A/B/C) added to /assets and /distribution/nde endpoints. Liquidity discount schedule live.
2025-02-15
newSBT annual re-attestation via sbt.annual_revalidation webhook event. last_validated_at field added to SBT schema.
2025-02-01
newInstitutional API (/institutional/cases) released. Webhook system live with 7 event types.
2025-01-15
new/fi/sbt/verify endpoint released for FI-scoped read-only tokens. recommended_ltv field included.
2025-01-01
newv1.0-beta API released. Identity, estate, asset, distribution, and SBT endpoints available in sandbox.