Phase 2: API Interface Design

Introduction to API Phase

Phase 2 of WIA-LEG-006 transforms the data formats from Phase 1 into actionable APIs that enable programmatic interaction with digital asset inheritance systems. These RESTful APIs allow wallets, estate planning platforms, executors, and beneficiaries to create, query, update, and execute inheritance plans in a standardized, interoperable manner.

This chapter provides comprehensive API specifications including endpoints, request/response formats, authentication mechanisms, error handling, and integration patterns. Developers can use these specifications to build compliant applications or integrate existing systems with WIA-LEG-006 infrastructure.

API Architecture

Base URL and Versioning

All WIA-LEG-006 APIs follow a consistent URL structure:

https://api.{provider}.com/wia/leg-006/v1/{resource}

Version is included in the URL path to enable smooth API evolution while maintaining backwards compatibility. Breaking changes require a new major version (v2, v3, etc.), while minor updates and bug fixes maintain the same version.

Authentication and Authorization

Phase 2 APIs implement OAuth 2.0 with JWT tokens for authentication, supplemented by additional verification for sensitive operations:

Operation Type Authentication Required Additional Verification
Read public plan info API Key None
Read full plan details OAuth 2.0 + JWT Owner/Beneficiary identity
Create/Update plan OAuth 2.0 + JWT MFA + Biometric
Execute inheritance OAuth 2.0 + JWT Multi-party signatures + Legal docs
Emergency access Hardware security key Court order verification

Core API Endpoints

Inheritance Plan Management

POST /plans

Description: Create a new inheritance plan

Request Body:

{
  "owner": {
    "did": "did:wia:owner:abc123",
    "authentication": {
      "method": "biometric",
      "token": "jwt-token-here"
    }
  },
  "plan": {
    // Complete Phase 1 data structure
  },
  "encryption": {
    "publicKey": "owner-public-key",
    "algorithm": "RSA-4096"
  }
}

Response:

{
  "planId": "plan-7f9fade1c0d5",
  "status": "created",
  "version": "1.0",
  "createdAt": "2025-01-15T10:30:00Z",
  "encryptionFingerprint": "sha256:abc...",
  "backupLocations": [
    "ipfs://QmX7KwXNFjKj8w3nQGxBvCvqV2zxK9yDhXjL8pTvWqRsN5",
    "arweave://tx-id-here"
  ]
}

GET /plans/{planId}

Description: Retrieve inheritance plan details

Query Parameters:

Response:

{
  "planId": "plan-7f9fade1c0d5",
  "version": "1.2",
  "status": "active",
  "lastModified": "2025-01-20T14:45:00Z",
  "plan": {
    // Phase 1 data structure
  },
  "permissions": {
    "canModify": true,
    "canExecute": false,
    "canView": ["metadata", "beneficiaries"]
  }
}

PUT /plans/{planId}

Description: Update existing inheritance plan

Request Body:

{
  "currentVersion": "1.1",
  "changes": {
    "assets": {
      "add": [/* new asset objects */],
      "update": [/* modified assets */],
      "remove": ["asset-id-1", "asset-id-2"]
    },
    "beneficiaries": {
      "update": [/* modified beneficiary allocations */]
    }
  },
  "changeReason": "Added new Bitcoin holdings and NFT collection",
  "authentication": {
    "mfa": "123456",
    "biometric": "fingerprint-hash"
  }
}

Response:

{
  "planId": "plan-7f9fade1c0d5",
  "newVersion": "1.2",
  "previousVersionHash": "sha256:7f9fa...",
  "changesApplied": 15,
  "warnings": [
    "Beneficiary allocation now totals 105% - review distribution rules"
  ]
}

DELETE /plans/{planId}

Description: Revoke inheritance plan (does not delete from blockchain)

Request Body:

{
  "revocationReason": "Creating new plan",
  "authentication": {
    "mfa": "123456",
    "confirmationPhrase": "I understand this action cannot be undone"
  }
}

Asset Discovery and Inventory

POST /assets/discover

Description: Scan for digital assets across blockchains and platforms

Request Body:

{
  "owner": "did:wia:owner:abc123",
  "searchCriteria": {
    "walletAddresses": [
      "bc1q...",
      "0x123..."
    ],
    "blockchains": ["Bitcoin", "Ethereum", "Polygon", "Solana"],
    "platforms": ["OpenSea", "Decentraland", "ENS"],
    "timeRange": {
      "from": "2020-01-01",
      "to": "2025-01-15"
    }
  },
  "includeHistory": true,
  "estimateValues": true
}

Response:

{
  "discoveryId": "disc-xyz789",
  "status": "completed",
  "assetsFound": 47,
  "totalEstimatedValue": {
    "amount": 892000,
    "currency": "USD"
  },
  "assets": [
    // Array of discovered assets in Phase 1 format
  ],
  "recommendations": [
    "Consider adding 12 NFTs currently not in inheritance plan",
    "Bitcoin holdings on 3 addresses detected - consolidate for easier management"
  ]
}

Beneficiary Management

POST /beneficiaries/verify

Description: Verify beneficiary identity and inheritance rights

Request Body:

{
  "planId": "plan-7f9fade1c0d5",
  "beneficiary": {
    "did": "did:wia:beneficiary:alice123",
    "credentials": {
      "governmentId": "encrypted-id-scan",
      "verifiableCredential": "VC-jwt-token",
      "biometric": "facial-recognition-data"
    }
  },
  "verificationLevel": "high-assurance"
}

Response:

{
  "verificationId": "ver-abc456",
  "status": "verified",
  "confidence": 0.99,
  "beneficiaryId": "ben-001",
  "entitlements": {
    "assets": ["asset-crypto-001", "asset-nft-001"],
    "percentage": 50,
    "estimatedValue": 445000,
    "conditions": {
      "ageRequirement": {
        "required": 25,
        "current": 24,
        "eligible": "2026-03-22"
      }
    }
  },
  "nextSteps": [
    "Wait until age 25 for full distribution",
    "Trust distributions will begin on schedule"
  ]
}

Trigger Management

POST /triggers/checkin

Description: Owner check-in to reset dead man's switch

Request Body:

{
  "planId": "plan-7f9fade1c0d5",
  "authentication": {
    "method": "biometric",
    "data": "fingerprint-template",
    "location": {
      "latitude": 37.7749,
      "longitude": -122.4194
    },
    "deviceId": "iPhone-ABC123"
  }
}

Response:

{
  "checkInId": "checkin-timestamp-12345",
  "status": "confirmed",
  "nextCheckInDue": "2026-01-15T10:30:00Z",
  "daysUntilTrigger": 365,
  "notificationSettings": {
    "firstWarning": 335,
    "secondWarning": 350,
    "finalWarning": 358
  }
}

POST /triggers/execute

Description: Trigger inheritance execution (authorized parties only)

Request Body:

{
  "planId": "plan-7f9fade1c0d5",
  "trigger": {
    "type": "manual-executor",
    "reason": "Owner deceased",
    "documentation": [
      {
        "type": "death-certificate",
        "issuer": "California Department of Public Health",
        "documentHash": "sha256:abc...",
        "storageUrl": "ipfs://QmX..."
      },
      {
        "type": "letters-testamentary",
        "issuer": "San Francisco Superior Court",
        "caseNumber": "PES-2025-12345"
      }
    ]
  },
  "executors": [
    {
      "did": "did:wia:executor:xyz789",
      "signature": "digital-signature-1"
    },
    {
      "did": "did:wia:attorney:legal456",
      "signature": "digital-signature-2"
    }
  ]
}

Response:

{
  "executionId": "exec-timestamp-67890",
  "status": "initiated",
  "validationResults": {
    "documentationComplete": true,
    "signaturesValid": true,
    "legalRequirementsMet": true
  },
  "timeline": {
    "notificationPeriod": "7 days",
    "contestPeriod": "30 days",
    "estimatedDistribution": "2025-03-15"
  },
  "nextSteps": [
    "Beneficiaries will be notified within 24 hours",
    "Assets will be locked pending contest period",
    "Distribution will occur automatically unless contested"
  ]
}

Webhook System

The API supports webhooks for real-time notifications of important events:

Event Type Description Payload Example
plan.created New plan created {"planId": "...", "owner": "...", "timestamp": "..."}
plan.updated Plan modified {"planId": "...", "version": "...", "changes": [...]}
trigger.warning Inactivity warning {"planId": "...", "daysRemaining": 30, "severity": "high"}
trigger.activated Inheritance triggered {"planId": "...", "triggerType": "...", "executionId": "..."}
distribution.initiated Asset distribution started {"executionId": "...", "beneficiaries": [...], "assets": [...]}
distribution.completed Distribution finished {"executionId": "...", "status": "success", "transactions": [...]}

Webhook Configuration

POST /webhooks

Description: Register webhook endpoint

Request Body:

{
  "url": "https://myapp.com/webhooks/wia-leg-006",
  "events": ["trigger.warning", "trigger.activated", "distribution.completed"],
  "authentication": {
    "method": "hmac-sha256",
    "secret": "webhook-secret-key"
  },
  "retryPolicy": {
    "maxAttempts": 5,
    "backoff": "exponential"
  }
}

Error Handling

All API errors follow a consistent format:

{
  "error": {
    "code": "INSUFFICIENT_AUTH",
    "message": "Multi-factor authentication required for this operation",
    "details": {
      "requiredFactors": ["password", "biometric"],
      "providedFactors": ["password"]
    },
    "timestamp": "2025-01-15T10:30:00Z",
    "requestId": "req-abc123",
    "documentation": "https://docs.wia.org/leg-006/errors/INSUFFICIENT_AUTH"
  }
}
HTTP Status Error Code Description
400 INVALID_REQUEST Malformed request body or parameters
401 UNAUTHORIZED Missing or invalid authentication
403 INSUFFICIENT_AUTH Additional verification required
404 NOT_FOUND Plan or resource does not exist
409 CONFLICT Version conflict or concurrent modification
422 VALIDATION_ERROR Data validation failed
429 RATE_LIMIT Too many requests
500 INTERNAL_ERROR Server error

Chapter Summary: Key Takeaways

  1. RESTful Design: Phase 2 APIs follow REST principles with clear resource-oriented URLs, standard HTTP methods, and predictable response formats.
  2. Layered Security: Different operations require different authentication levels, from simple API keys to multi-factor biometric verification and multi-party signatures.
  3. Comprehensive Endpoints: APIs cover the complete inheritance lifecycle from plan creation and asset discovery through trigger management and distribution execution.
  4. Real-Time Notifications: Webhook system enables applications to respond immediately to critical events like trigger warnings and distribution initiation.
  5. Developer-Friendly: Consistent error handling, comprehensive documentation, and predictable behaviors reduce integration complexity.
  6. Interoperability Foundation: Standardized APIs enable diverse applications—wallets, estate planners, exchanges, custodians—to interoperate seamlessly.

Review Questions

  1. Why does the API use URL-based versioning rather than header-based versioning, and what are the trade-offs?
  2. Explain the multi-level authentication system. Why do different operations require different authentication strengths?
  3. How does the asset discovery API help address the "hidden assets" problem identified in Chapter 2?
  4. Describe the complete workflow for triggering inheritance execution via the API, including all required documentation and signatures.
  5. What is the purpose of the webhook system, and how does it enable real-time inheritance monitoring?
  6. How do the error codes and consistent error format improve the developer experience when integrating with WIA-LEG-006 APIs?
Looking Ahead: Chapter 6 examines Phase 3: Smart Contract Protocol, diving into the on-chain execution mechanisms that enable automated, trustless inheritance on blockchain networks. We'll explore multi-signature implementations, dead man's switch contracts, oracle integration, and cross-chain coordination.

Korea Industrial, Research, Education Infrastructure Mapping

Korea operates its industrial ecosystem and standardization system through the following core infrastructure. Korea Top 5 Groups: Samsung, Hyundai Motor, LG, SK, Lotte. Each group operates standardization committees and ISO/IEC TC Korean secretariats. Samsung Electronics (semiconductors, displays, home appliances, telecom)·Hyundai Motor (automobiles, mobility)·LG Electronics (home appliances, displays, OLED)·SK hynix (memory)·LG Energy Solution·Samsung SDI (batteries)·POSCO Future M (materials)·Hyundai Mobis (parts). Korean IT Big Tech: NAVER (search, cloud, AI HyperCLOVA)·Kakao (messenger, payment, mobility, banking)·Coupang (e-commerce, logistics)·Karrot Market·Toss·Woowa Brothers. Korea Telcos: SK Telecom·KT·LG U+. 5G·5G dedicated networks·B2B cloud·AI businesses operating. Korea Top 7 Research Universities: Seoul National University·KAIST·POSTECH·Yonsei University·Korea University·UNIST·DGIST·GIST. All serve as standardization R&D bases and ISO/IEC/IEEE Korean chairs. Korea Government-affiliated National Research Institutes (26): KIST, KAERI, KIMM, KIER, KFRI, KRICT, KRIBB, KARI, KASI, KIGAM, KICT, KISTI, KETI, ETRI, NIMS, KIMS, KISDI, KOTRA, STEPI, KOEN, KICCE, KIET, KIPF, KIHASA, KICJ, KLRI. Korea Industrial Complexes / Tech Valleys: Pangyo Techno Valley·Dongtan·Gwanggyo·Songdo IBD·Yeouido·Gangnam·Sihwa·Banwol·Gumi·Ulsan·Changwon·Geoje·Yeosu·Onsan·Cheongju·Iksan·Gwangyang·POSCO Gwangyang Steel Mill·Asan Bay·Seosan·Songdo·Incheon Airport·Sejong·Cheongna·Geomdan. Korea Trade and Finance Infrastructure: Korea International Trade Association (KITA)·Korea Trade-Investment Promotion Agency (KOTRA)·Export-Import Bank of Korea (KEXIM)·Bank of Korea·Kookmin Bank·Shinhan·Hana·Woori·NH Nonghyup·IBK Industrial Bank·SC First Bank·Citi Bank Korea·HSBC Korea·DBS Korea — 14 Korean major banks and foreign banks. Korea K-POP / K-Content: HYBE·SM·YG·JYP 4 major entertainment companies·CJ ENM·tvN·MBC·KBS·SBS·EBS·YTN·Yonhap News TV·JTBC Korean broadcasting·NETFLIX Korea·Disney Plus·TVING·Wavve·Watcha·Coupang Play. Korea Gaming Industry: Nexon·NCsoft·Krafton·Netmarble·Kakao Games·Pearl Abyss·Com2uS·Gamevil·NHN·Smilegate·Webzen. Korea Automotive / Battery: Hyundai Motor·Kia·Genesis·LG Energy Solution·Samsung SDI·SK On·POSCO Future M·EcoPro·L&F battery cathode material suppliers. Korea Semiconductor: Samsung Electronics (HBM3E·HBM4)·SK hynix (HBM3E 12-Hi)·DB HiTek·SK siltron·SK Enpulse·Dongjin Semichem·Seoul Semiconductor·Simmtech·Samsung Display·LG Display.

Korea Standardization Infrastructure Mapping

Korea operates a comprehensive standards governance system through inter-ministerial cooperation. National Standards Council (under Prime Minister's Office, per Framework Act on National Standards Article 5) coordinates KATS (Korean Agency for Technology and Standards), MFDS (Ministry of Food and Drug Safety), MOTIE (Ministry of Trade, Industry and Energy), MSIT (Ministry of Science and ICT), MOIS (Ministry of the Interior and Safety), MOE (Ministry of Environment), MOHW (Ministry of Health and Welfare), MND (Ministry of National Defense), MCST (Ministry of Culture, Sports and Tourism), MOFA (Ministry of Foreign Affairs), MOJ (Ministry of Justice), and FSC (Financial Services Commission). Accreditation and Testing: KOLAS (Korea Laboratory Accreditation Scheme) accredits 800+ testing laboratories. KAS (Korea Accreditation System) accredits 50+ certification bodies. KTC (Korea Testing Certification), KTR (Korea Testing & Research Institute), KTL (Korea Testing Laboratory), and KCL (Korea Conformity Laboratories) provide conformance testing. Telecom and Cyber: KCC (Korea Communications Commission), KCA (Korea Communications Agency), TTA (Telecommunications Technology Association), IITP (Institute for Information & Communications Technology Planning & Evaluation), NIPA (National IT Industry Promotion Agency), KISA (Korea Internet & Security Agency), KCMVP (Korea Cryptographic Module Validation Program), NIS (National Intelligence Service), NSR (National Security Research Institute), and NCSC (National Cyber Security Center). National R&D Centers: KIST, ETRI, KAIST, Seoul National University, Yonsei University, Korea University, POSTECH, UNIST, GIST, DGIST, KISTI, KIER, KIMM, KRICT, KFRI, KRIBB. International Standards Cooperation: ISO TC/SC Korean secretariats, IEC TC/SC Korean secretariats, ITU-T Study Group Korean chairs, 3GPP RAN/SA Korean chairs, IEEE 802 Korean chairs, W3C Korea office, OASIS Korea office, IETF Korea cooperation, OECD CSTP, UN ESCAP, APEC SCSC Korean cooperation. Korean Industrial Standards (KS) Catalog: KS X (Information) 25,000+, KS A (Basic) 15,000+, KS B (Machinery) 25,000+, KS C (Electrical) 18,000+, KS D (Metallurgy) 12,000+, KS E (Mining) 5,000+, KS F (Construction) 18,000+, KS H (Food) 8,000+, KS I (Environment) 5,000+, KS J (Biology) 3,000+, KS K (Textile) 15,000+, KS L (Ceramics) 7,000+, KS M (Chemistry) 12,000+, KS P (Medical) 5,000+, KS Q (Quality Mgmt) 4,000+, KS R (Transport) 12,000+, KS S (Service) 3,000+, KS T (Packaging) 4,000+, KS V (Shipbuilding) 5,000+, KS W (Aerospace) 3,000+ — totaling 220,000+ Korean Industrial Standards. Key Acts: Personal Information Protection Act (Act 19234, effective Sept 15, 2024), Electronic Government Act, Electronic Signature Act, Act on Promotion of Information and Communications Network Utilization and Information Protection, Information and Communications Infrastructure Protection Act, Data Industry Act, Public Data Act, AI Framework Act (Act 20212, effective July 2026), Industrial Technology Innovation Promotion Act, Framework Act on Science and Technology — 70+ Korean standardization-related laws.

Korea Digital Transformation Detailed Mapping

Korea operates digital transformation through a comprehensive governance system. Digital Government: Digital Platform Government Committee (established September 2022, under the President)·Ministry of the Interior and Safety Digital Government Bureau·e-Government Support Center·Gov.kr·National Citizen Service·KDIS (Korea Digital Information Society)·NIA (National Information Society Agency)·MOIS (Ministry of the Interior and Safety). K-DNS Infrastructure: Korea Internet & Security Agency (KISA) Korea Internet Center·KISA DNS Root Server·KRNIC (Korea Network Information Center)·BGP Korea·National Cyber Security Center (NCSC)·KCC (Korea Communications Commission)·MSIT (Ministry of Science and ICT)·NIA·NIPA. Korean Cloud Infrastructure: KT Cloud·NAVER Cloud (NCloud)·Samsung SDS Cloud·LG U+ Cloud·NHN Cloud·Kakao Enterprise Cloud·SK Telecom Cloud·KISA Cloud Security Assurance Program (CSAP)·KCMVP-validated cloud·ISMS-P (Information Security & Personal Information Management System). Korean Security Certifications: KISA ISMS-P certification·KCMVP (Korean Cryptographic Module Validation Program)·NIS (National Intelligence Service) "National Cryptographic Technology Operation Standards"·NCSC "National Cyber Security Strategy 2024-2028"·CC (Common Criteria) Korean evaluation bodies·EAL4·EAL5·KS X ISO/IEC 15408·19790·24759 Korean Profile. Korean Data Standards: NIA AI Hub·National Data Standardization Committee·Statistics Korea (KOSTAT)·MyData 4 Designated Combination Specialists (Samsung SDS, KICI, KOSTAT, KFTC)·National Institute of Korean Language·National Law Information Center·National Spatial Information Platform·National Spatial Data Center·Korean Spatial Information Standards. Finance and Fintech Standards: FSC (Financial Services Commission)·FSS (Financial Supervisory Service)·FIU (Financial Intelligence Unit)·BOK (Bank of Korea)·FSEC (Financial Security Institute)·KFTC (Korea Financial Telecommunications)·KSD (Korea Securities Depository)·KRX (Korea Exchange) 8-agency cooperation. 5G/6G Communications Infrastructure: 5G subscribers 35 million (2024)·5G base stations 350,000·6G commercialization target 2028·5G dedicated networks 16 operators·6G Acceleration Council (MSIT, 2024). K-Content: KOCCA (Korea Creative Content Agency)·MCST (Ministry of Culture, Sports and Tourism)·KCA (Korea Communications Agency)·Korea Culture Information Service Agency·Korean Film Archive·Korea Publishing Industry Promotion Agency. Data 3 Acts (Personal Information Protection Act·Credit Information Act·Telecommunications Network Act, 2020 enforcement)·Data Industry Act (2021)·Public Data Act (2013)·AI Framework Act (2026)·Digital Platform Government Framework Act (2024 proposed) — Korea digital transformation core legislation.

📐 시뮬레이터 패널 4