{"openapi":"3.0.3","info":{"title":"Legal Hub Group Partner API","version":"1.0.0","description":"Server-to-server API for LHG partners. Every request except /v1/health is signed with HMAC-SHA256 — see the docs at https://api.legalhubgroup.com/ for the signing recipe and a worked example. Webhook deliveries are signed the same way (LHG-Webhook-Signature over \"<timestamp>.<body>\")."},"servers":[{"url":"https://api.legalhubgroup.com"}],"components":{"securitySchemes":{"hmac":{"type":"apiKey","in":"header","name":"LHG-Signature","description":"HMAC-SHA256 request signing. Canonical string = METHOD\\nPATH\\nTIMESTAMP\\nNONCE\\nSHA256(body) — path includes the query string; the body hash is of the raw bytes (hex of the empty hash, e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855, when there is no body). Timestamp window ±300s; each nonce accepted once."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}},"paths":{"/v1/health":{"get":{"summary":"Connectivity check","description":"Unauthenticated. Proves DNS, TLS and routing work before any signing code is written.","parameters":[],"responses":{"200":{"description":"Service is up","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"ts":{"type":"string","format":"date-time"}}}}}}}}},"/v1/partner":{"get":{"summary":"Who am I","description":"Returns the partner and key configuration the presented credentials resolve to. The first signed call an integration should make.","parameters":[{"name":"LHG-Key-Id","in":"header","required":true,"description":"Your key id, e.g. lhg_sbx_k_…","schema":{"type":"string"}},{"name":"LHG-Timestamp","in":"header","required":true,"description":"Unix seconds at signing time; accepted within ±300s","schema":{"type":"string"}},{"name":"LHG-Nonce","in":"header","required":true,"description":"Unique per request (≤64 chars); a reused nonce is refused","schema":{"type":"string"}},{"name":"LHG-Signature","in":"header","required":true,"description":"Lowercase hex HMAC-SHA256 of the canonical string","schema":{"type":"string"}}],"responses":{"200":{"description":"The authenticated partner","content":{"application/json":{"schema":{"type":"object","properties":{"partner":{"type":"string","example":"Not Your Lawyer"},"environment":{"type":"string","enum":["sandbox","production"]},"key_id":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["efile","serve","concierge"]}},"rate_limit_per_min":{"type":"integer"},"ip_allowlist":{"type":"array","items":{"type":"string"},"description":"CIDRs; empty = unrestricted"}}}}}},"401":{"description":"Authentication failed (unknown_key, revoked_key, invalid_timestamp, invalid_signature, nonce_replayed, …)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Refused (ip_not_allowed, partner_inactive, insufficient_scope)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded — respect Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}}},"security":[{"hmac":[]}]}},"/v1/efile/handoffs":{"post":{"summary":"Start an e-filing handoff","description":"Creates (or matches, by firm.external_ref) the firm and the user, builds a court filing draft pre-filled from this payload, and answers with a ONE-TIME URL onto your branded portal. Your user opens it, is signed in (you are their identity provider), finishes anything the payload could not decide, and submits. The first time a firm arrives it completes E-Filing Setup — court-system registration and a payment method — before the draft opens; every later handoff goes straight to the filing. Status comes back by webhook (see the docs page). Sandbox keys run the identical flow against the courts' test system: sandbox firms are separate from production firms, get no real email and are never charged. Requires the \"efile\" scope.","parameters":[{"name":"LHG-Key-Id","in":"header","required":true,"description":"Your key id, e.g. lhg_sbx_k_…","schema":{"type":"string"}},{"name":"LHG-Timestamp","in":"header","required":true,"description":"Unix seconds at signing time; accepted within ±300s","schema":{"type":"string"}},{"name":"LHG-Nonce","in":"header","required":true,"description":"Unique per request (≤64 chars); a reused nonce is refused","schema":{"type":"string"}},{"name":"LHG-Signature","in":"header","required":true,"description":"Lowercase hex HMAC-SHA256 of the canonical string","schema":{"type":"string"}}],"responses":{"201":{"description":"Handoff minted","content":{"application/json":{"schema":{"type":"object","properties":{"handoff":{"type":"object","properties":{"id":{"type":"string","example":"pho_12"},"url":{"type":"string","description":"One-time URL onto your branded portal; valid 15 minutes, single use. The session it opens lasts 8 hours, so setup or a slow filing is never cut off by the URL's own expiry."},"expires_at":{"type":"string","format":"date-time"}}},"filing_id":{"type":"integer"},"firm":{"type":"string","enum":["created","matched"]},"user":{"type":"string","enum":["created","matched"]},"reopened":{"type":"boolean","description":"Present when filing_ref matched an open draft"},"corrected":{"type":"boolean","description":"Present when filing_ref matched a rejected filing and a corrected draft was cloned"},"warnings":{"type":"array","items":{"type":"string"},"description":"Fields that could not be pre-filled and were left to the filer"}}}}}},"401":{"description":"Authentication failed (unknown_key, revoked_key, invalid_timestamp, invalid_signature, nonce_replayed, …)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Refused (ip_not_allowed, partner_inactive, insufficient_scope)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"filing_ref not reopenable, or user email belongs to another account (filing_not_reopenable, email_in_use, filing_ref_conflict)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Payload invalid (external_ref_required, filing_ref_required, firm_name_required, invalid_user_email, user_name_required, invalid_return_url, document_fetch_failed, too_many_documents, …)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded — respect Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["firm","user","filing_ref","return_url"],"properties":{"firm":{"type":"object","required":["external_ref"],"description":"external_ref is YOUR id for the firm — the same firm matches on every later call. The other fields create the firm the first time that ref is seen and are ignored afterwards.","properties":{"external_ref":{"type":"string","maxLength":120},"name":{"type":"string","description":"Required on first sight of external_ref"},"contact_name":{"type":"string"},"address":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"self_represented":{"type":"boolean","description":"True for a firm filing without an attorney of record"},"attorney":{"type":"object","description":"The attorney of record (skipped, with a warning, unless name and a numeric CA bar number are usable)","properties":{"name":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"bar_number":{"type":"string","description":"California bar number, up to 6 digits"},"email":{"type":"string"},"phone":{"type":"string"}}}}},"user":{"type":"object","required":["email","name"],"description":"The person who will finish and submit the filing. You are their identity provider: the one-time URL signs them in on your branded portal; an account is created on first sight.","properties":{"email":{"type":"string"},"name":{"type":"string"}}},"case":{"type":"object","description":"A case_number means \"file into this existing case\" (the number pre-fills the court's case search; the filer confirms the match). Without one, a new case is opened. category/type are YOUR words, shown to the filer as hints beside the court's own pickers — they are never force-mapped.","properties":{"court_code":{"type":"string","description":"Our court code (see the portal's courts directory). An unrecognised code leaves the court to the filer."},"county":{"type":"string"},"case_number":{"type":"string"},"category":{"type":"string"},"type":{"type":"string"},"description":{"type":"string"}}},"parties":{"type":"array","maxItems":20,"description":"Pre-fills the parties step. role is your wording, shown as a hint; the filer picks the court's own party type.","items":{"type":"object","properties":{"role":{"type":"string"},"type":{"type":"string","enum":["person","organization"]},"first_name":{"type":"string"},"last_name":{"type":"string"},"org_name":{"type":"string"}}}},"documents":{"type":"array","maxItems":20,"description":"PDFs fetched server-side at handoff time (public https URLs, ≤25MB each). To push bytes instead, create the handoff without documents and POST them to /v1/efile/filings/{id}/documents. They attach on the documents step once the filer picks the court-specific filing code and confidentiality.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"title":{"type":"string"},"lead":{"type":"boolean","description":"The lead (main) document; defaults to the first"}}}},"case_ref":{"type":"string","maxLength":120,"description":"Your reference for the case; echoed on reads and webhooks"},"filing_ref":{"type":"string","maxLength":120,"description":"Your reference for this filing. Reusing it reopens the draft, or clones a REJECTED filing into a corrected draft with the court's reason shown; a filing under court review cannot be reopened (409 filing_not_reopenable)."},"return_url":{"type":"string","description":"https URL \"Return to <you>\" sends the filer back to, with lhg_filing, lhg_status and filing_ref appended"}}}}}},"security":[{"hmac":[]}]}},"/v1/efile/filings/{id}/documents":{"post":{"summary":"Upload a document (raw bytes)","description":"The request BODY is the PDF itself (Content-Type: application/pdf, ≤25MB; the signature's body hash covers these bytes). Query parameters: filename, title, lead=1. Allowed only while the filing is a draft. The alternative to document URLs on the handoff. Requires the \"efile\" scope.","parameters":[{"name":"LHG-Key-Id","in":"header","required":true,"description":"Your key id, e.g. lhg_sbx_k_…","schema":{"type":"string"}},{"name":"LHG-Timestamp","in":"header","required":true,"description":"Unix seconds at signing time; accepted within ±300s","schema":{"type":"string"}},{"name":"LHG-Nonce","in":"header","required":true,"description":"Unique per request (≤64 chars); a reused nonce is refused","schema":{"type":"string"}},{"name":"LHG-Signature","in":"header","required":true,"description":"Lowercase hex HMAC-SHA256 of the canonical string","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Our filing id","schema":{"type":"string"}}],"responses":{"201":{"description":"Stored as a pending document","content":{"application/json":{"schema":{"type":"object","properties":{"filing_id":{"type":"integer"},"pending_documents":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Authentication failed (unknown_key, revoked_key, invalid_timestamp, invalid_signature, nonce_replayed, …)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Refused (ip_not_allowed, partner_inactive, insufficient_scope)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"No such filing for this key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Filing is no longer a draft (not_a_draft)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Body missing, too large, or not a PDF","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded — respect Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}}},"security":[{"hmac":[]}]}},"/v1/efile/filings":{"get":{"summary":"List filings","description":"Your filings, newest first — optionally narrowed by ?case_ref= or ?filing_ref= (your own references). Sandbox keys see sandbox filings only; production keys production only. Requires the \"efile\" scope.","parameters":[{"name":"LHG-Key-Id","in":"header","required":true,"description":"Your key id, e.g. lhg_sbx_k_…","schema":{"type":"string"}},{"name":"LHG-Timestamp","in":"header","required":true,"description":"Unix seconds at signing time; accepted within ±300s","schema":{"type":"string"}},{"name":"LHG-Nonce","in":"header","required":true,"description":"Unique per request (≤64 chars); a reused nonce is refused","schema":{"type":"string"}},{"name":"LHG-Signature","in":"header","required":true,"description":"Lowercase hex HMAC-SHA256 of the canonical string","schema":{"type":"string"}}],"responses":{"200":{"description":"Filings","content":{"application/json":{"schema":{"type":"object","properties":{"filings":{"type":"array","items":{"type":"object","properties":{"filing_id":{"type":"integer","description":"Our filing id — the id every other endpoint and webhook uses"},"status":{"type":"string","enum":["draft","submitting","submitted","accepted","rejected","partially_accepted","cancelled","failed","reconciling","not_received"]},"partner_filing_ref":{"type":"string","description":"Your reference for this filing"},"partner_case_ref":{"type":"string","nullable":true,"description":"Your reference for the case"},"court_code":{"type":"string","nullable":true},"case_number":{"type":"string","nullable":true},"court_envelope_number":{"type":"string","nullable":true,"description":"The court system's envelope number, once assigned"},"firm_external_ref":{"type":"string","description":"Your id for the firm"},"fees":{"type":"object","description":"Amounts in integer cents; null until known. court_fees_cents is the court's own quoted total; efiling_service_fee_cents is the e-filing service fee shown to the firm; partner_fee_cents is the per-filing partner fee recorded at submission for your statement.","properties":{"court_fees_cents":{"type":"integer","nullable":true},"breakdown":{"type":"object","nullable":true,"description":"The court's own fee lines, as returned by the court system"},"efiling_service_fee_cents":{"type":"integer","nullable":true},"partner_fee_cents":{"type":"integer","nullable":true}}},"rejection":{"type":"object","nullable":true,"properties":{"code":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true}},"description":"Present on rejected filings: the court's reason"},"documents":{"type":"array","description":"On the detail read and in accepted/status_changed webhooks: filed documents and court-stamped copies, each with a signed download URL valid for 7 days","items":{"type":"object","properties":{"document_id":{"type":"integer"},"role":{"type":"string","enum":["lead","attachment","stamped"],"description":"\"stamped\" is a court-stamped (conformed) copy"},"filename":{"type":"string"},"pages":{"type":"integer","nullable":true},"size_bytes":{"type":"integer","nullable":true},"download_url":{"type":"string","description":"Signed, expiring; needs no request signing — safe to hand to a browser"},"download_url_expires_in_seconds":{"type":"integer"}}}},"created_at":{"type":"string","format":"date-time"},"submitted_at":{"type":"string","format":"date-time","nullable":true},"completed_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"401":{"description":"Authentication failed (unknown_key, revoked_key, invalid_timestamp, invalid_signature, nonce_replayed, …)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Refused (ip_not_allowed, partner_inactive, insufficient_scope)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded — respect Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}}},"security":[{"hmac":[]}]}},"/v1/efile/filings/{id}":{"get":{"summary":"One filing","description":"Full detail: status, court, case number, fees as charged, the court's rejection reason when rejected, and every filed and court-stamped document with a signed download URL. Requires the \"efile\" scope.","parameters":[{"name":"LHG-Key-Id","in":"header","required":true,"description":"Your key id, e.g. lhg_sbx_k_…","schema":{"type":"string"}},{"name":"LHG-Timestamp","in":"header","required":true,"description":"Unix seconds at signing time; accepted within ±300s","schema":{"type":"string"}},{"name":"LHG-Nonce","in":"header","required":true,"description":"Unique per request (≤64 chars); a reused nonce is refused","schema":{"type":"string"}},{"name":"LHG-Signature","in":"header","required":true,"description":"Lowercase hex HMAC-SHA256 of the canonical string","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Our filing id","schema":{"type":"string"}}],"responses":{"200":{"description":"The filing","content":{"application/json":{"schema":{"type":"object","properties":{"filing_id":{"type":"integer","description":"Our filing id — the id every other endpoint and webhook uses"},"status":{"type":"string","enum":["draft","submitting","submitted","accepted","rejected","partially_accepted","cancelled","failed","reconciling","not_received"]},"partner_filing_ref":{"type":"string","description":"Your reference for this filing"},"partner_case_ref":{"type":"string","nullable":true,"description":"Your reference for the case"},"court_code":{"type":"string","nullable":true},"case_number":{"type":"string","nullable":true},"court_envelope_number":{"type":"string","nullable":true,"description":"The court system's envelope number, once assigned"},"firm_external_ref":{"type":"string","description":"Your id for the firm"},"fees":{"type":"object","description":"Amounts in integer cents; null until known. court_fees_cents is the court's own quoted total; efiling_service_fee_cents is the e-filing service fee shown to the firm; partner_fee_cents is the per-filing partner fee recorded at submission for your statement.","properties":{"court_fees_cents":{"type":"integer","nullable":true},"breakdown":{"type":"object","nullable":true,"description":"The court's own fee lines, as returned by the court system"},"efiling_service_fee_cents":{"type":"integer","nullable":true},"partner_fee_cents":{"type":"integer","nullable":true}}},"rejection":{"type":"object","nullable":true,"properties":{"code":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true}},"description":"Present on rejected filings: the court's reason"},"documents":{"type":"array","description":"On the detail read and in accepted/status_changed webhooks: filed documents and court-stamped copies, each with a signed download URL valid for 7 days","items":{"type":"object","properties":{"document_id":{"type":"integer"},"role":{"type":"string","enum":["lead","attachment","stamped"],"description":"\"stamped\" is a court-stamped (conformed) copy"},"filename":{"type":"string"},"pages":{"type":"integer","nullable":true},"size_bytes":{"type":"integer","nullable":true},"download_url":{"type":"string","description":"Signed, expiring; needs no request signing — safe to hand to a browser"},"download_url_expires_in_seconds":{"type":"integer"}}}},"created_at":{"type":"string","format":"date-time"},"submitted_at":{"type":"string","format":"date-time","nullable":true},"completed_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time"}}}}}},"401":{"description":"Authentication failed (unknown_key, revoked_key, invalid_timestamp, invalid_signature, nonce_replayed, …)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Refused (ip_not_allowed, partner_inactive, insufficient_scope)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"No such filing for this key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded — respect Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}}},"security":[{"hmac":[]}]}},"/v1/efile/filings/{id}/documents/{docId}":{"get":{"summary":"Download a document","description":"The PDF bytes. Two ways in: a normally signed request with your key, or the pre-signed URL from a webhook/read payload (?exp=&sig= — no headers needed, hand it to a browser). Requires the \"efile\" scope.","parameters":[{"name":"LHG-Key-Id","in":"header","required":true,"description":"Your key id, e.g. lhg_sbx_k_…","schema":{"type":"string"}},{"name":"LHG-Timestamp","in":"header","required":true,"description":"Unix seconds at signing time; accepted within ±300s","schema":{"type":"string"}},{"name":"LHG-Nonce","in":"header","required":true,"description":"Unique per request (≤64 chars); a reused nonce is refused","schema":{"type":"string"}},{"name":"LHG-Signature","in":"header","required":true,"description":"Lowercase hex HMAC-SHA256 of the canonical string","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Our filing id","schema":{"type":"string"}},{"name":"docId","in":"path","required":true,"description":"The document id","schema":{"type":"string"}}],"responses":{"200":{"description":"The PDF (application/pdf)","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Authentication failed (unknown_key, revoked_key, invalid_timestamp, invalid_signature, nonce_replayed, …)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Refused (ip_not_allowed, partner_inactive, insufficient_scope)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"No such document for this key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded — respect Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. invalid_signature"},"message":{"type":"string","description":"Human-readable explanation"}},"required":["code","message"]}},"required":["error"]}}}}},"security":[{"hmac":[]}]}}}}