{
  "example_id": "flight-booking",
  "title": "Book a flight under $500 (immediate, once)",
  "description": "An AI travel agent is asked to book the cheapest available flight to New York City under $500. The agent proposes a single-use mandate locked to one airline, expiring in 30 minutes. The human approves the mandate. Once active, the agent requests a virtual card — the system validates automatically against mandate rules and issues it. The agent uses the card at checkout. The mandate exhausts immediately after.",
  "flow": {
    "step_1": "Agent calls POST /v1/mandates with cadence='once' and expires_at=+30min. Mandate created with status='pending_approval'.",
    "step_2": "Human receives notification, reviews the proposed mandate (United Airlines, max $500, expires in 30min), and approves. Mandate moves to status='active'.",
    "step_3": "Agent polls GET /v1/mandates/{id} until status='active'.",
    "step_4": "Agent finds the cheapest flight ($472.31) and calls POST /v1/mandates/{id}/credential-requests. System auto-validates: amount within limit, merchant matches, MCC matches, mandate not expired.",
    "step_5": "Validation passes. Virtual card (PAN, expiry, CVV) returned. Agent enters card details at airline checkout. Mandate moves to status='exhausted'."
  },
  "mandate": {
    "id": "mnd_example_flight_001",
    "owner_id": "usr_example_consumer",
    "agent_id": "agent_claude_travel",
    "budget": {
      "cadence": "once",
      "per_transaction_max": 50000,
      "total_max": 50000,
      "currency": "USD",
      "merchants": ["United Airlines"],
      "merchant_category_codes": ["4511"],
      "categories": ["travel", "flights"],
      "expires_at": "2026-02-17T14:30:00Z"
    },
    "risk_controls": {
      "require_merchant_match": true,
      "block_international": false,
      "max_daily_spend": 50000,
      "velocity_limit_per_hour": 1
    },
    "status": "active",
    "approved_at": "2026-02-17T14:05:00Z",
    "created_at": "2026-02-17T14:00:00Z",
    "expires_at": "2026-02-17T14:30:00Z",
    "metadata": {
      "task": "book cheapest flight to NYC under $500",
      "initiated_by": "user_voice_command",
      "destination": "New York City"
    }
  },
  "credential_request": {
    "id": "cr_example_flight_001",
    "mandate_id": "mnd_example_flight_001",
    "amount": 47231,
    "currency": "USD",
    "merchant": "United Airlines",
    "merchant_category_code": "4511",
    "context": "Booking United Airlines flight UA2847 from SFO to JFK on Feb 22, 2026 at 8:15am. Economy class, no checked bags. Cheapest available option under $500.",
    "idempotency_key": "flight-ua2847-sfo-jfk-20260222",
    "metadata": {
      "flight_number": "UA2847",
      "origin": "SFO",
      "destination": "JFK",
      "departure_date": "2026-02-22"
    },
    "validation": {
      "passed": true,
      "constraints": {
        "within_amount_limit": { "passed": true, "detail": "47231 <= 50000 (per_transaction_max)" },
        "merchant_match": { "passed": true, "detail": "United Airlines is in merchants allowlist" },
        "mcc_match": { "passed": true, "detail": "4511 (Airlines) matches merchant_category_codes" },
        "within_time_period": { "passed": true, "detail": "Mandate expires 2026-02-17T14:30:00Z, request at 14:12:00Z" },
        "cadence_not_exhausted": { "passed": true, "detail": "once mandate — first credential request" },
        "velocity_check": { "passed": true, "detail": "0 requests in past hour; limit is 1/hour" }
      },
      "reasons": [
        "Amount $472.31 is within the $500.00 per-transaction limit",
        "Merchant United Airlines is in the approved list",
        "MCC 4511 (Airlines) matches allowed category codes",
        "Mandate is active and has not expired",
        "All constraints passed — virtual card issued automatically"
      ]
    },
    "virtual_card": {
      "pan": "4111111111111111",
      "expiry_month": "02",
      "expiry_year": "2026",
      "cvv": "737",
      "billing_zip": "94105",
      "network": "visa",
      "expires_at": "2026-02-17T14:27:00Z",
      "single_use": true,
      "amount_limit": 47231,
      "merchant_lock": "United Airlines"
    },
    "status": "approved",
    "created_at": "2026-02-17T14:12:00Z"
  },
  "amount_note": "amount: 47231 = $472.31. Amounts are always integers in minor currency units (cents for USD).",
  "mandate_lifecycle_note": "After this credential is issued, the mandate moves to status='exhausted'. No further credential requests can be made against it."
}
