Auto-Revision Watcher

The auto-revision watcher monitors a structural drawing source and automatically re-runs the full Eurocode pipeline when updated drawings are detected. The result is a revised fabrication bundle — PDF, IFC, Excel BOM, DSTV NC1 — delivered without manual intervention.

Entitlement: Auto-revision is available on Pro and Studio plans. Free tier users see the watcher registration UI with a 402 upgrade prompt.

How it works

Three intake methods feed the same pipeline:

On completion the pipeline computes a structured diff (members changed, load inputs, compliance status flips) and emails a markdown summary to the job owner. Studio org members with the Engineer role are CC'd automatically.

Entitlement

Method 1 — Manual push

Upload a revised PDF directly to a job. FrameAI creates a child job, runs the full pipeline, and diffs the result against the parent.

Endpoint

POST/api/jobs/:id/revisionsPro / Studio

Content-Type: multipart/form-data

Example

curl -X POST https://frameai-structural.polsia.app/api/jobs/42/revisions \
  -F "email=you@firm.com" \
  -F "pdf=@revised-drawing.pdf"

Response 202

{
  "revision_id": 7,
  "revision_index": 2,
  "job_id": 99,
  "parent_job_id": 42,
  "revision_number": 2,
  "status": "pending",
  "poll_url": "/api/upload/preview/99"
}

Method 2 — HTTP watcher

Register a URL to be polled every N seconds. FrameAI sends a HEAD request; if the ETag (or content MD5 when no ETag is present) changes, the new PDF is downloaded and a revision job is enqueued.

Register a watcher

POST/api/jobs/:id/watch

curl -X POST https://frameai-structural.polsia.app/api/jobs/42/watch \
  -H "Content-Type: application/json" \
  -d '{
    "email": "you@firm.com",
    "source": "http",
    "watch_url": "https://storage.example.com/drawings/frame-v2.pdf",
    "poll_interval_seconds": 900
  }'

Response 201

{
  "watcher_id": 3,
  "job_id": 42,
  "source": "http",
  "watch_url": "https://storage.example.com/drawings/frame-v2.pdf",
  "poll_interval_seconds": 900,
  "message": "We will poll ... every 900s and create a revision if the content changes."
}

List watchers

GET/api/jobs/:id/watch

curl "https://frameai-structural.polsia.app/api/jobs/42/watch?email=you@firm.com"

Method 3 — Email inbound

Each email watcher gets a unique routing address. Emails sent to that address with a PDF attachment trigger a revision automatically.

Register an email watcher

curl -X POST https://frameai-structural.polsia.app/api/jobs/42/watch \
  -H "Content-Type: application/json" \
  -d '{ "email": "you@firm.com", "source": "email" }'

Response 201

{
  "watcher_id": 4,
  "source": "email",
  "email_address": "job-a3f8c1d2e5b4...@in.frameai-structural.polsia.app",
  "message": "Send revised PDF attachments to job-...@in.frameai-structural.polsia.app to trigger a revision."
}

Forward your CAD tool's PDF export directly to this address. Postmark routes it to FrameAI, which extracts the first PDF attachment and enqueues a revision job.

Watch API reference

POST /api/jobs/:id/revisions

POST /api/jobs/:id/watch

GET /api/jobs/:id/watch

Diff schema

The structured diff is stored in revision_diff_json on the child job and returned by GET /api/jobs/:id/diff/:previousId.

{
  "from_job_id": 42, "to_job_id": 99,
  "from_revision": 1, "to_revision": 2,
  "members":  { "added": [...], "removed": [...], "changed": [...] },
  "connections": { "changed": [...] },
  "welds":    { "changed": [...] },
  "rc_beams": { "changed": [...] },
  "loads":    [{ "field": "wind_q_p_kPa", "from": 0.6, "to": 0.8 }],
  "materials": [{ "mark": "B01", "from": "S275", "to": "S355" }],
  "geometry":  [{ "mark": "R01", "delta": { "length_mm": { "from": 7000, "to": 7200, "delta": 200 } } }],
  "weight":    { "from_kg": 4200, "to_kg": 4650, "delta_kg": 450, "headline": "4200 kg → 4650 kg (+450 kg)" },
  "compliance": { "newly_failed": [], "newly_passed": [...] },
  "utilization_summary": [...]
}

Notification email

When a revision pipeline completes, FrameAI sends a transactional email to the job owner with:

Studio org members with the Engineer role are CC'd automatically. Owners can unsubscribe via the link in the email footer.