# if.api demo — PandaDoc (receipt-backed)

**Audience:** external reviewers + operators  
**Reality gate:** demo of a signing contract, not a deployed PandaDoc integration.

---

## Links (HTML-first)

if.trace receipt:
https://infrafabric.io/static/trace/UhmvPGzaJT6oAHzq19x-Gw

Pack (HTML view):
https://infrafabric.io/static/pack/UhmvPGzaJT6oAHzq19x-Gw

Pack (raw Markdown):
https://infrafabric.io/static/pack/UhmvPGzaJT6oAHzq19x-Gw.md

Source bundle (tgz):
https://infrafabric.io/static/source/0a1beb8179312f433d4a47b7d0ffce49398df7f99ddac0d07eb4bbf63c2c94d2.tgz

---

## What this proves (black/white)

This demo proves:
- a known signing request can be normalized deterministically into a results envelope
- the output is bound to if.trace receipts (hash checks; signatures only where present and verifiable)

This demo does not prove:
- live PandaDoc API calls, credentials, or signer identity verification
- any shipped if.bus runtime or message broker

---

## Demo artifacts

Source bundle sha256 (tgz):

    0a1beb8179312f433d4a47b7d0ffce49398df7f99ddac0d07eb4bbf63c2c94d2

Input JSON sha256:

    9676b626ebec7c2a0d2d5824b315ac1768821647f2a51d004c59c5dfae196ab2

Normalized output JSON sha256:

    2b7b6da2c4a37ded1c7dd5f64c74d7389c0a2feeb3c72a6340bf583d83ebebe5

---

## How to reproduce (no internal access)

```bash
curl -fsSL -o if-api-pandadoc-demo-source.tgz "https://infrafabric.io/static/source/0a1beb8179312f433d4a47b7d0ffce49398df7f99ddac0d07eb4bbf63c2c94d2.tgz"
sha256sum if-api-pandadoc-demo-source.tgz

tar -xzf if-api-pandadoc-demo-source.tgz
python3 run_pandadoc_demo.py pandadoc_input.json > normalized_event.json
sha256sum normalized_event.json
```

Expected `sha256sum` (source bundle):

    0a1beb8179312f433d4a47b7d0ffce49398df7f99ddac0d07eb4bbf63c2c94d2  if-api-pandadoc-demo-source.tgz

Expected `sha256sum` (normalized output):

    2b7b6da2c4a37ded1c7dd5f64c74d7389c0a2feeb3c72a6340bf583d83ebebe5  normalized_event.json

---

## Output (normalized event envelope)

```json
{
  "event": "sign",
  "input_sha256": "9676b626ebec7c2a0d2d5824b315ac1768821647f2a51d004c59c5dfae196ab2",
  "integration": "pandadoc",
  "notes": {
    "integrity": "see if.trace receipt for output bytes",
    "live_lookup": false
  },
  "requested_at": "2026-01-07T00:00:00Z",
  "resolved_at": "2026-01-07T00:00:00Z",
  "results": [
    {
      "document_name": "demo-proposal.pdf",
      "metadata": {
        "document_id": "PDOC-0001",
        "routing": "parallel",
        "signature_type": "electronic"
      },
      "resolution_method": "synthetic-map",
      "status": "simulated",
      "template_name": "Demo Proposal"
    }
  ],
  "schema_version": "demo.v1"
}
```
