Documentation

Documents

Obtenir un document généré

GET/generations/{id}

Un document généré : son Markdown avec les valeurs intégrées, l’URL de sa page et l’état de son PDF.

Paramètres

NomTypeDescription
idobligatoireuuidL’identifiant du document.

Requête

curl https://usepaperclerk.com/api/v1/generations/9b8e2f10-5c4d-4e3f-8a7b-6c5d4e3f2a1b \
  -H "Authorization: Bearer pc_YOUR_TOKEN"

Réponse

JSON
{
  "id": "9b8e2f10-5c4d-4e3f-8a7b-6c5d4e3f2a1b",
  "template_id": "4d1f0c2e-7b3a-4c1e-9d2f-1a2b3c4d5e6f",
  "title": "Invoice — Maple & Fern, September",
  "generation_number": 13,
  "source": "api",
  "source_version": 3,
  "created_at": "2026-09-12T14:02:11.480Z",
  "markdown": "# Invoice — Maple & Fern, September\n\nInvoice INV-0013 for Maple & Fern Ltd. …",
  "html": "<div class=\"doc-page\" …>…</div>",
  "html_truncated": false,
  "url": "https://usepaperclerk.com/app/generated/9b8e2f10-5c4d-4e3f-8a7b-6c5d4e3f2a1b",
  "pdf_status": "pending",
  "pdf_url": "https://usepaperclerk.com/api/v1/generations/9b8e2f10-5c4d-4e3f-8a7b-6c5d4e3f2a1b/pdf"
}