{"openapi":"3.0.3","info":{"title":"fonciq public API","version":"1.0.0","description":"JSON API for lot resolution, stored lot profiles, Registre foncier\npulls, parsed index lines, batches, watches, and the Registre's\nown charges on the organization's connected accounts. Index lines\nalso download as CSV. JSON stays the default.\n\nIndex, acte, and plan pulls use a Registre foncier account the\norganization stored in the Studio dashboard. A live call that\nreturns an index, an acte PDF, or a cadastral plan debits 99 cents\non the Fonciq balance. fq_test_ keys, 4xx/5xx\nresponses, and billing reads debit 0. Registre fees apply at cost when\nthe Registre is consulted (150 cents on estimates), under the Act respecting\nregistry offices (B-9), Schedule I, section 15, Notice of 30 March\n2026. An index always consults the Registre. An acte or a plan\nconsults it only when this call fetches. `GET /v1/billing` returns\nthose Registre charges, not the Fonciq debit. Wallet top-ups go\nthrough Stripe Checkout. fq_test_ keys draw on a separate test\nwallet.\n\nThis file is the machine contract for that API. It is not the public\ndocs site.\n","license":{"name":"Proprietary"}},"servers":[{"url":"https://fonciq.ca","description":"Production origin. `/v1` is served by Studio when routed."}],"security":[{"bearerAuth":[]}],"tags":[{"name":"lots"},{"name":"registre"},{"name":"jobs"},{"name":"batches"},{"name":"watches"},{"name":"billing"},{"name":"platform"},{"name":"free"},{"name":"account"},{"name":"Notifications"}],"paths":{"/v1/lots/resolve":{"get":{"tags":["lots"],"operationId":"resolveLot","summary":"Resolve an address or matricule to lot numbers","description":"Uses the stored cadastre and the MAMH role (RL0103A).\nDoes not log into the Registre foncier and does not debit Fonciq.\n","security":[{"bearerAuth":[]}],"parameters":[{"name":"address","in":"query","schema":{"type":"string"}},{"name":"matricule","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Matching lots. Empty `lots` is a successful miss.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LotResolveResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/lots/{lot}":{"get":{"tags":["lots"],"operationId":"getLot","summary":"Stored lot profile","description":"Cadastre, MAMH assessment, and a summary of the stored index (`registre.index_disponible`). No pull and no index lines. Same lot lookup quota as resolve (free up to 5,000/month; throttled beyond, never billed). To read the lines, order the index; it is free for the organization that pulled or bought it, otherwise the Fonciq fee only.","security":[{"bearerAuth":["lots:read"]}],"parameters":[{"$ref":"#/components/parameters/Lot"},{"$ref":"#/components/parameters/ResultFormat"}],"responses":{"200":{"description":"Profile as JSON. `format=csv` answers `403 index_not_included`:\nindex lines are not part of the free read.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LotProfile"}},"text/csv":{"schema":{"$ref":"#/components/schemas/IndexCsv"}}}},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/v1/registre/requests":{"post":{"tags":["registre"],"operationId":"createRegistreRequest","summary":"Queue an index (and optional actes) on a client Registre account","description":"The Registre searches a modern lot (6-7 digits) by number. A lot from\nbefore the cadastral reform (e.g. `794-39`) is reached through two\ndropdowns first: the circonscription foncière, then the cadastre.\nFonciq learns both on every successful pull and stores them with the\ndocument, so `lot` alone keeps working on any lot the organization has\nalready pulled. A lot never pulled returns a 422\n`ancien_cadastre_resolution_required` with the missing labels in\n`error.details.missing`, and nothing is charged — send\n`circonscription` and `cadastre` once and the pair is remembered.\n","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistreRequest"}}}},"responses":{"202":{"description":"Job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAccepted"}}}},"402":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/actes":{"post":{"tags":["registre"],"operationId":"createActe","summary":"Fetch one deed by inscription and circonscription","description":"Direct call. No prior index request. `registration_number` is\nthe numéro d'inscription. `circonscription` is the circonscription\nfoncière. A reusable PDF is served and the Registre is not\nconsulted. Otherwise the deed is fetched on the organization's\nRegistre account. A live call debits 99 cents. The Registre fee\nis recorded only when a fetch runs. fq_test_\nkeys return fixtures at 0 cents and do not log into the Registre.\n","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActeRequest"}}}},"responses":{"200":{"description":"Stored deed, or a fixture.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActeResponse"}}}},"202":{"description":"Fetch accepted. The PDF is not ready yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActeResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"}}}},"/v1/plans":{"post":{"tags":["registre"],"operationId":"createPlan","summary":"Fetch one cadastral plan by lot","description":"Direct call. No prior index request. `lot` is required.\n`cadastre` defaults to Cadastre du Québec. `plan` selects global,\nrenovation, parcellaire or complementaire. Omit it for the legacy\nglobal pull; send `plan: \"list\"` to receive the free choice list\n(no charge, no document). A reusable PDF is served and the Registre\nis not consulted. A live call debits 99 cents. The Registre fee is\nrecorded only when a fetch runs. fq_test_ keys return fixtures at 0 cents.\n","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequest"}}}},"responses":{"200":{"description":"Stored plan, a fixture, or the free choice list (`plan: \"list\"`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PlanResponse"},{"$ref":"#/components/schemas/PlanChoiceResponse"}]}}}},"202":{"description":"Fetch accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"}}}},"/v1/jobs/{id}":{"get":{"tags":["jobs"],"operationId":"getJob","summary":"Job status, documents, and that account's daily index capacity","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"404":{"$ref":"#/components/responses/Error"}}}},"/v1/jobs/{id}/results":{"get":{"tags":["jobs"],"operationId":"getJobResults","summary":"Parsed index lines for a finished job, JSON or CSV","description":"One index block per lot. A batch job has one block per lot.\nJSON is the default. `format=csv` or `Accept: text/csv` returns\none CSV row per parsed index line. `format` wins if both are\nset. Not the PDF; the PDF stays on `GET /v1/documents/{id}`.\n","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ResultFormat"}],"responses":{"200":{"description":"Index lines","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexResults"}},"text/csv":{"schema":{"$ref":"#/components/schemas/IndexCsv"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/v1/documents/{id}":{"get":{"tags":["jobs"],"operationId":"getDocument","summary":"PDF already produced for this organization's job","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"PDF bytes","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"404":{"$ref":"#/components/responses/Error"}}}},"/v1/documents/{id}/entries":{"get":{"tags":["jobs"],"operationId":"getDocumentEntries","summary":"Parsed lines for one index document","description":"Direct read of the lines stored for this index. Same objects as\na finished job. JSON by default. `format=csv` or\n`Accept: text/csv` returns CSV. 404 when this document is not\nan index produced for the caller.\n","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ResultFormat"}],"responses":{"200":{"description":"Lines for this index","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexBlock"}},"text/csv":{"schema":{"$ref":"#/components/schemas/IndexCsv"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/v1/batches":{"post":{"tags":["batches"],"operationId":"createBatch","summary":"Queue many lots, spread across client accounts unless one is pinned","description":"A lot of the batch may be a pre-reform number (e.g. `794-39`). Those\nneed the circonscription foncière and the cadastre, which Fonciq\nresolves from its search cache for any lot already pulled; otherwise\nsend them with the lot:\n`{ \"lot\": \"794-39\", \"circonscription\": \"Sherbrooke\", \"cadastre\": \"Canton d'Orford\" }`.\nCSV rows may carry `circonscription` and `cadastre` columns too.\n\nThe response returns one `resolutions` entry per lot: `modern`,\n`request`, `cache`, or `unresolved` with the labels still missing. Only\nthe lots that can run are queued and debited — never an unresolved one.\nWhen no lot can run, the call answers 422\n`ancien_cadastre_resolution_required` and nothing is charged.\n","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRequest"}},"text/csv":{"schema":{"type":"string"}}}},"responses":{"202":{"description":"Batch job accepted, with the per-lot resolution report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchAccepted"}}}},"402":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/watches":{"get":{"tags":["watches"],"operationId":"listWatches","summary":"Active watches for the organization","description":"Scope `watches:write`. Lists active and paused watches. Does not\nreturn webhook signing secrets (those are shown once at creation).\nPause, delete, history, and manual resend stay in the Studio dashboard.\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Watches","content":{"application/json":{"schema":{"type":"object","required":["watches"],"properties":{"watches":{"type":"array","items":{"$ref":"#/components/schemas/Watch"}}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["watches"],"operationId":"createWatch","summary":"Watch a lot on a client Registre account","description":"Weekly by default, daily if requested. Index re-checks consume\nthat account's 540/day cap. Registry fees are billed by the\nRegistre to the account, not prepaid by fonciq.\n","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchCreate"}}}},"responses":{"201":{"description":"Watch created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Watch"}}}},"402":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"/v1/me":{"get":{"tags":["account"],"operationId":"getMe","summary":"Who this token or key belongs to","description":"Sign-in email and organisation name for the token or key, so an\nadd-in can show « Connecté en tant que », plus `account_status`: the\nlive Fonciq balance and the Registre account health, with one plain\nFrench sentence and the link that fixes the problem. Free, any scope.\nNo Registre credentials, no secrets. Only detectable problems are\nreported: an expired Registre password or a locked account shows as\n`login_failing`.\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Signed-in identity","content":{"application/json":{"schema":{"type":"object","required":["email","organisation","mode","auth","account_status"],"properties":{"email":{"type":"string","nullable":true,"format":"email"},"organisation":{"type":"object","properties":{"name":{"type":"string","nullable":true}}},"mode":{"type":"string","enum":["test","live"]},"auth":{"type":"string","enum":["oauth","api_key"]},"account_status":{"type":"object","required":["balance_cents","low_balance","rf_status","message_fr","fix_url"],"properties":{"balance_cents":{"type":"integer","description":"Live Fonciq balance in cents."},"low_balance":{"type":"boolean","description":"True under 99 cents (one document)."},"rf_status":{"type":"string","enum":["ok","missing","login_failing","cap_reached","payment_method_required","card_expired","payment_declined","payment_confirmation_required","payment_required","confirmation_required"]},"message_fr":{"type":"string","nullable":true,"description":"One plain French sentence; null when nothing needs fixing."},"fix_url":{"type":"string","nullable":true,"format":"uri","enum":["https://fonciq.ca/compte/solde#facturation","https://fonciq.ca/compte/registre#registre",null]}}}}},"example":{"email":"notaire@example.com","organisation":{"name":"Étude Exemple"},"mode":"live","auth":"oauth","account_status":{"balance_cents":40,"low_balance":true,"rf_status":"ok","message_fr":"Votre solde Fonciq est de 0,40 $, sous le minimum de 0,99 $ requis pour commander un document.","fix_url":"https://fonciq.ca/compte/solde#facturation"}}}}},"401":{"$ref":"#/components/responses/Error"}}}},"/v1/billing":{"get":{"tags":["billing"],"operationId":"getBilling","summary":"Registre foncier statement per connected account","description":"Charges the Registre billed to each of the org's accounts for\nthe period, plus the account statement/balance when the portal\nexposes one. Not Fonciq platform usage (that stays in the Studio\ndashboard). Until a statement page is identified, `source` is\n`estimate` and lines come from Fonciq's pull log. The per-pull\nreceipt `pf_13_01_recpt.asp` is not that statement.\n","security":[{"bearerAuth":[]}],"parameters":[{"name":"rf_account_id","in":"query","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"refresh","in":"query","schema":{"type":"boolean","default":false},"description":"Rebuild the cache now. Does not open an invented portal URL."}],"responses":{"200":{"description":"Registre billing by account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"},"example":{"period":{"start":"2026-10-01T04:00:00Z","end":"2026-11-01T04:00:00Z","timezone":"America/Toronto"},"currency":"CAD","source":"estimate","source_note":"Aucun relevé du portail n’est lu. Les lignes reprennent le journal fonciq des tirages sur ce compte et sont une estimation. Le relevé du Registre foncier fait foi.","refreshed_at":"2026-10-24T18:05:00Z","accounts":[{"id":"rfa_01","label":"Cabinet — défaut","is_default":true,"statement":{"available":false,"balance_cents":null,"as_of":null,"source":"unavailable"},"totals":{"amount_cents":150,"transaction_count":1,"mismatch_count":0}}]}}}}}}},"/v1/billing/usage":{"get":{"tags":["billing"],"operationId":"getBillingUsage","summary":"Registre transactions for the period","description":"One row per consultation of the Registre (or, while `source` is\n`estimate`, one row per consultation Fonciq logged). Includes\ndate, document type, lot, inscription, amount, and the Registre\nreference when the portal provided one. Mismatches against\nFonciq's pull log are listed separately once a portal statement\nexists. An index always consults the Registre.\n","security":[{"bearerAuth":[]}],"parameters":[{"name":"rf_account_id","in":"query","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"refresh","in":"query","schema":{"type":"boolean","default":false}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Registre transactions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingUsage"}}}}}}},"/v1/platform/billing":{"get":{"tags":["platform"],"operationId":"getPlatformBilling","summary":"Fonciq platform wallet and usage","description":"Scope `billing:read`. Prepaid Fonciq platform balance for the\ncaller's test or live mode, this calendar month's platform usage\n(America/Toronto) from the wallet ledger, and the OAuth connection\ndaily cap when applicable. Not Registre foncier fees — those stay\non `GET /v1/billing`. Free read; debits 0.\n","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Platform wallet and usage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformBilling"},"example":{"mode":"test","currency":"CAD","wallet":{"balance_cents":2500,"balance_cad":"25,00 $"},"period":{"start":"2026-10-01T04:00:00Z","end":"2026-11-01T04:00:00Z","timezone":"America/Toronto"},"usage":{"charged_cents":198,"charged_cad":"1,98 $","by_operation":[{"operation":"registre_request","amount_cents":99,"amount_cad":"0,99 $","call_count":1},{"operation":"acte","amount_cents":99,"amount_cad":"0,99 $","call_count":1}]},"daily_cap":null}}}}}}},"/v1/free/zones-inondables":{"get":{"operationId":"getFreeFloodZones","tags":["free"],"summary":"Québec flood zones at a point, address or lot (free, no key)","description":"Gratuit, sans clé. Free, no key. FR : indique si un point, une\nadresse (Référentiel québécois des adresses) ou les points\nd'adresse d'un lot touchent une zone inondable cartographiée parmi\n9 sources ouvertes sous licence CC BY 4.0 (BDZI, grille de présence\npossible, ZIS 2017-2019, Gatineau, Québec, Sherbrooke, Montréal).\nLa limite du lot n'est pas évaluée. Une réponse sans zone se lit\n« Aucune zone trouvée à ce point » : ce n'est pas une attestation\nqu'une propriété est hors zone inondable. EN: tells whether a\npoint, an address or a lot's address points hit a mapped flood\nzone. Lot boundary not evaluated. A no-hit reads \"No zone found at\nthis point\".\n\nExactly one of `lat`+`lon`, `address` or `lot`. Limits: 30\nrequests per minute and 1 000 per 24 h per IP. CORS\n`Access-Control-Allow-Origin: *`. Every 200 carries per-source\nattribution and the disclaimer. Docs:\nhttps://fonciq.ca/api-gratuite/zones-inondables\n","security":[],"parameters":[{"name":"lat","in":"query","required":false,"description":"Latitude WGS84, Québec only (44.9 to 62.6). With `lon`.","schema":{"type":"number","minimum":44.9,"maximum":62.6},"example":45.40527},{"name":"lon","in":"query","required":false,"description":"Longitude WGS84, Québec only (-79.8 to -57.1). With `lat`.","schema":{"type":"number","minimum":-79.8,"maximum":-57.1},"example":-75.87624},{"name":"address","in":"query","required":false,"description":"Civic address, resolved in the Référentiel québécois des adresses (RQA).","schema":{"type":"string","minLength":3,"maxLength":200},"example":"148 rue de la Cédrière, Gatineau"},{"name":"lot","in":"query","required":false,"description":"Cadastre du Québec lot number; spaces ignored. Answered through the lot's RQA address points.","schema":{"type":"string","pattern":"^[0-9 ]{5,12}$"},"example":"2 883 944"},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["fr","en"],"default":"fr"}}],"responses":{"200":{"description":"Answer for each evaluated point.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"},"description":"Always `*`."},"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute (30)."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["any_zone_found","lot_boundary_evaluated","note","coverage_note","cartographie","results","attribution","disclaimer"],"properties":{"api":{"type":"string","example":"fonciq-free-zones-inondables"},"version":{"type":"string","example":"1"},"lang":{"type":"string","enum":["fr","en"]},"query":{"type":"object","additionalProperties":true},"match":{"type":"object","properties":{"type":{"type":"string","enum":["coordinates","address","lot"]},"quality":{"type":"string","enum":["exact","approximate","address_points"]},"other_candidates":{"type":"array","items":{"type":"string"}},"lot":{"type":"string"},"address_points_truncated":{"type":"boolean"}}},"any_zone_found":{"type":"boolean"},"summary_label":{"type":"string","example":"Zone trouvée à ce point"},"lot_boundary_evaluated":{"type":"boolean","enum":[false]},"note":{"type":"string","description":"« Limite du lot non évaluée » / \"Lot boundary not evaluated\"."},"notes":{"type":"object","description":"The lot-boundary note in both languages, whatever `lang` is.","properties":{"fr":{"type":"string"},"en":{"type":"string"}}},"coverage_note":{"type":"string"},"cartographie":{"type":"object","description":"Which mapping generation the sources represent, with the official map to confirm. New-generation maps (in force by sector since March 1, 2026) are not included.","required":["generation_des_sources","nouvelle_generation_incluse","carte_officielle_url"],"properties":{"generation_des_sources":{"type":"string","enum":["ancienne_generation"]},"nouvelle_generation_incluse":{"type":"boolean","enum":[false]},"note":{"type":"string"},"notes":{"type":"object","properties":{"fr":{"type":"string"},"en":{"type":"string"}}},"carte_officielle_url":{"type":"string","format":"uri","example":"https://www.quebec.ca/agriculture-environnement-et-ressources-naturelles/eau/zones-inondables-mobilite-rives-littoral/verifier-propriete"},"carte_interactive_url":{"type":"string","format":"uri","example":"https://zonesinondables.mrnf.gouv.qc.ca/"}}},"historical_note":{"type":"string","description":"Present only when a historical layer (the 2017-2019 ZIS, lifted on March 1, 2022) is found at a point."},"results":{"type":"array","items":{"type":"object","properties":{"point":{"type":"object","properties":{"lat":{"type":"number"},"lon":{"type":"number"},"kind":{"type":"string","enum":["query_coordinates","rqa_address_point"]}}},"address":{"type":"object","nullable":true,"properties":{"rqa_id":{"type":"string"},"address":{"type":"string"},"municipality":{"type":"string","nullable":true},"lot_numbers":{"type":"array","items":{"type":"string"}},"positioning_quality":{"type":"string","nullable":true}}},"zone_found_at_point":{"type":"boolean"},"status":{"type":"string","enum":["zone_found_at_point","no_zone_found_at_point"]},"status_label":{"type":"string","example":"Aucune zone trouvée à ce point"},"fonciq_level":{"type":"string","enum":["eleve","modere","a_verifier","no_known_mapped_zone"],"description":"Fonciq classification, indicative only (not a government class)."},"fonciq_level_label":{"type":"string"},"zones":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","example":"municipal_gat"},"source_name":{"type":"string"},"publisher":{"type":"string"},"category":{"type":"string","enum":["mapped_zone","indicative_grid","observed_flood_2017_2019","reference_layer"]},"category_label":{"type":"string"},"zone_kind":{"type":"string","example":"recurrence_20"},"zone_label":{"type":"string"},"source_zone_type":{"type":"string","nullable":true,"description":"The source's own zone type value."},"dataset_url":{"type":"string","format":"uri"},"licence":{"type":"string","example":"CC-BY-4.0"},"mapping_generation":{"type":"string","enum":["ancienne_generation","indicatif","historique","reference"]},"historical":{"type":"boolean","description":"True for the 2017-2019 ZIS (lifted in 2022); never rated \"eleve\"."}}}},"nearest_zone":{"type":"object","description":"Nearest polygon of any source within 5 000 m; `distance_m` is 0 inside a zone, null when none.","properties":{"distance_m":{"type":"integer","nullable":true},"searched_within_m":{"type":"integer"},"source":{"type":"string"},"zone_kind":{"type":"string"}}},"nearest_mapped_zone":{"type":"object","description":"Same, limited to mapped zones (BDZI, Gatineau, Québec, Sherbrooke).","properties":{"distance_m":{"type":"integer","nullable":true},"searched_within_m":{"type":"integer"},"source":{"type":"string"},"zone_kind":{"type":"string"}}}}}},"data_freshness":{"type":"object","properties":{"oldest_source_checked_at":{"type":"string","format":"date-time","nullable":true},"newest_source_checked_at":{"type":"string","format":"date-time","nullable":true},"oldest_source_loaded_at":{"type":"string","format":"date-time","nullable":true},"newest_source_loaded_at":{"type":"string","format":"date-time","nullable":true}}},"attribution":{"type":"object","properties":{"text":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"dataset_url":{"type":"string","format":"uri"},"licence":{"type":"string","example":"CC-BY-4.0"},"licence_url":{"type":"string","format":"uri"},"checked_at":{"type":"string","format":"date-time","nullable":true},"loaded_at":{"type":"string","format":"date-time","nullable":true}}}}}},"disclaimer":{"type":"string"},"limits":{"type":"object","properties":{"per_minute":{"type":"integer","example":30},"per_day":{"type":"integer","example":1000},"key_required":{"type":"boolean","example":false}}},"docs":{"type":"string","format":"uri"},"terms":{"type":"string","format":"uri"},"request_id":{"type":"string"}}}}}},"400":{"description":"`invalid_query` or `out_of_coverage` (point outside Québec).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"suggestions":{"type":"array","items":{"type":"string"}}}},"disclaimer":{"type":"string"},"docs":{"type":"string"}}}}}},"404":{"description":"`address_not_found` (with `error.suggestions`) or `lot_not_found_in_rqa`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"suggestions":{"type":"array","items":{"type":"string"}}}},"disclaimer":{"type":"string"},"docs":{"type":"string"}}}}}},"429":{"description":"`rate_limited`: 30 per minute or 1 000 per 24 h per IP. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"suggestions":{"type":"array","items":{"type":"string"}}}},"disclaimer":{"type":"string"},"docs":{"type":"string"}}}}}}}}},"/v1/openapi.json":{"get":{"tags":["billing"],"operationId":"getOpenApi","summary":"This document","security":[],"responses":{"200":{"description":"OpenAPI document","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/documents/{id}/link":{"get":{"operationId":"getDocumentLink","summary":"Short-lived signed PDF download link","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"JSON download link"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}}}},"/v1/downloads/{token}":{"get":{"operationId":"getSignedDownload","summary":"Public signed PDF download (attachment)","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"PDF attachment","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Invalid or expired"}},"security":[]}},"/v1/title-watches":{"get":{"tags":["watches"],"operationId":"listTitleWatches","summary":"« Alerte de titre » watches for the organization","description":"Scope `watches:write`. Same `api_watches` rows as the API watch, with `kind=title`, a client email and a weekly or monthly cadence. The first pull becomes the baseline; later pulls raise one alert per new presentation.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Title watches","content":{"application/json":{"schema":{"type":"object","properties":{"watches":{"type":"array","items":{"$ref":"#/components/schemas/TitleWatch"}}},"required":["watches"]}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["watches"],"operationId":"createTitleWatch","summary":"Watch a lot for a client and email them on a new inscription","description":"Scope `watches:write`. One active title watch per lot. Each check is 0,99 $ Fonciq plus the Registre’s 1,50 $ on the firm account. The first pull is the baseline; an unreadable or shrinking index goes to review, never to the client.","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TitleWatchCreate"}}}},"responses":{"201":{"description":"Title watch created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TitleWatch"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"/v1/title-watches/{id}":{"get":{"tags":["watches"],"operationId":"getTitleWatch","summary":"One title watch with its last snapshots and alerts","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Title watch","content":{"application/json":{"schema":{"type":"object","properties":{"watch":{"$ref":"#/components/schemas/TitleWatch"},"snapshots":{"type":"array","items":{"$ref":"#/components/schemas/TitleWatchSnapshot"}},"alerts":{"type":"array","items":{"$ref":"#/components/schemas/TitleAlert"}}},"required":["watch","snapshots","alerts"]}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["watches"],"operationId":"stopTitleWatch","summary":"Stop a title watch","description":"Soft-deletes the watch (status paused, deleted_at set). History stays readable.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stopped","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["cancelled"]}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/v1/title-alerts":{"get":{"tags":["watches"],"operationId":"listTitleAlerts","summary":"Alerts for one title watch","security":[{"bearerAuth":[]}],"parameters":[{"name":"watch_id","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Alerts","content":{"application/json":{"schema":{"type":"object","properties":{"alerts":{"type":"array","items":{"$ref":"#/components/schemas/TitleAlert"}}},"required":["alerts"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/v1/title-alerts/{id}/mark-normal":{"post":{"tags":["watches"],"operationId":"markTitleAlertNormal","summary":"Close an alert as normal, keeping the history","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Marked normal","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["normal"]}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/v1/webhook-endpoints":{"get":{"operationId":"listWebhookEndpoints","tags":["Notifications"],"summary":"Lister les points de terminaison","description":"Portée `watches:write`. Le secret n'est jamais renvoyé, seulement son indice. Ne débite rien.\n","responses":{"200":{"description":"Points de terminaison actifs.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["endpoints","events"],"properties":{"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"events":{"type":"array","items":{"type":"string"}},"signature":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createWebhookEndpoint","tags":["Notifications"],"summary":"Enregistrer un point de terminaison","description":"Portée `watches:write`. `Idempotency-Key` obligatoire. Un POST signé part dès qu'un document est prêt (`document.ready`) ou échoue (`document.failed`), pour tous les types de documents et toutes les voies (clé API, MCP, Studio, lot groupé). Un document servi du cache ne produit aucun événement. Le secret n'est renvoyé qu'une fois.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreate"}}}},"responses":{"201":{"description":"Point de terminaison créé.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreated"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}]}},"/v1/webhook-endpoints/{id}":{"delete":{"operationId":"revokeWebhookEndpoint","tags":["Notifications"],"summary":"Révoquer un point de terminaison","description":"Portée `watches:write`. Les livraisons en attente cessent.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Révoqué.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["id","revoked"],"properties":{"id":{"type":"string"},"revoked":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/webhook-endpoints/{id}/deliveries":{"get":{"operationId":"listWebhookDeliveries","tags":["Notifications"],"summary":"Journal des livraisons","description":"Portée `watches:write`. Vingt dernières tentatives : type, état, tentatives, réponse HTTP, prochaine tentative. Ne débite rien.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Livraisons récentes.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["deliveries"],"properties":{"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"fq_test_","description":"OAuth access token or Fonciq API key. Scopes (lots:read, registre:write, batches:write, watches:write, jobs:read, billing:read) are checked by the server and returned as a 403; OpenAPI 3.0.3 does not attach them to an http bearer scheme."}},"parameters":{"Lot":{"name":"lot","in":"path","required":true,"schema":{"type":"string"},"description":"Lot number, whitespace ignored."},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}},"ResultFormat":{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json","csv"],"default":"json"},"description":"`csv` or `Accept: text/csv` selects CSV. `json` is the default.\nThe query wins when both are set. Any other value is 400.\n"}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"Unauthorized":{"description":"Missing or rejected bearer (RFC 6750).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"RateLimited":{"description":"Too many requests for this key or IP.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"InvalidRequest":{"description":"The request body or query is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"NotFound":{"description":"The resource does not exist for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"schemas":{"ErrorEnvelope":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","enum":["insufficient_balance","org_cap","member_cap","connection_cap","unauthorized","forbidden","not_found","invalid_body","idempotency_key_required","idempotency_conflict","rate_limited","rf_account_required","rf_account_not_found","rf_account_revoked","rf_account_unhealthy","watch_cap_reached","batch_too_large","ancien_cadastre_resolution_required"]},"message":{"type":"string"},"request_id":{"type":"string"},"details":{"type":"object","additionalProperties":true,"description":"Machine-readable detail for this error code, when the code has one."}}}}},"LotResolveResponse":{"type":"object","required":["lots"],"properties":{"lots":{"type":"array","items":{"type":"object","required":["lot","corroboration"],"properties":{"lot":{"type":"string"},"cadastre":{"type":"string"},"matricule":{"type":"string","nullable":true},"property_id":{"type":"integer","nullable":true},"corroboration":{"type":"object","required":["cadastre","role","matched"],"properties":{"cadastre":{"type":"string","description":"infolot when the polygon comes from Infolot"},"role":{"type":"string","example":"RL0103A"},"matched":{"type":"boolean"}}}}}}}},"LotProfile":{"type":"object","required":["lot"],"properties":{"lot":{"type":"string"},"cadastre":{"type":"object","properties":{"cadastre":{"type":"string"},"lot_number":{"type":"string"},"geom_source":{"type":"string","nullable":true}}},"assessment":{"type":"object","nullable":true,"properties":{"role_year":{"type":"integer","nullable":true},"matricule":{"type":"string","nullable":true},"valeur_totale_cents":{"type":"integer","nullable":true}}},"registre":{"type":"object","properties":{"index_status":{"type":"string","nullable":true},"stored":{"type":"boolean","description":"True when the profile serves a stored index."},"document_id":{"type":"string","description":"The stored index document."},"stored_at":{"type":"string","format":"date","nullable":true},"warning":{"type":"string","nullable":true,"description":"Freshness warning for a stored index of a modern lot. Absent for a\npre-reform lot, whose index is an archived object.\n"},"billing_cents":{"type":"integer","description":"0 for a stored index."},"registry_fee_cents":{"type":"integer","description":"0 for a stored index."},"index_disponible":{"type":"object","nullable":true,"description":"A stored index exists for this lot. `date` is the day it was\npulled. `prix.fonciq_cents` is 0 when this organization pulled\nor bought it (`proprietaire: true`), otherwise the Fonciq fee;\n`prix.registre_fee_cents` is always 0 (a stored copy never calls\nthe Registre). Lines are read with `POST /v1/registre/requests`.\n","properties":{"date":{"type":"string","format":"date","nullable":true},"proprietaire":{"type":"boolean"},"prix":{"type":"object","properties":{"fonciq_cents":{"type":"integer"},"registre_fee_cents":{"type":"integer","enum":[0]}}}}}}},"map":{"type":"object","nullable":true,"description":"Fiche polygon for this lot: `url` (the map page with its legend),\n`polygon` (GeoJSON), `polygon_area_m2` and `polygon_source`.\n"}}},"ActeRequest":{"type":"object","required":["registration_number","circonscription"],"properties":{"registration_number":{"type":"string","description":"Numéro d'inscription.","example":"14 736 430"},"circonscription":{"type":"string","description":"Circonscription foncière.","example":"Montréal"},"rf_account_id":{"type":"string"}}},"ActeResponse":{"type":"object","required":["document_type","registration_number","circonscription","source","billing_cents","registry_fee_cents","pdf_url"],"properties":{"document_type":{"type":"string","enum":["acte"]},"registration_number":{"type":"string"},"circonscription":{"type":"string"},"lots":{"type":"array","items":{"type":"string"},"description":"Present when a stored index row has lot numbers."},"source":{"type":"string","enum":["stored","fetched"]},"billing_cents":{"type":"integer","description":"Fonciq cents for this call. 0 on a test key, 99 on a live PDF."},"registry_fee_cents":{"type":"integer","description":"150 when this call fetches, otherwise 0."},"pdf_url":{"type":"string"},"download_url":{"type":"string","format":"uri"},"download_url_expires_at":{"type":"string","format":"date-time"},"filename":{"type":"string"}}},"PlanChoiceOption":{"type":"object","required":["plan","label","up_to_date","description"],"properties":{"plan":{"type":"string","enum":["global","renovation","parcellaire","complementaire"]},"label":{"type":"string"},"plan_number":{"type":"string","nullable":true},"mise_en_vigueur":{"type":"string","nullable":true},"up_to_date":{"type":"boolean"},"description":{"type":"string"},"stored":{"type":"boolean","description":"A ready PDF already belongs to this organisation: serving it is free."},"stored_at":{"type":"string","nullable":true},"document_id":{"type":"string"},"billing_cents":{"type":"integer"},"registry_fee_cents":{"type":"integer"}}},"PlanChoiceResponse":{"type":"object","description":"`plan: \"list\"` (or `options_only: true`): the plans this lot has, priced, with nothing charged.","required":["document_type","lot","cadastre","requires_choice","plans","billing_cents","registry_fee_cents","message"],"properties":{"document_type":{"type":"string","enum":["plan_choice"]},"lot":{"type":"string"},"cadastre":{"type":"string"},"requires_choice":{"type":"boolean","enum":[true]},"plans":{"type":"array","items":{"$ref":"#/components/schemas/PlanChoiceOption"}},"billing_cents":{"type":"integer"},"registry_fee_cents":{"type":"integer"},"message":{"type":"string"}}},"PlanRequest":{"type":"object","required":["lot"],"properties":{"lot":{"type":"string","example":"1234567"},"cadastre":{"type":"string","description":"Defaults to Cadastre du Québec."},"rf_account_id":{"type":"string"},"plan":{"type":"string","enum":["global","renovation","parcellaire","complementaire","list"],"description":"Plan product to pull. Omit for the legacy global plan; `list` returns the free choice list and charges nothing."}}},"PlanResponse":{"type":"object","required":["document_type","lot","lots","cadastre","source","billing_cents","registry_fee_cents","pdf_url"],"properties":{"document_type":{"type":"string","enum":["plan"]},"lot":{"type":"string"},"lots":{"type":"array","items":{"type":"string"}},"cadastre":{"type":"string"},"plan":{"type":"string","enum":["global","renovation","parcellaire","complementaire"]},"plan_label":{"type":"string"},"map":{"type":"object","description":"The lot polygon from the fiche and the public map that renders it. Compare the plan PDF with this polygon.","properties":{"property_id":{"type":"integer"},"url":{"type":"string","format":"uri"},"polygon_url":{"type":"string","format":"uri"},"polygon":{"type":"object","nullable":true,"description":"GeoJSON geometry from rf_lots.geom (Infolot or historical plan)."},"polygon_source":{"type":"string","nullable":true},"polygon_area_m2":{"type":"number","nullable":true},"polygon_status":{"type":"string","nullable":true},"note":{"type":"string"}}},"source":{"type":"string","enum":["stored","fetched"]},"billing_cents":{"type":"integer"},"registry_fee_cents":{"type":"integer"},"pdf_url":{"type":"string"},"download_url":{"type":"string","format":"uri"},"download_url_expires_at":{"type":"string","format":"date-time"},"filename":{"type":"string"}}},"RegistreRequest":{"type":"object","required":["lot"],"properties":{"lot":{"type":"string"},"documents":{"type":"array","items":{"type":"string","enum":["index","actes"]},"default":["index"]},"rf_account_id":{"type":"string","description":"Omit to use the organization's default account."},"circonscription":{"type":"string","description":"Circonscription foncière of a lot from before the cadastral reform (e.g. « Joliette »). Optional: resolved from the search cache when the organization has already pulled this lot."},"cadastre":{"type":"string","description":"Cadastre name of that pre-reform lot (e.g. « Canton de Tracy »). Optional, resolved the same way as `circonscription`."}}},"BatchRequest":{"type":"object","required":["lots"],"properties":{"lots":{"type":"array","maxItems":500,"items":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/BatchLotEntry"}]}},"documents":{"type":"array","items":{"type":"string","enum":["index","actes"]}},"rf_account_id":{"type":"string","description":"When set, every lot uses this account. When omitted, the\nscheduler spreads lots across active accounts.\n"},"documents_confirmed":{"type":"integer","minimum":1,"maximum":500,"description":"Nombre de documents acceptés par la personne ; doit égaler le nombre de lots distincts."},"dry_run":{"type":"boolean","description":"Préflight : résout et chiffre sans facturer ni créer de tâche."}}},"BatchLotEntry":{"type":"object","required":["lot"],"properties":{"lot":{"type":"string"},"circonscription":{"type":"string","description":"Circonscription foncière of a pre-reform lot. Optional: resolved from the search cache when the lot has already been pulled."},"cadastre":{"type":"string","description":"Cadastre name of that pre-reform lot. Optional, resolved the same way as `circonscription`."}}},"BatchResolution":{"type":"object","required":["lot","source"],"properties":{"lot":{"type":"string"},"circonscription":{"type":"string","nullable":true},"cadastre":{"type":"string","nullable":true},"search_label":{"type":"string","nullable":true,"description":"What Fonciq types into the Registre search box, when it differs from the printed lot (« 50B-4 Rang 1 » for « 50B-4 »)."},"source":{"type":"string","enum":["modern","request","cache","unresolved"],"description":"`modern` searched by number; `request` the caller sent the pair; `cache` resolved from a lot already pulled; `unresolved` will not run (and is not charged)."},"missing":{"type":"array","items":{"type":"string"}}}},"BatchAccepted":{"type":"object","required":["job_id"],"properties":{"job_id":{"type":"string"},"resolutions":{"type":"array","items":{"$ref":"#/components/schemas/BatchResolution"}}}},"JobAccepted":{"type":"object","required":["job_id"],"properties":{"job_id":{"type":"string"}}},"AccountCapacity":{"type":"object","required":["cap","used_today","watch_used_today","on_demand_used_today","watch_budget_remaining","resets_at"],"properties":{"cap":{"type":"integer","example":540},"used_today":{"type":"integer"},"watch_used_today":{"type":"integer"},"on_demand_used_today":{"type":"integer"},"watch_budget_remaining":{"type":"integer"},"resets_at":{"type":"string","format":"date-time"}}},"RfAccountRef":{"type":"object","required":["id","label"],"properties":{"id":{"type":"string"},"label":{"type":"string"},"capacity":{"$ref":"#/components/schemas/AccountCapacity"}}},"JobDocument":{"type":"object","additionalProperties":false,"required":["id","type","url","lot","kind","document_url","registry_fee_cents"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["index","acte","plan"]},"url":{"type":"string"},"lot":{"type":"string"},"kind":{"type":"string","enum":["index","acte"]},"document_url":{"type":"string","nullable":true},"registry_fee_cents":{"type":"integer","description":"Journaled Registre fee in CAD cents, or 0 when this job\ndocument does not carry it. GET /v1/billing has the log.\n"},"download_url":{"type":"string","format":"uri"},"download_url_expires_at":{"type":"string","format":"date-time"},"filename":{"type":"string"}}},"JobCapacity":{"type":"object","additionalProperties":false,"required":["account_id","cap","on_demand_reserve","used_today","watch_budget_remaining","resets_at"],"properties":{"account_id":{"type":"string"},"cap":{"type":"integer","example":540},"on_demand_reserve":{"type":"integer","example":180},"used_today":{"type":"integer"},"watch_budget_remaining":{"type":"integer"},"resets_at":{"type":"string","format":"date-time"}}},"Job":{"type":"object","additionalProperties":false,"required":["id","status","kind","lot","error_code","result","documents","capacity"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","capacity_wait","running","succeeded","failed","cancelled"]},"kind":{"type":"string","enum":["registre","batch"]},"lot":{"type":"string","nullable":true},"error_code":{"type":"string","nullable":true,"description":"Null until the job fails. `registre_payment_method_required` means\nthe Registre sent the credit-card profile page before billing.\n`rf_confirmation_required` means the portal showed « Confirmer la\ndemande » and the account has not authorized Fonciq to click\nConfirmer. No Registre fee is billed for those. Other pull failures\nuse `pull_failed`. A login failure uses `rf_account_unhealthy`.\n"},"error_message_fr":{"type":"string","nullable":true,"description":"French explanation when `error_code` is set; null otherwise."},"error_message_en":{"type":"string","nullable":true,"description":"English explanation when `error_code` is set; null otherwise."},"rf_account":{"description":"Present when the job runs on one of the organization's Registre accounts. Absent for an fq_test_ job with no account.","allOf":[{"$ref":"#/components/schemas/RfAccountRef"}]},"result":{"type":"object","nullable":true,"description":"Null until an index parse is stored. `index` for one lot.\n`indexes` for a batch (one block per lot).\n","properties":{"index":{"$ref":"#/components/schemas/IndexBlock"},"indexes":{"type":"array","items":{"$ref":"#/components/schemas/IndexBlock"}}}},"documents":{"type":"array","items":{"$ref":"#/components/schemas/JobDocument"}},"capacity":{"type":"array","items":{"$ref":"#/components/schemas/JobCapacity"},"description":"Today's capacity per Registre account the job touches; each item carries resets_at. Empty when no Registre account is attached."},"batch":{"type":"object","nullable":true,"description":"Résumé d'un lot groupé : ordered, succeeded, failed, refunded_cents."}}},"IndexCsv":{"type":"string","description":"RFC 4180. Header, in order:\nlot,matricule,inscription,date,nature,parties,document_url,read_method,confidence,needs_review,page_status.\nOne row per parsed index line. `confidence` is unscored.\n`read_method` and `page_status` are empty until those readers\nexist. Parsed lines only while unparsed_retained is false.\nThe PDF remains the source of truth when the line list is empty.\n"},"IndexParse":{"type":"object","required":["confidence"],"properties":{"confidence":{"type":"string","enum":["unscored"],"description":"Available. The literal unscored. The parser does not score\na line. Not a percentage. A numeric score is planned and\nmust not be expressed as a percentage in this document.\n"}}},"IndexParty":{"type":"object","required":["name"],"properties":{"role":{"type":"string","description":"Available when the role is in the parser's quality list."},"name":{"type":"string"}}},"IndexRadiation":{"type":"object","properties":{"inscription":{"type":"string","nullable":true},"mention":{"type":"string","nullable":true,"description":"Parser mention_indicator, such as T, P, or R."},"raw_text":{"type":"string","nullable":true}}},"IndexLine":{"type":"object","required":["source_document_id","position","inscription","confidence","needs_review"],"properties":{"lot":{"type":"string","description":"Available from the pull, not from the row parser."},"source_document_id":{"type":"string"},"position":{"type":"integer"},"inscription":{"type":"string"},"presentation_date":{"type":"string","nullable":true,"description":"YYYY-MM-DD from the parser."},"indexed_at":{"type":"string","format":"date-time","nullable":true,"description":"UTC instant Fonciq first stored this inscription on the lot profile, across the indexes the organization can read. An old inscription read by a recent index has a recent indexed_at. Use it as the cursor for new-entry triggers. Null on lines stored before this field."},"nature":{"type":"string","nullable":true},"parties":{"type":"array","items":{"$ref":"#/components/schemas/IndexParty"}},"remarks":{"type":"string","nullable":true,"description":"Remarques cell (parser field consideration)."},"radiations":{"type":"array","items":{"$ref":"#/components/schemas/IndexRadiation"}},"seqnt_prodt":{"type":"string","nullable":true},"portal_href":{"type":"string","nullable":true,"description":"Portal href the parser stored. Not the Fonciq PDF URL."},"raw_text":{"type":"string","nullable":true,"description":"Parser clips this to 500 characters."},"read_method":{"type":"string","nullable":true,"enum":["text_layer","ocr_print","handwriting",null],"description":"Planned. Null today. The HTML parser does not record\ntext_layer, ocr_print, or handwriting. Do not guess one.\n"},"confidence":{"type":"string","enum":["unscored"],"description":"Available as the literal unscored. Not a percentage.\n"},"needs_review":{"type":"boolean","nullable":true,"description":"Null on a parsed line. No review threshold is documented.\nTrue on an unparsed line once those lines are retained.\n"},"nature_full":{"type":"string","nullable":true,"description":"Full PDF wording of the nature when it can be recovered."},"circonscription":{"type":"string","nullable":true},"avis_adresse":{"type":"string","nullable":true,"description":"Printed avis d'adresse number when known. Not a Registre link."}}},"IndexUnparsedLine":{"type":"object","description":"Planned. The contract requires these rows. Omitted from\nresponses while unparsed_retained is false, because the parser\nstill drops them.\n","required":["reason","raw_text","needs_review"],"properties":{"position":{"type":"integer"},"page":{"type":"integer","nullable":true,"description":"Planned. The parser has no page number. Null until one is recorded."},"raw_text":{"type":"string"},"reason":{"type":"string","enum":["no_acte_link","missing_date_or_inscription"]},"needs_review":{"type":"boolean","description":"Always true. The row was not turned into a line."}}},"IndexPage":{"type":"object","description":"Planned. Omitted until a reader classifies pages. An unreadable\npage has no invented lines.\n","required":["status"],"properties":{"page":{"type":"integer","nullable":true},"status":{"type":"string","enum":["parsed","partial","unreadable"]},"needs_review":{"type":"boolean"}}},"IndexBlock":{"type":"object","required":["source_document_id","pdf_url","parse","unparsed_retained","entries"],"description":"pdf_url is always set when a PDF was produced. It is the source\nof truth whether or not entries is empty.\n","properties":{"lot":{"type":"string"},"source_document_id":{"type":"string"},"pdf_url":{"type":"string","format":"uri"},"entries_url":{"type":"string","format":"uri"},"parse":{"$ref":"#/components/schemas/IndexParse"},"pages":{"type":"array","description":"Planned. Omit until pages are classified.","items":{"$ref":"#/components/schemas/IndexPage"}},"unparsed_retained":{"type":"boolean","description":"False today. The parser drops rows it cannot turn into an\nIndexEntry. Do not send an empty unparsed array while this\nis false.\n"},"unparsed":{"type":"array","description":"Planned. Present only when unparsed_retained is true.","items":{"$ref":"#/components/schemas/IndexUnparsedLine"}},"entries":{"type":"array","items":{"$ref":"#/components/schemas/IndexLine"}},"circonscription":{"type":"string","nullable":true},"header":{"$ref":"#/components/schemas/IndexHeader"},"download_url":{"type":"string","format":"uri"},"download_url_expires_at":{"type":"string","format":"date-time"},"filename":{"type":"string"},"stored":{"type":"boolean","description":"True when the stored PDF is served as is: the Registre is not consulted and nothing is charged."},"stored_at":{"type":"string","nullable":true,"format":"date","description":"Date of the stored pull, when stored is true."},"warning":{"type":"string","nullable":true,"description":"Freshness warning, stored index only: the rights may have changed since the pull. A plan, a deed and a pre-reform index never change."},"billing_cents":{"type":"integer","description":"0 for a stored document."},"registry_fee_cents":{"type":"integer","description":"0 for a stored document."},"map":{"type":"object","nullable":true,"description":"Fiche polygon for this lot: `url` (the map page with its legend), `polygon` (GeoJSON), `polygon_area_m2` and `polygon_source`."}}},"IndexResults":{"type":"object","required":["indexes"],"properties":{"indexes":{"type":"array","items":{"$ref":"#/components/schemas/IndexBlock"}},"documents":{"type":"array","items":{"type":"object","required":["id","type","url"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["index","acte"]},"url":{"type":"string","format":"uri"}}}}}},"WatchCreate":{"type":"object","required":["lot","url"],"properties":{"lot":{"type":"string"},"cadence":{"type":"string","enum":["weekly","daily"],"default":"weekly"},"url":{"type":"string","format":"uri"},"rf_account_id":{"type":"string"}}},"Watch":{"type":"object","required":["id","lot","cadence","status","rf_account","webhook_endpoint_id","next_check_at"],"properties":{"id":{"type":"string","description":"wch_ identifier."},"lot":{"type":"string"},"cadence":{"type":"string","enum":["weekly","daily"]},"status":{"type":"string","enum":["active","paused"]},"rf_account":{"description":"Registre account whose daily capacity the watch consumes, with today's capacity (capacity.resets_at). An fq_test_ key returns the example account.","allOf":[{"$ref":"#/components/schemas/RfAccountRef"}]},"webhook_endpoint_id":{"type":"string","nullable":true},"next_check_at":{"type":"string","format":"date-time","nullable":true,"description":"Next scheduled re-check, UTC."},"secret":{"type":"string","description":"whsec_ signing secret. Returned once, in the 201 create response. Not in the list."}},"description":"Watch as the API returns it. The callback URL is not returned; webhook_endpoint_id names the endpoint created for it."},"BillingPeriod":{"type":"object","required":["start","end","timezone"],"properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"timezone":{"type":"string","example":"America/Toronto"}}},"BillingSource":{"type":"string","enum":["registre","estimate"],"description":"`registre` when rows were read from the portal statement or\ntransaction history. `estimate` when they are Fonciq's pull log\nbecause that page is not known.\n"},"RfStatement":{"type":"object","required":["available","source"],"properties":{"available":{"type":"boolean"},"balance_cents":{"type":"integer","nullable":true,"description":"As the Registre shows it. Null when unavailable. Not derived from a published Registre tariff quote."},"as_of":{"type":"string","format":"date-time","nullable":true},"source":{"type":"string","enum":["registre","unavailable"]}}},"RfTransaction":{"type":"object","required":["id","rf_account_id","at","document_type","amount_cents","source","reconciliation"],"properties":{"id":{"type":"string"},"rf_account_id":{"type":"string"},"at":{"type":"string","format":"date-time"},"document_type":{"type":"string","description":"Portal label when source is registre. Known pull types are index, acte, and plan."},"lot":{"type":"string","nullable":true},"inscription":{"type":"string","nullable":true},"amount_cents":{"type":"integer"},"rf_reference":{"type":"string","nullable":true,"description":"The Registre's own transaction reference. Null on an estimate."},"source":{"$ref":"#/components/schemas/BillingSource"},"reconciliation":{"type":"string","enum":["matched","portal_only","log_only"]},"fonciq_request_id":{"type":"string","nullable":true},"fonciq_job_id":{"type":"string","nullable":true}}},"Billing":{"type":"object","required":["period","currency","source","source_note","accounts"],"properties":{"period":{"$ref":"#/components/schemas/BillingPeriod"},"currency":{"type":"string","enum":["CAD"]},"source":{"$ref":"#/components/schemas/BillingSource"},"source_note":{"type":"string"},"refreshed_at":{"type":"string","format":"date-time","nullable":true},"accounts":{"type":"array","items":{"type":"object","required":["id","label","is_default","statement","totals"],"properties":{"id":{"type":"string"},"label":{"type":"string"},"is_default":{"type":"boolean"},"statement":{"$ref":"#/components/schemas/RfStatement"},"totals":{"type":"object","required":["amount_cents","transaction_count","mismatch_count"],"properties":{"amount_cents":{"type":"integer"},"transaction_count":{"type":"integer"},"mismatch_count":{"type":"integer"}}}}}}}},"BillingUsage":{"type":"object","required":["period","currency","source","source_note","transactions","mismatches"],"properties":{"period":{"$ref":"#/components/schemas/BillingPeriod"},"currency":{"type":"string","enum":["CAD"]},"source":{"$ref":"#/components/schemas/BillingSource"},"source_note":{"type":"string"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/RfTransaction"}},"mismatches":{"type":"array","items":{"$ref":"#/components/schemas/RfTransaction"}},"next_cursor":{"type":"string","nullable":true}}},"PlatformBilling":{"type":"object","required":["mode","currency","wallet","period","usage","daily_cap"],"properties":{"mode":{"type":"string","enum":["test","live"]},"currency":{"type":"string","enum":["CAD"]},"wallet":{"type":"object","required":["balance_cents","balance_cad"],"properties":{"balance_cents":{"type":"integer"},"balance_cad":{"type":"string"}}},"period":{"$ref":"#/components/schemas/BillingPeriod"},"usage":{"type":"object","required":["charged_cents","charged_cad","by_operation"],"properties":{"charged_cents":{"type":"integer"},"charged_cad":{"type":"string"},"by_operation":{"type":"array","items":{"type":"object","required":["operation","amount_cents","amount_cad","call_count"],"properties":{"operation":{"type":"string"},"amount_cents":{"type":"integer"},"amount_cad":{"type":"string"},"call_count":{"type":"integer"}}}}}},"daily_cap":{"type":"object","required":["cap_cents","spent_today_cents","day","timezone"],"properties":{"cap_cents":{"type":"integer","nullable":true},"spent_today_cents":{"type":"integer"},"day":{"type":"string","format":"date"},"timezone":{"type":"string","enum":["America/Toronto"]}},"nullable":true}}},"IndexHeader":{"type":"object","properties":{"circonscription":{"type":"string","nullable":true},"cadastre":{"type":"string","nullable":true},"lot_full":{"type":"string","nullable":true},"etablissement":{"type":"string","nullable":true},"etablissement_note":{"type":"string","nullable":true},"droits_maj_at":{"type":"string","nullable":true},"radiations_maj_at":{"type":"string","nullable":true},"concordance_text":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"status_note":{"type":"string","nullable":true},"plans":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"}}}}}},"TitleWatchCreate":{"type":"object","properties":{"lot":{"type":"string","description":"Printed lot; spaces are removed."},"client_name":{"type":"string"},"client_email":{"type":"string","format":"email"},"client_phone":{"type":"string","description":"Optional; the first alert is also sent by text."},"cadence":{"type":"string","enum":["weekly","monthly"],"default":"monthly"},"plan":{"type":"string","enum":["firm","partner"],"default":"firm","description":"New watches are firm or partner. The read model also returns legacy owner_* rows."},"copy_email":{"type":"string","format":"email","description":"Notary copy of every alert. The firm UI defaults it to the signed-in person."},"notary_name":{"type":"string"},"notary_phone":{"type":"string"},"rf_account_id":{"type":"string"}},"required":["lot","client_name","client_email"]},"TitleWatch":{"type":"object","properties":{"id":{"type":"string","description":"wch_ identifier, shared with the watch engine."},"kind":{"type":"string","enum":["title"]},"lot":{"type":"string"},"cadence":{"type":"string","enum":["weekly","monthly"]},"status":{"type":"string","enum":["active","paused"]},"plan":{"type":"string","enum":["firm","owner_monthly","owner_weekly","partner"],"description":"firm and partner are chosen today; owner_monthly and owner_weekly are legacy alert plans still returned for old rows."},"client":{"type":"object","properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true}}},"notary":{"type":"object","properties":{"name":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"copy_email":{"type":"string","nullable":true}}},"rf_account_id":{"type":"string","nullable":true},"fonciq_cents":{"type":"integer","description":"0,99 $ per check (99). The Registre’s 1,50 $ is separate."},"started_at":{"type":"string","format":"date-time","nullable":true},"last_check_at":{"type":"string","format":"date-time","nullable":true},"last_alert_at":{"type":"string","format":"date-time","nullable":true},"next_check_at":{"type":"string","format":"date-time","nullable":true}},"required":["id","kind","lot","cadence","status","client","next_check_at"]},"TitleWatchSnapshot":{"type":"object","properties":{"id":{"type":"string"},"publicId":{"type":"string","description":"snap_ identifier."},"kind":{"type":"string","enum":["baseline","check"]},"status":{"type":"string","enum":["ready","review"]},"takenAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","format":"date-time","nullable":true},"entryCount":{"type":"integer"},"entries":{"type":"array","items":{"type":"object"}},"reviewReason":{"type":"string","nullable":true},"costCents":{"type":"integer"}}},"TitleAlert":{"type":"object","properties":{"id":{"type":"string"},"publicId":{"type":"string","description":"al_ identifier."},"code":{"type":"string","description":"Short code used in fonciq.ca/a/{code}."},"presentationNo":{"type":"string"},"presentedAt":{"type":"string","nullable":true},"nature":{"type":"string","nullable":true},"parties":{"type":"array","items":{"type":"object"}},"status":{"type":"string","enum":["new","normal","acted"]},"firstSeenAt":{"type":"string","format":"date-time"},"sentEmailAt":{"type":"string","format":"date-time","nullable":true},"sentSmsAt":{"type":"string","format":"date-time","nullable":true}}},"WebhookEndpoint":{"type":"object","additionalProperties":false,"required":["id","url","secret_hint","created_at"],"properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"secret_hint":{"type":"string","description":"Quatre derniers caractères du secret."},"created_at":{"type":"string","format":"date-time"}}},"WebhookEndpointCreate":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"URL https. localhost et .local refusés."}}},"WebhookEndpointCreated":{"type":"object","additionalProperties":false,"required":["id","url","secret","secret_hint","events"],"properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"secret":{"type":"string","description":"Secret HMAC, montré une seule fois."},"secret_hint":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"signature":{"type":"string"}}},"WebhookDelivery":{"type":"object","additionalProperties":false,"required":["id","event_id","event_type","status","attempt","created_at"],"properties":{"id":{"type":"string"},"event_id":{"type":"string"},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","succeeded","failed"]},"attempt":{"type":"integer"},"response_status":{"type":"integer","nullable":true},"next_attempt_at":{"type":"string","nullable":true,"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}}}}}