{"components":{"schemas":{"Error":{"properties":{"error":{"properties":{"code":{"enum":["conflict","forbidden","insufficient_scope","internal_error","invalid_arguments","not_found","rate_limited","scenario_locked","validation_failed"],"type":"string"},"details":{"type":"object"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}},"securitySchemes":{"bearer":{"description":"An OAuth access token (mcp_at_…) issued for this API.","scheme":"bearer","type":"http"},"oauth2":{"flows":{"authorizationCode":{"authorizationUrl":"https://carnetcopro.ca/oauth/authorize","refreshUrl":"https://carnetcopro.ca/oauth/token","scopes":{"etudes:delete":"Supprimer des constats, mesures, photos, travaux, groupes, scénarios et documents","etudes:read":"Consulter vos études, immeubles, composantes, travaux et scénarios","etudes:write":"Créer et modifier vos études, composantes, constats, travaux, scénarios et documents"},"tokenUrl":"https://carnetcopro.ca/oauth/token"}},"type":"oauth2"}}},"info":{"contact":{"email":"support@carnetcopro.ca","url":"https://carnetcopro.ca/support"},"description":"Manage reserve fund studies (études) in CarnetCopro. Every operation mirrors an MCP tool of the same name on https://carnetcopro.ca/mcp. Authenticate with an OAuth access token issued for this API.","termsOfService":"https://carnetcopro.ca/conditions","title":"CarnetCopro API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/prices":{"get":{"description":"Lists the active unit prices of the firm's catalogue, by description, with their unit and the UNIFORMAT codes they apply to. Filter by uniformat_code (prices attributed to that component, its group or its category) and/or by text in the description. Paginated: pass next_cursor back as cursor. Use the prices to cost works (travaux) and maintenance. Does not create, change or archive prices (done in the app's Prix page). Read-only.","operationId":"list_prices","parameters":[{"description":"The next_cursor of a previous call, to get the next page.","in":"query","name":"cursor","required":false,"schema":{"description":"The next_cursor of a previous call, to get the next page.","type":"string"}},{"description":"How many results to return (default 50).","in":"query","name":"limit","required":false,"schema":{"description":"How many results to return (default 50).","maximum":200,"minimum":1,"type":"integer"}},{"description":"Text to look for in the description, accents and case ignored.","in":"query","name":"query","required":false,"schema":{"description":"Text to look for in the description, accents and case ignored.","maxLength":200,"type":"string"}},{"description":"With uniformat_code: also include prices attributed to this sub-component of it.","in":"query","name":"subcomponent_label","required":false,"schema":{"description":"With uniformat_code: also include prices attributed to this sub-component of it.","maxLength":200,"type":"string"}},{"description":"Only prices that apply to this individual element, e.g. B2020 (see search_uniformat_elements).","in":"query","name":"uniformat_code","required":false,"schema":{"description":"Only prices that apply to this individual element, e.g. B2020 (see search_uniformat_elements).","maxLength":10,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"next_cursor":null,"prices":[{"description":"Membrane élastomère deux plis","id":87,"uniformat_codes":["B30"],"unit":"m²","unit_price":145.0}]},"schema":{"additionalProperties":false,"properties":{"next_cursor":{"description":"Pass it as cursor to get the next page; null on the last page.","type":["string","null"]},"prices":{"description":"The prices, by description.","items":{"additionalProperties":false,"description":"A catalogue price.","properties":{"description":{"description":"What the price is for.","type":"string"},"id":{"description":"The price's id.","minimum":1,"type":"integer"},"uniformat_codes":{"description":"Where the price applies.","items":{"description":"A category, group or element code; « B2020|label » for a sub-component.","type":"string"},"type":"array"},"unit":{"description":"Unit of measure (m², unité, pi lin., …).","type":["string","null"]},"unit_price":{"description":"Price per unit, before taxes. In CAD.","minimum":0,"type":["number","null"]}},"required":["id","description","unit","unit_price","uniformat_codes"],"type":"object"},"type":"array"}},"required":["prices","next_cursor"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"List catalogue prices","tags":["context"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List catalogue prices"},"x-roles":"every member"}},"/etudes/{etude_id}/report-texts":{"get":{"description":"Returns the paragraphs an étude's report prints on one of its written pages: narrative \"report\" is the executive summary (portrait, short-term interventions, main interventions, financial planning, conclusion), \"scope\" the « Portée, méthode et limites » page. For each paragraph: its key, heading, what it should say, the text this étude prints (HTML), the firm's standard text, and whether the étude has its own. Not available to inspectors. Use save_report_texts to change them. Read-only.","operationId":"get_report_texts","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"description":"report: the executive summary (sommaire exécutif); scope: the « Portée, méthode et limites » page.","in":"query","name":"narrative","required":true,"schema":{"description":"report: the executive summary (sommaire exécutif); scope: the « Portée, méthode et limites » page.","enum":["report","scope"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"etude_id":41,"narrative":"report","paragraphs":[{"custom":true,"hint":"L'immeuble, son année de construction, sa composition et les travaux majeurs déjà réalisés.","key":"sommaire_portrait","label":"Portrait général de la copropriété","standard_text":"","text":"<p>Immeuble de 24 unités construit en 1988.</p>"}]},"schema":{"additionalProperties":false,"properties":{"etude_id":{"description":"The étude.","minimum":1,"type":"integer"},"narrative":{"description":"report: the executive summary (sommaire exécutif); scope: the « Portée, méthode et limites » page.","enum":["report","scope"],"type":"string"},"paragraphs":{"description":"The paragraphs, in the report's order.","items":{"additionalProperties":false,"description":"A paragraph of the page.","properties":{"custom":{"description":"True when the étude has its own text for this paragraph.","type":"boolean"},"hint":{"description":"What the paragraph should say.","type":"string"},"key":{"description":"The paragraph's key, to send to save_report_texts.","enum":["sommaire_portrait","sommaire_court_terme","sommaire_interventions","sommaire_financier","sommaire_conclusion","portee_intro","portee_methode","portee_composantes","portee_durees_couts","portee_renseignements","portee_utilisation"],"type":"string"},"label":{"description":"The heading it prints under.","type":"string"},"standard_text":{"description":"The firm's standard text for this paragraph. HTML.","type":"string"},"text":{"description":"What this étude prints: its own text when custom, else the standard text. HTML.","type":"string"}},"required":["key","label","hint","text","standard_text","custom"],"type":"object"},"type":"array"}},"required":["etude_id","narrative","paragraphs"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"Get the report's written texts","tags":["etudes"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Get the report's written texts"},"x-roles":"owners, administrators and technicians"},"patch":{"description":"Writes paragraphs of an étude's report: narrative \"report\" (executive summary) or \"scope\" (« Portée, méthode et limites »). Send the paragraphs to change as key and text (HTML paragraphs); the others keep their text. An empty text leaves the paragraph out of the report. With as_standard true, the texts also become the firm's standard for études created afterwards (existing études keep what they print). Not available to inspectors. Read the keys and current texts with get_report_texts first. Returns the page as get_report_texts does.","operationId":"save_report_texts","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"narrative":"report","paragraphs":[{"key":"sommaire_portrait","text":"<p>Immeuble de 24 unités construit en 1988.</p>"}]},"schema":{"additionalProperties":false,"properties":{"as_standard":{"description":"Also make these texts the firm's standard for new études. Default false.","type":"boolean"},"narrative":{"description":"report: the executive summary (sommaire exécutif); scope: the « Portée, méthode et limites » page.","enum":["report","scope"],"type":"string"},"paragraphs":{"description":"The paragraphs to write.","items":{"additionalProperties":false,"description":"A paragraph to write.","properties":{"key":{"description":"The paragraph's key, from get_report_texts for this narrative.","enum":["sommaire_portrait","sommaire_court_terme","sommaire_interventions","sommaire_financier","sommaire_conclusion","portee_intro","portee_methode","portee_composantes","portee_durees_couts","portee_renseignements","portee_utilisation"],"type":"string"},"text":{"description":"The paragraph's text, as HTML paragraphs.","maxLength":50000,"type":"string"}},"required":["key","text"],"type":"object"},"maxItems":20,"type":"array"}},"required":["narrative","paragraphs"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"etude_id":41,"narrative":"report","paragraphs":[{"custom":true,"hint":"L'immeuble, son année de construction, sa composition et les travaux majeurs déjà réalisés.","key":"sommaire_portrait","label":"Portrait général de la copropriété","standard_text":"","text":"<p>Immeuble de 24 unités construit en 1988.</p>"}]},"schema":{"additionalProperties":false,"properties":{"etude_id":{"description":"The étude.","minimum":1,"type":"integer"},"narrative":{"description":"report: the executive summary (sommaire exécutif); scope: the « Portée, méthode et limites » page.","enum":["report","scope"],"type":"string"},"paragraphs":{"description":"The paragraphs, in the report's order.","items":{"additionalProperties":false,"description":"A paragraph of the page.","properties":{"custom":{"description":"True when the étude has its own text for this paragraph.","type":"boolean"},"hint":{"description":"What the paragraph should say.","type":"string"},"key":{"description":"The paragraph's key, to send to save_report_texts.","enum":["sommaire_portrait","sommaire_court_terme","sommaire_interventions","sommaire_financier","sommaire_conclusion","portee_intro","portee_methode","portee_composantes","portee_durees_couts","portee_renseignements","portee_utilisation"],"type":"string"},"label":{"description":"The heading it prints under.","type":"string"},"standard_text":{"description":"The firm's standard text for this paragraph. HTML.","type":"string"},"text":{"description":"What this étude prints: its own text when custom, else the standard text. HTML.","type":"string"}},"required":["key","label","hint","text","standard_text","custom"],"type":"object"},"type":"array"}},"required":["etude_id","narrative","paragraphs"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Save the report's written texts","tags":["etudes"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Save the report's written texts"},"x-roles":"owners, administrators and technicians"}},"/etudes/{etude_id}/components/{component_id}/measurements":{"post":{"description":"Adds a row to a component's measurement takeoff (métré): a label, a count of identical elements and the width and height of one, in metres or feet. The Travaux tab's totals (area and perimeter) follow. Refused with conflict when the component's travaux tab is marked complete. Returns the new row; change it with update_measurement, remove it with delete_measurement.","operationId":"add_measurement","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"component_id","required":true,"schema":{"description":"The component measured (see list_components).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"height":1.5,"label":"Fenêtre type A","quantity":24,"unit":"m","width":1.2},"schema":{"additionalProperties":false,"properties":{"height":{"description":"Height (or length) of one element, in unit.","minimum":0,"type":["number","null"]},"label":{"description":"What is measured, e.g. « Fenêtre type A ».","maxLength":255,"type":["string","null"]},"position":{"description":"Order among the component's rows.","maximum":10000,"minimum":0,"type":"integer"},"quantity":{"description":"How many identical elements.","maximum":1000000,"minimum":0,"type":"integer"},"unit":{"description":"Unit of width and height: m (metres) or ft (feet).","enum":["m","ft"],"type":"string"},"width":{"description":"Width of one element, in unit.","minimum":0,"type":["number","null"]}},"required":["quantity"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"measurement":{"component_id":812,"height":1.5,"id":55,"label":"Fenêtre type A","position":0,"quantity":24,"unit":"m","width":1.2}},"schema":{"additionalProperties":false,"properties":{"measurement":{"additionalProperties":false,"description":"A measurement takeoff (métré) row.","properties":{"component_id":{"description":"The component it belongs to.","minimum":1,"type":"integer"},"height":{"description":"Height (or length) of one element, in unit.","minimum":0,"type":["number","null"]},"id":{"description":"The measurement's id.","minimum":1,"type":"integer"},"label":{"description":"What is measured, e.g. « Fenêtre type A ».","maxLength":255,"type":["string","null"]},"position":{"description":"Order among the component's rows.","type":"integer"},"quantity":{"description":"How many identical elements.","type":"integer"},"unit":{"description":"Unit of width and height: m (metres) or ft (feet).","enum":["m","ft"],"type":"string"},"width":{"description":"Width of one element, in unit.","minimum":0,"type":["number","null"]}},"required":["component_id","height","id","label","position","quantity","unit","width"],"type":"object"}},"required":["measurement"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Add a measurement","tags":["components"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Add a measurement"},"x-roles":"every member"}},"/etudes/{etude_id}/scenarios/{scenario_id}/schedule":{"post":{"description":"Changes when works are paid in one financing scenario, as dragging them in its table does; other scenarios are unchanged. In the base scenario (is_base) the work's estimated_year follows: set_start sets it, moving the first occurrence moves it, remove clears it. action set_start: the work starts in planned_month (YYYY-MM) and recurs from there; it enters the scenario if it was out, and its moved occurrences are dropped when the start changes. move_occurrence: only the occurrence the recurrence puts in from_year is paid in to_year instead. restore_occurrence: puts the occurrence of from_year back. remove: takes the work out of the scenario. restore_all_moves: puts every moved occurrence of the scenario back (no task_id). Refused with scenario_locked on a completed scenario. The task must be a work (travaux) paid by the scenario's payer; see the works list of get_scenario_projection. Not available to inspectors.","operationId":"schedule_work_in_scenario","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"scenario_id","required":true,"schema":{"description":"The scenario (see list_scenarios).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"action":"move_occurrence","from_year":2031,"task_id":902,"to_year":2033},"schema":{"additionalProperties":false,"properties":{"action":{"description":"set_start, move_occurrence, restore_occurrence, remove or restore_all_moves (see the tool description).","enum":["set_start","move_occurrence","restore_occurrence","remove","restore_all_moves"],"type":"string"},"from_year":{"description":"move_occurrence and restore_occurrence: the year the work's start and recurrence give the occurrence.","maximum":2200,"minimum":1900,"type":"integer"},"planned_month":{"description":"set_start: the month the work starts in this scenario. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":"string"},"task_id":{"description":"The work (see get_scenario_projection's works); every action but restore_all_moves.","minimum":1,"type":"integer"},"to_year":{"description":"move_occurrence: the year that occurrence is paid in instead.","maximum":2200,"minimum":1900,"type":"integer"}},"required":["action"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"scenario":{"annual_contribution":6.2e4,"completed_at":null,"contribution_ramp_years":3,"contribution_rate":2.0,"current_annual_contribution":3.8e4,"duration_years":25,"end_month":"2051-12","group_id":null,"id":77,"inflation_rate":3.0,"initial_balance":1.845e5,"investment_return_rate":1.5,"is_base":false,"is_recommended":false,"locked":false,"name":"Scénario recommandé","safety_threshold":2.5e4,"scope":"building","start_month":"2027-01","summary_narrative":null,"unit_numbers":[],"updated_at":"2026-10-20T14:03:11Z","works":[{"estimated_year":2031,"moved_occurrences":[{"from_year":2031,"to_year":2033}],"planned_month":"2031-01","task_id":902,"title":"Réfection de la toiture"}]}},"schema":{"additionalProperties":false,"properties":{"scenario":{"additionalProperties":false,"description":"A financing scenario with its planned works.","properties":{"annual_contribution":{"description":"Target yearly contribution (reached after the ramp), in CAD.","type":"number"},"completed_at":{"description":"When it was marked completed. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"contribution_ramp_years":{"description":"Years taken to go from the current contribution to the target, in equal steps.","type":"integer"},"contribution_rate":{"description":"Yearly increase of the contribution after the ramp, in percent.","type":["number","null"]},"current_annual_contribution":{"description":"Contribution paid today, in CAD.","type":["number","null"]},"duration_years":{"description":"Length of the projection in years.","type":["integer","null"]},"end_month":{"description":"End of the projection. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":"string"},"group_id":{"description":"The restricted-use group, for a group scenario.","minimum":1,"type":["integer","null"]},"id":{"description":"The scenario's id.","minimum":1,"type":"integer"},"inflation_rate":{"description":"Yearly inflation applied to work costs, in percent.","type":"number"},"initial_balance":{"description":"Fund balance at the start, in CAD.","type":"number"},"investment_return_rate":{"description":"Yearly return on the fund's average balance, in percent.","type":["number","null"]},"is_base":{"description":"The étude's base scenario: one per étude, created with it and never deleted. Placing a work in it, or moving the work's first occurrence, sets the work's estimated_year (« Année prévue »); taking the work out clears it.","type":"boolean"},"is_recommended":{"description":"The étude's recommended strategy (at most one building scenario).","type":"boolean"},"locked":{"description":"Completed, so read only: hypotheses, works and deletion are refused until reopened with update_scenario completed=false.","type":"boolean"},"name":{"description":"Name of the scenario.","type":"string"},"safety_threshold":{"description":"Minimum balance; a year falling below it gets a special contribution, in CAD.","type":["number","null"]},"scope":{"description":"building: a strategy for the whole reserve fund; group: the distinct contribution of a restricted-use group.","enum":["building","group"],"type":"string"},"start_month":{"description":"First month of the projection. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":"string"},"summary_narrative":{"description":"The report's paragraph on this strategy (HTML).","type":["string","null"]},"unit_numbers":{"description":"Units paying it (a group scenario); empty for the building.","items":{"description":"A unit number.","type":"string"},"type":"array"},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":"string"},"works":{"description":"Every work this scenario can plan (paid by the same payer), planned or not.","items":{"additionalProperties":false,"description":"A work the scenario can plan.","properties":{"estimated_year":{"description":"Year planned on the component's Travaux tab.","type":["integer","null"]},"moved_occurrences":{"description":"Occurrences moved to another year in this scenario.","items":{"additionalProperties":false,"description":"An occurrence moved to another year.","properties":{"from_year":{"description":"Year the recurrence gives the occurrence.","type":"integer"},"to_year":{"description":"Year it is paid in, in this scenario.","type":"integer"}},"required":["from_year","to_year"],"type":"object"},"type":"array"},"planned_month":{"description":"Start of the work in this scenario, from which its recurrence counts; null when the scenario leaves it out. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":["string","null"]},"task_id":{"description":"The work's id (see list_tasks).","minimum":1,"type":"integer"},"title":{"description":"Title of the work.","type":["string","null"]}},"required":["task_id","title","estimated_year","planned_month","moved_occurrences"],"type":"object"},"type":"array"}},"required":["annual_contribution","completed_at","contribution_ramp_years","contribution_rate","current_annual_contribution","duration_years","end_month","group_id","id","inflation_rate","initial_balance","investment_return_rate","is_base","is_recommended","locked","name","safety_threshold","scope","start_month","summary_narrative","unit_numbers","updated_at","works"],"type":"object"}},"required":["scenario"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Schedule a work in a scenario","tags":["financing"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Schedule a work in a scenario"},"x-roles":"owners, administrators and technicians"}},"/etudes/{etude_id}/attendees":{"post":{"description":"Adds a person to those present at the inspection of an étude, after the ones already listed, with the capacity they attended in (free text, e.g. Administrateur du syndicat, Gestionnaire, Concierge). The report lists them. get_etude returns the current list; remove_etude_attendee removes one. Does not change the syndicate representative field of the header (update_etude, syndicat_rep).","operationId":"add_etude_attendee","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Paul Roy","role":"Administrateur du syndicat"},"schema":{"additionalProperties":false,"properties":{"name":{"description":"The person's full name.","maxLength":200,"minLength":1,"type":"string"},"role":{"description":"In what capacity they attended.","maxLength":200,"type":["string","null"]}},"required":["name"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"attendee":{"id":5,"name":"Paul Roy","role":"Administrateur du syndicat"}},"schema":{"additionalProperties":false,"properties":{"attendee":{"additionalProperties":false,"description":"A person present at the inspection.","properties":{"id":{"description":"The attendee's id.","minimum":1,"type":"integer"},"name":{"description":"Full name.","type":"string"},"role":{"description":"In what capacity, e.g. Administrateur du syndicat, Gestionnaire.","type":["string","null"]}},"required":["id","name","role"],"type":"object"}},"required":["attendee"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Add an inspection attendee","tags":["etudes"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Add an inspection attendee"},"x-roles":"every member"}},"/etudes/{etude_id}/documents/{document_id}/public-report":{"put":{"description":"Puts a generated document in the étude's public report, or takes it out. Anyone holding the public report link (get_public_report_link) can open the documents put in it; taking one out hides it from that page at once. The document itself is unchanged; to remove it entirely, use delete_generated_document. Not available to inspectors.","operationId":"set_document_in_public_report","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"document_id","required":true,"schema":{"description":"The generated document (see list_generated_documents).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"in_public_report":false},"schema":{"additionalProperties":false,"properties":{"in_public_report":{"description":"true to offer it in the public report, false to hide it.","type":"boolean"}},"required":["in_public_report"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"document":{"generated_at":"2026-10-30T15:02:11Z","id":120,"in_public_report":false,"pdf_failed_reason":null,"pdf_status":"ready","template_id":3,"title":"Étude du fonds de prévoyance — 1200, rue King Ouest"}},"schema":{"additionalProperties":false,"properties":{"document":{"additionalProperties":false,"description":"A generated document.","properties":{"generated_at":{"description":"When it was generated. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"id":{"description":"The generated document's id.","minimum":1,"type":"integer"},"in_public_report":{"description":"Offered by the étude's public report link.","type":"boolean"},"pdf_failed_reason":{"description":"Why the PDF failed.","type":["string","null"]},"pdf_status":{"description":"pending: the PDF is being rendered (poll get_generated_document); ready: download_url is available; failed: see pdf_failed_reason.","enum":["pending","ready","failed"],"type":"string"},"template_id":{"description":"The template it was generated from.","minimum":1,"type":["integer","null"]},"title":{"description":"Title: the template's and the building's address.","type":["string","null"]}},"required":["generated_at","id","in_public_report","pdf_failed_reason","pdf_status","template_id","title"],"type":"object"}},"required":["document"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Set a document in the public report","tags":["documents"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Set a document in the public report"},"x-roles":"owners, administrators and technicians"}},"/etudes/{etude_id}":{"get":{"description":"Returns one étude: its header and study parameters (dates, file number, inspector, weather, mandate, horizon, fund balance and contribution, safety threshold, site visit declaration, signatories, access), its building, the people present at the inspection, and progress counts (components, components marked complete, components in the report). Use list_components for the components themselves, list_etudes to find an étude. Does not change anything (update_etude). Read-only.","operationId":"get_etude","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"attendees":[{"id":5,"name":"Paul Roy","role":"Administrateur du syndicat"}],"etude":{"dossier_no":"CCETD-2026-0041","etude_date":"2026-09-15","id":41},"inspector":{"email":"marie@exemple.ca","id":12,"name":"Marie Tremblay"},"progress":{"completed":18,"components":62,"in_report":40},"signatories":{"established_by":"Julie Bouchard","site_visit":"Julie Bouchard","writing":null}},"schema":{"additionalProperties":false,"properties":{"attendees":{"description":"People present at the inspection, in order.","items":{"additionalProperties":false,"description":"A person present at the inspection.","properties":{"id":{"description":"The attendee's id.","minimum":1,"type":"integer"},"name":{"description":"Full name.","type":"string"},"role":{"description":"In what capacity, e.g. Administrateur du syndicat, Gestionnaire.","type":["string","null"]}},"required":["id","name","role"],"type":"object"},"type":"array"},"etude":{"additionalProperties":false,"description":"An étude's header and study parameters.","properties":{"access_mode":{"description":"Who may open the étude: listed users only, administrators plus listed users, or every member.","enum":["users","admins","everyone"],"type":"string"},"access_user_ids":{"description":"Members explicitly given access.","items":{"description":"A member id.","type":"integer"},"type":"array"},"building":{"additionalProperties":false,"description":"The building studied.","properties":{"address":{"description":"Street address.","type":["string","null"]},"city":{"description":"City.","type":["string","null"]},"id":{"description":"The building's id.","minimum":1,"type":"integer"},"syndicat_name":{"description":"Name of the syndicate of co-owners.","type":["string","null"]}},"required":["id","address","city","syndicat_name"],"type":["object","null"]},"carnet_revision_year":{"description":"Year the maintenance log (carnet d'entretien) is next revised.","maximum":2100,"minimum":2000,"type":["integer","null"]},"current_annual_contribution":{"description":"Current yearly contribution to the fund. In CAD.","minimum":0,"type":["number","null"]},"dossier_no":{"description":"The firm's file number.","maxLength":100,"type":["string","null"]},"established_by_signatory_id":{"description":"Signatory who establishes the study (see list_signatories).","minimum":1,"type":["integer","null"]},"etude_date":{"description":"Date of the étude. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"fund_balance":{"description":"Reserve fund balance reported by the syndicate. In CAD.","minimum":0,"type":["number","null"]},"fund_balance_as_of":{"description":"Date of that balance. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"id":{"description":"The étude's id.","minimum":1,"type":"integer"},"inflation_rate":{"description":"Yearly inflation building scenarios start from, in percent (e.g. 3).","maximum":99.99,"minimum":0,"type":"number"},"inspection_date":{"description":"Date of the on-site examination (printed in the signed declarations). ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"inspector_id":{"description":"The member who inspects the building.","minimum":1,"type":["integer","null"]},"investment_return_rate":{"description":"Yearly return on the fund building scenarios start from, in percent.","maximum":99.99,"minimum":0,"type":"number"},"mandate_nature":{"description":"First study of the building, or a revision of an earlier one.","enum":["first_study","revision"],"type":"string"},"next_study_year":{"description":"Year the next study is due.","maximum":2100,"minimum":2000,"type":["integer","null"]},"notes":{"description":"Free notes on the étude, not printed in the report.","maxLength":20000,"type":["string","null"]},"reference_year":{"description":"First year of the projections.","maximum":2100,"minimum":2000,"type":["integer","null"]},"report_date":{"description":"Date printed on the report. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"safety_threshold":{"description":"Minimum fund balance the scenarios must keep. In CAD.","minimum":0,"type":["number","null"]},"site_visit_mode":{"description":"Whether the signatory visited the site themself, or supervised someone who did.","enum":["self","supervised"],"type":"string"},"site_visit_signatory_id":{"description":"Signatory for the site visit.","minimum":1,"type":["integer","null"]},"site_visit_supervisee_name":{"description":"Who visited under supervision (when site_visit_mode is supervised).","maxLength":200,"type":["string","null"]},"study_horizon_years":{"description":"Projection horizon in years; the regulation requires at least 25.","maximum":50,"minimum":25,"type":"integer"},"syndicat_rep":{"description":"Who represented the syndicate at the visit.","maxLength":200,"type":["string","null"]},"tax_rate":{"description":"Sales taxes (GST + QST) applied to costs, in percent.","type":"number"},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":"string"},"weather":{"description":"Weather during the site visit.","maxLength":200,"type":["string","null"]},"writing_signatory_id":{"description":"Signatory who wrote the report.","minimum":1,"type":["integer","null"]}},"required":["access_mode","access_user_ids","building","carnet_revision_year","current_annual_contribution","dossier_no","established_by_signatory_id","etude_date","fund_balance","fund_balance_as_of","id","inflation_rate","inspection_date","inspector_id","investment_return_rate","mandate_nature","next_study_year","notes","reference_year","report_date","safety_threshold","site_visit_mode","site_visit_signatory_id","site_visit_supervisee_name","study_horizon_years","syndicat_rep","tax_rate","updated_at","weather","writing_signatory_id"],"type":"object"},"inspector":{"additionalProperties":false,"description":"The member who inspects the building.","properties":{"email":{"description":"Email address.","type":"string"},"id":{"description":"The member's id.","minimum":1,"type":"integer"},"name":{"description":"Full name.","type":"string"}},"required":["id","name","email"],"type":["object","null"]},"progress":{"additionalProperties":false,"description":"How far the inspection is.","properties":{"completed":{"description":"Components marked complete.","minimum":0,"type":"integer"},"components":{"description":"Components (and sub-components) of the étude.","minimum":0,"type":"integer"},"in_report":{"description":"Components included in the report (set_report_scope).","minimum":0,"type":"integer"}},"required":["components","completed","in_report"],"type":"object"},"signatories":{"additionalProperties":false,"description":"The signatories' names (ids are in etude).","properties":{"established_by":{"description":"Name of the signatory who establishes the study.","type":["string","null"]},"site_visit":{"description":"Name of the signatory for the site visit.","type":["string","null"]},"writing":{"description":"Name of the signatory who wrote the report.","type":["string","null"]}},"required":["established_by","site_visit","writing"],"type":"object"}},"required":["etude","inspector","signatories","attendees","progress"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"Get an étude","tags":["etudes"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Get an étude"},"x-roles":"every member"},"patch":{"description":"Changes the header and study parameters of an étude: dates, file number, inspector, weather, syndicate representative, notes, mandate nature, projection horizon, fund balance and contribution, safety threshold, site visit declaration and the three signatories. Only the fields you send change; send null to clear an optional field. Read the current values with get_etude first. Does not change components, tasks or scenarios, nor who may open the étude (set_etude_access).","operationId":"update_etude","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude to change (see list_etudes).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"fund_balance":1.845e5,"fund_balance_as_of":"2026-08-31","weather":"Ensoleillé, 12 °C"},"schema":{"additionalProperties":false,"properties":{"carnet_revision_year":{"description":"Year the maintenance log (carnet d'entretien) is next revised.","maximum":2100,"minimum":2000,"type":["integer","null"]},"current_annual_contribution":{"description":"Current yearly contribution to the fund. In CAD.","minimum":0,"type":["number","null"]},"dossier_no":{"description":"The firm's file number.","maxLength":100,"type":["string","null"]},"established_by_signatory_id":{"description":"Signatory who establishes the study (see list_signatories).","minimum":1,"type":["integer","null"]},"etude_date":{"description":"Date of the étude. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"fund_balance":{"description":"Reserve fund balance reported by the syndicate. In CAD.","minimum":0,"type":["number","null"]},"fund_balance_as_of":{"description":"Date of that balance. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"inflation_rate":{"description":"Yearly inflation building scenarios start from, in percent (e.g. 3).","maximum":99.99,"minimum":0,"type":"number"},"inspection_date":{"description":"Date of the on-site examination (printed in the signed declarations). ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"inspector_id":{"description":"The member who inspects the building (see list_account_users).","minimum":1,"type":"integer"},"investment_return_rate":{"description":"Yearly return on the fund building scenarios start from, in percent.","maximum":99.99,"minimum":0,"type":"number"},"mandate_nature":{"description":"First study of the building, or a revision of an earlier one.","enum":["first_study","revision"],"type":"string"},"next_study_year":{"description":"Year the next study is due.","maximum":2100,"minimum":2000,"type":["integer","null"]},"notes":{"description":"Free notes on the étude, not printed in the report.","maxLength":20000,"type":["string","null"]},"reference_year":{"description":"First year of the projections.","maximum":2100,"minimum":2000,"type":["integer","null"]},"report_date":{"description":"Date printed on the report. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"safety_threshold":{"description":"Minimum fund balance the scenarios must keep. In CAD.","minimum":0,"type":["number","null"]},"site_visit_mode":{"description":"Whether the signatory visited the site themself, or supervised someone who did.","enum":["self","supervised"],"type":"string"},"site_visit_signatory_id":{"description":"Signatory for the site visit.","minimum":1,"type":["integer","null"]},"site_visit_supervisee_name":{"description":"Who visited under supervision (when site_visit_mode is supervised).","maxLength":200,"type":["string","null"]},"study_horizon_years":{"description":"Projection horizon in years; the regulation requires at least 25.","maximum":50,"minimum":25,"type":"integer"},"syndicat_rep":{"description":"Who represented the syndicate at the visit.","maxLength":200,"type":["string","null"]},"weather":{"description":"Weather during the site visit.","maxLength":200,"type":["string","null"]},"writing_signatory_id":{"description":"Signatory who wrote the report.","minimum":1,"type":["integer","null"]}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"etude":{"fund_balance":1.845e5,"fund_balance_as_of":"2026-08-31","id":41,"weather":"Ensoleillé, 12 °C"}},"schema":{"additionalProperties":false,"properties":{"etude":{"additionalProperties":false,"description":"An étude's header and study parameters.","properties":{"access_mode":{"description":"Who may open the étude: listed users only, administrators plus listed users, or every member.","enum":["users","admins","everyone"],"type":"string"},"access_user_ids":{"description":"Members explicitly given access.","items":{"description":"A member id.","type":"integer"},"type":"array"},"building":{"additionalProperties":false,"description":"The building studied.","properties":{"address":{"description":"Street address.","type":["string","null"]},"city":{"description":"City.","type":["string","null"]},"id":{"description":"The building's id.","minimum":1,"type":"integer"},"syndicat_name":{"description":"Name of the syndicate of co-owners.","type":["string","null"]}},"required":["id","address","city","syndicat_name"],"type":["object","null"]},"carnet_revision_year":{"description":"Year the maintenance log (carnet d'entretien) is next revised.","maximum":2100,"minimum":2000,"type":["integer","null"]},"current_annual_contribution":{"description":"Current yearly contribution to the fund. In CAD.","minimum":0,"type":["number","null"]},"dossier_no":{"description":"The firm's file number.","maxLength":100,"type":["string","null"]},"established_by_signatory_id":{"description":"Signatory who establishes the study (see list_signatories).","minimum":1,"type":["integer","null"]},"etude_date":{"description":"Date of the étude. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"fund_balance":{"description":"Reserve fund balance reported by the syndicate. In CAD.","minimum":0,"type":["number","null"]},"fund_balance_as_of":{"description":"Date of that balance. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"id":{"description":"The étude's id.","minimum":1,"type":"integer"},"inflation_rate":{"description":"Yearly inflation building scenarios start from, in percent (e.g. 3).","maximum":99.99,"minimum":0,"type":"number"},"inspection_date":{"description":"Date of the on-site examination (printed in the signed declarations). ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"inspector_id":{"description":"The member who inspects the building.","minimum":1,"type":["integer","null"]},"investment_return_rate":{"description":"Yearly return on the fund building scenarios start from, in percent.","maximum":99.99,"minimum":0,"type":"number"},"mandate_nature":{"description":"First study of the building, or a revision of an earlier one.","enum":["first_study","revision"],"type":"string"},"next_study_year":{"description":"Year the next study is due.","maximum":2100,"minimum":2000,"type":["integer","null"]},"notes":{"description":"Free notes on the étude, not printed in the report.","maxLength":20000,"type":["string","null"]},"reference_year":{"description":"First year of the projections.","maximum":2100,"minimum":2000,"type":["integer","null"]},"report_date":{"description":"Date printed on the report. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"safety_threshold":{"description":"Minimum fund balance the scenarios must keep. In CAD.","minimum":0,"type":["number","null"]},"site_visit_mode":{"description":"Whether the signatory visited the site themself, or supervised someone who did.","enum":["self","supervised"],"type":"string"},"site_visit_signatory_id":{"description":"Signatory for the site visit.","minimum":1,"type":["integer","null"]},"site_visit_supervisee_name":{"description":"Who visited under supervision (when site_visit_mode is supervised).","maxLength":200,"type":["string","null"]},"study_horizon_years":{"description":"Projection horizon in years; the regulation requires at least 25.","maximum":50,"minimum":25,"type":"integer"},"syndicat_rep":{"description":"Who represented the syndicate at the visit.","maxLength":200,"type":["string","null"]},"tax_rate":{"description":"Sales taxes (GST + QST) applied to costs, in percent.","type":"number"},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":"string"},"weather":{"description":"Weather during the site visit.","maxLength":200,"type":["string","null"]},"writing_signatory_id":{"description":"Signatory who wrote the report.","minimum":1,"type":["integer","null"]}},"required":["access_mode","access_user_ids","building","carnet_revision_year","current_annual_contribution","dossier_no","established_by_signatory_id","etude_date","fund_balance","fund_balance_as_of","id","inflation_rate","inspection_date","inspector_id","investment_return_rate","mandate_nature","next_study_year","notes","reference_year","report_date","safety_threshold","site_visit_mode","site_visit_signatory_id","site_visit_supervisee_name","study_horizon_years","syndicat_rep","tax_rate","updated_at","weather","writing_signatory_id"],"type":"object"}},"required":["etude"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Update an étude","tags":["etudes"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Update an étude"},"x-roles":"every member"}},"/buildings":{"get":{"description":"Lists the buildings (immeubles) of the account you can reach, newest first: address, city, postal code, syndicate name and NEQ. Filter by text (address, city, postal code, syndicate name or NEQ). Paginated: pass next_cursor back as cursor. Technicians and inspectors see the buildings of the études they may open. Use get_building for a building's details, units and études, and list_etudes for the études themselves. Read-only.","operationId":"list_buildings","parameters":[{"description":"The next_cursor of a previous call, to get the next page.","in":"query","name":"cursor","required":false,"schema":{"description":"The next_cursor of a previous call, to get the next page.","type":"string"}},{"description":"How many results to return (default 50).","in":"query","name":"limit","required":false,"schema":{"description":"How many results to return (default 50).","maximum":200,"minimum":1,"type":"integer"}},{"description":"Text to look for in the address, city, postal code, syndicate name or NEQ.","in":"query","name":"query","required":false,"schema":{"description":"Text to look for in the address, city, postal code, syndicate name or NEQ.","maxLength":200,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"buildings":[{"address":"1200, rue King Ouest","city":"Sherbrooke","id":17,"neq":"1170000017","postal_code":"J1H 1S1","syndicat_name":"Syndicat du 1200 King"}],"next_cursor":null},"schema":{"additionalProperties":false,"properties":{"buildings":{"description":"The buildings, newest first.","items":{"additionalProperties":false,"description":"A building, in short.","properties":{"address":{"description":"Street address.","type":["string","null"]},"city":{"description":"City.","type":["string","null"]},"id":{"description":"The building's id.","minimum":1,"type":"integer"},"neq":{"description":"Quebec enterprise number (NEQ) of the syndicate.","type":["string","null"]},"postal_code":{"description":"Postal code.","type":["string","null"]},"syndicat_name":{"description":"Name of the syndicate of co-owners.","type":["string","null"]}},"required":["id","address","city","postal_code","syndicat_name","neq"],"type":"object"},"type":"array"},"next_cursor":{"description":"Pass it as cursor to get the next page; null on the last page.","type":["string","null"]}},"required":["buildings","next_cursor"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"List buildings","tags":["buildings"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List buildings"},"x-roles":"every member"},"post":{"description":"Creates a building (immeuble) in the account: address, city, postal code and the syndicate's legal name are required; the rest of its description is optional. With a NEQ, the building is linked to its MaCopro owners' portal account, which is created if it does not exist yet; without one it stays unlinked until a NEQ is set with update_building. Check list_buildings first to avoid a duplicate. Does not create an étude: call create_etude with the new building's id next.","operationId":"create_building","parameters":[],"requestBody":{"content":{"application/json":{"example":{"address":"1200, rue King Ouest","city":"Sherbrooke","copropriete_type":"vertical","postal_code":"J1H 1S1","syndicat_name":"Syndicat du 1200 King","unit_count":24,"year_built":1988},"schema":{"additionalProperties":false,"properties":{"address":{"description":"Street address.","maxLength":255,"type":"string"},"building_type":{"description":"Use of the building.","enum":["residential","commercial","mixed",null],"type":["string","null"]},"city":{"description":"City.","maxLength":255,"type":"string"},"client_email":{"description":"Email of the syndicate's contact.","maxLength":255,"type":["string","null"]},"commercial_unit_count":{"description":"Number of commercial units.","maximum":10000,"minimum":0,"type":["integer","null"]},"copropriete_type":{"description":"Horizontal (row houses, detached units) or vertical (apartment building) co-ownership.","enum":["horizontal","vertical",null],"type":["string","null"]},"floors_above_ground":{"description":"Number of floors above ground.","maximum":200,"minimum":0,"type":["integer","null"]},"neq":{"description":"Quebec enterprise number of the syndicate: exactly 10 digits. Setting it links the building to its MaCopro owners' portal account (created if needed).","maxLength":10,"type":["string","null"]},"next_revision_date":{"description":"When the study is next due for revision. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"phone_number":{"description":"Phone number of the contact.","maxLength":50,"type":["string","null"]},"postal_code":{"description":"Postal code, e.g. H2X 3J6.","maxLength":20,"type":"string"},"responsible_person_name":{"description":"Name of the syndicate's contact person.","maxLength":255,"type":["string","null"]},"revision_period_years":{"description":"Years between two revisions of the study: 5 or 10.","maximum":10,"minimum":5,"type":"integer"},"syndicat_name":{"description":"Legal name of the syndicate of co-owners.","maxLength":255,"type":"string"},"unit_count":{"description":"Number of residential units.","maximum":10000,"minimum":0,"type":["integer","null"]},"year_built":{"description":"Year of construction.","maximum":2100,"minimum":1600,"type":["integer","null"]}},"required":["address","city","postal_code","syndicat_name"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"building":{"address":"1200, rue King Ouest","city":"Sherbrooke","id":17,"linked_to_macopro":false,"neq":null,"postal_code":"J1H 1S1","syndicat_name":"Syndicat du 1200 King"}},"schema":{"additionalProperties":false,"properties":{"building":{"additionalProperties":false,"description":"A building and its identity.","properties":{"address":{"description":"Street address.","type":["string","null"]},"building_type":{"description":"Use of the building.","enum":["residential","commercial","mixed",null],"type":["string","null"]},"city":{"description":"City.","type":["string","null"]},"client_email":{"description":"Email of the syndicate's contact.","maxLength":255,"type":["string","null"]},"commercial_unit_count":{"description":"Number of commercial units.","maximum":10000,"minimum":0,"type":["integer","null"]},"copropriete_type":{"description":"Horizontal (row houses, detached units) or vertical (apartment building) co-ownership.","enum":["horizontal","vertical",null],"type":["string","null"]},"floors_above_ground":{"description":"Number of floors above ground.","maximum":200,"minimum":0,"type":["integer","null"]},"has_photo":{"description":"True when a cover photo of the building is on file.","type":"boolean"},"id":{"description":"The building's id.","minimum":1,"type":"integer"},"linked_to_macopro":{"description":"True when the building is linked to its MaCopro owners' portal account.","type":"boolean"},"neq":{"description":"Quebec enterprise number (NEQ) of the syndicate.","type":["string","null"]},"next_revision_date":{"description":"When the study is next due for revision. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"phone_number":{"description":"Phone number of the contact.","maxLength":50,"type":["string","null"]},"postal_code":{"description":"Postal code.","type":["string","null"]},"responsible_person_name":{"description":"Name of the syndicate's contact person.","maxLength":255,"type":["string","null"]},"revision_period_years":{"description":"Years between two revisions of the study (5 or 10).","type":["integer","null"]},"syndicat_name":{"description":"Name of the syndicate of co-owners.","type":["string","null"]},"unit_count":{"description":"Number of residential units.","maximum":10000,"minimum":0,"type":["integer","null"]},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":"string"},"year_built":{"description":"Year of construction.","maximum":2100,"minimum":1600,"type":["integer","null"]}},"required":["address","building_type","city","client_email","commercial_unit_count","copropriete_type","floors_above_ground","has_photo","id","linked_to_macopro","neq","next_revision_date","phone_number","postal_code","responsible_person_name","revision_period_years","syndicat_name","unit_count","updated_at","year_built"],"type":"object"}},"required":["building"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Create a building","tags":["buildings"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Create a building"},"x-roles":"every member"}},"/buildings/{building_id}/units":{"post":{"description":"Adds a unit (private portion) to a building, with its number and its relative value (fraction, in percent) from the declaration of co-ownership; the fractions feed the per-unit contribution tables. Unit numbers are unique per building. Refused when the building's units come from its MaCopro owners' portal (units_source \"web\" in get_building), where they are maintained instead. Does not change the building's unit_count (update_building). Use delete_building_unit to remove one.","operationId":"add_building_unit","parameters":[{"in":"path","name":"building_id","required":true,"schema":{"description":"The building (see list_buildings).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"fraction":4.17,"number":"101"},"schema":{"additionalProperties":false,"properties":{"fraction":{"description":"Relative value (quote-part) of the unit, in percent.","maximum":100,"minimum":0,"type":["number","null"]},"number":{"description":"Unit number, e.g. 101.","maxLength":50,"minLength":1,"type":"string"}},"required":["number"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"unit":{"fraction":4.17,"id":301,"number":"101"}},"schema":{"additionalProperties":false,"properties":{"unit":{"additionalProperties":false,"description":"A unit of the building.","properties":{"fraction":{"description":"Relative value (quote-part) of the unit, in percent.","type":["number","null"]},"id":{"description":"The unit's id.","type":"integer"},"number":{"description":"Unit number, as on the declaration of co-ownership.","type":["string","null"]}},"required":["id","number","fraction"],"type":"object"}},"required":["unit"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Add a unit to a building","tags":["buildings"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Add a unit to a building"},"x-roles":"every member"}},"/buildings/{building_id}":{"get":{"description":"Returns one building: its identity and description (address, syndicate, NEQ, year built, unit counts, floors, type of co-ownership, contact, revision period), its units with their relative values (fractions), and the études of it you may open. units_source tells where the units come from: \"pro\" (entered here, editable with add_building_unit and delete_building_unit) or \"web\" (read from the MaCopro owners' portal, read-only). Use update_building to change it. Read-only.","operationId":"get_building","parameters":[{"in":"path","name":"building_id","required":true,"schema":{"description":"The building (see list_buildings).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"building":{"address":"1200, rue King Ouest","building_type":"residential","city":"Sherbrooke","copropriete_type":"vertical","id":17,"neq":"1170000017","postal_code":"J1H 1S1","syndicat_name":"Syndicat du 1200 King","unit_count":24,"year_built":1988},"etudes":[],"units":[{"fraction":4.17,"id":301,"number":"101"}],"units_source":"pro"},"schema":{"additionalProperties":false,"properties":{"building":{"additionalProperties":false,"description":"A building and its identity.","properties":{"address":{"description":"Street address.","type":["string","null"]},"building_type":{"description":"Use of the building.","enum":["residential","commercial","mixed",null],"type":["string","null"]},"city":{"description":"City.","type":["string","null"]},"client_email":{"description":"Email of the syndicate's contact.","maxLength":255,"type":["string","null"]},"commercial_unit_count":{"description":"Number of commercial units.","maximum":10000,"minimum":0,"type":["integer","null"]},"copropriete_type":{"description":"Horizontal (row houses, detached units) or vertical (apartment building) co-ownership.","enum":["horizontal","vertical",null],"type":["string","null"]},"floors_above_ground":{"description":"Number of floors above ground.","maximum":200,"minimum":0,"type":["integer","null"]},"has_photo":{"description":"True when a cover photo of the building is on file.","type":"boolean"},"id":{"description":"The building's id.","minimum":1,"type":"integer"},"linked_to_macopro":{"description":"True when the building is linked to its MaCopro owners' portal account.","type":"boolean"},"neq":{"description":"Quebec enterprise number (NEQ) of the syndicate.","type":["string","null"]},"next_revision_date":{"description":"When the study is next due for revision. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"phone_number":{"description":"Phone number of the contact.","maxLength":50,"type":["string","null"]},"postal_code":{"description":"Postal code.","type":["string","null"]},"responsible_person_name":{"description":"Name of the syndicate's contact person.","maxLength":255,"type":["string","null"]},"revision_period_years":{"description":"Years between two revisions of the study (5 or 10).","type":["integer","null"]},"syndicat_name":{"description":"Name of the syndicate of co-owners.","type":["string","null"]},"unit_count":{"description":"Number of residential units.","maximum":10000,"minimum":0,"type":["integer","null"]},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":"string"},"year_built":{"description":"Year of construction.","maximum":2100,"minimum":1600,"type":["integer","null"]}},"required":["address","building_type","city","client_email","commercial_unit_count","copropriete_type","floors_above_ground","has_photo","id","linked_to_macopro","neq","next_revision_date","phone_number","postal_code","responsible_person_name","revision_period_years","syndicat_name","unit_count","updated_at","year_built"],"type":"object"},"etudes":{"description":"The études of this building you may open, newest first.","items":{"additionalProperties":false,"description":"An étude, in short.","properties":{"building":{"additionalProperties":false,"description":"The building studied.","properties":{"address":{"description":"Street address.","type":["string","null"]},"city":{"description":"City.","type":["string","null"]},"id":{"description":"The building's id.","minimum":1,"type":"integer"},"syndicat_name":{"description":"Name of the syndicate of co-owners.","type":["string","null"]}},"required":["id","address","city","syndicat_name"],"type":["object","null"]},"dossier_no":{"description":"The firm's file number for this étude.","type":["string","null"]},"etude_date":{"description":"Date of the étude. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"id":{"description":"The étude's id.","minimum":1,"type":"integer"},"report_date":{"description":"Date printed on the report. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":"string"}},"required":["id","dossier_no","etude_date","report_date","building","updated_at"],"type":"object"},"type":"array"},"units":{"description":"The units, by number.","items":{"additionalProperties":false,"description":"A unit of the building.","properties":{"fraction":{"description":"Relative value (quote-part) of the unit, in percent.","type":["number","null"]},"id":{"description":"The unit's id.","type":"integer"},"number":{"description":"Unit number, as on the declaration of co-ownership.","type":["string","null"]}},"required":["id","number","fraction"],"type":"object"},"type":"array"},"units_source":{"description":"pro: units entered in CarnetCopro (editable); web: read from the MaCopro owners' portal (read-only).","enum":["pro","web"],"type":"string"}},"required":["building","units","units_source","etudes"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"Get a building","tags":["buildings"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Get a building"},"x-roles":"every member"},"patch":{"description":"Changes a building's identity and description (the étude's fiche cliente): address, postal code, syndicate name, NEQ, year built, unit counts, floors, type of use and of co-ownership, contact, revision period. Only the fields you send change; send null to clear an optional one. Setting a NEQ on an unlinked building links it to its MaCopro owners' portal account (created if needed). The change shows on every étude of the building. Does not change units (add_building_unit, delete_building_unit) nor the photo.","operationId":"update_building","parameters":[{"in":"path","name":"building_id","required":true,"schema":{"description":"The building to change (see list_buildings).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"floors_above_ground":6,"year_built":1988},"schema":{"additionalProperties":false,"properties":{"address":{"description":"Street address.","maxLength":255,"type":"string"},"building_type":{"description":"Use of the building.","enum":["residential","commercial","mixed",null],"type":["string","null"]},"city":{"description":"City.","maxLength":255,"type":"string"},"client_email":{"description":"Email of the syndicate's contact.","maxLength":255,"type":["string","null"]},"commercial_unit_count":{"description":"Number of commercial units.","maximum":10000,"minimum":0,"type":["integer","null"]},"copropriete_type":{"description":"Horizontal (row houses, detached units) or vertical (apartment building) co-ownership.","enum":["horizontal","vertical",null],"type":["string","null"]},"floors_above_ground":{"description":"Number of floors above ground.","maximum":200,"minimum":0,"type":["integer","null"]},"neq":{"description":"Quebec enterprise number of the syndicate: exactly 10 digits. Setting it links the building to its MaCopro owners' portal account (created if needed).","maxLength":10,"type":["string","null"]},"next_revision_date":{"description":"When the study is next due for revision. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"phone_number":{"description":"Phone number of the contact.","maxLength":50,"type":["string","null"]},"postal_code":{"description":"Postal code, e.g. H2X 3J6.","maxLength":20,"type":"string"},"responsible_person_name":{"description":"Name of the syndicate's contact person.","maxLength":255,"type":["string","null"]},"revision_period_years":{"description":"Years between two revisions of the study: 5 or 10.","maximum":10,"minimum":5,"type":"integer"},"syndicat_name":{"description":"Legal name of the syndicate of co-owners.","maxLength":255,"type":"string"},"unit_count":{"description":"Number of residential units.","maximum":10000,"minimum":0,"type":["integer","null"]},"year_built":{"description":"Year of construction.","maximum":2100,"minimum":1600,"type":["integer","null"]}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"building":{"address":"1200, rue King Ouest","floors_above_ground":6,"id":17,"year_built":1988}},"schema":{"additionalProperties":false,"properties":{"building":{"additionalProperties":false,"description":"A building and its identity.","properties":{"address":{"description":"Street address.","type":["string","null"]},"building_type":{"description":"Use of the building.","enum":["residential","commercial","mixed",null],"type":["string","null"]},"city":{"description":"City.","type":["string","null"]},"client_email":{"description":"Email of the syndicate's contact.","maxLength":255,"type":["string","null"]},"commercial_unit_count":{"description":"Number of commercial units.","maximum":10000,"minimum":0,"type":["integer","null"]},"copropriete_type":{"description":"Horizontal (row houses, detached units) or vertical (apartment building) co-ownership.","enum":["horizontal","vertical",null],"type":["string","null"]},"floors_above_ground":{"description":"Number of floors above ground.","maximum":200,"minimum":0,"type":["integer","null"]},"has_photo":{"description":"True when a cover photo of the building is on file.","type":"boolean"},"id":{"description":"The building's id.","minimum":1,"type":"integer"},"linked_to_macopro":{"description":"True when the building is linked to its MaCopro owners' portal account.","type":"boolean"},"neq":{"description":"Quebec enterprise number (NEQ) of the syndicate.","type":["string","null"]},"next_revision_date":{"description":"When the study is next due for revision. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"phone_number":{"description":"Phone number of the contact.","maxLength":50,"type":["string","null"]},"postal_code":{"description":"Postal code.","type":["string","null"]},"responsible_person_name":{"description":"Name of the syndicate's contact person.","maxLength":255,"type":["string","null"]},"revision_period_years":{"description":"Years between two revisions of the study (5 or 10).","type":["integer","null"]},"syndicat_name":{"description":"Name of the syndicate of co-owners.","type":["string","null"]},"unit_count":{"description":"Number of residential units.","maximum":10000,"minimum":0,"type":["integer","null"]},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":"string"},"year_built":{"description":"Year of construction.","maximum":2100,"minimum":1600,"type":["integer","null"]}},"required":["address","building_type","city","client_email","commercial_unit_count","copropriete_type","floors_above_ground","has_photo","id","linked_to_macopro","neq","next_revision_date","phone_number","postal_code","responsible_person_name","revision_period_years","syndicat_name","unit_count","updated_at","year_built"],"type":"object"}},"required":["building"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Update a building","tags":["buildings"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Update a building"},"x-roles":"every member"}},"/etudes/{etude_id}/tasks":{"get":{"description":"Lists the works (travaux: repairs and replacements) and maintenance tasks (entretiens) of an étude, oldest first, each with its component, code, intervention type, estimated cost, planned year and frequency. Filter by task_type, uniformat_code prefix or component_id. Paginated: pass next_cursor back as cursor. Use get_task for a task's description, cost lines and maintenance steps. Read-only; scheduling in financing scenarios is not shown here.","operationId":"list_tasks","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"description":"Only tasks tied to this component (see list_components).","in":"query","name":"component_id","required":false,"schema":{"description":"Only tasks tied to this component (see list_components).","minimum":1,"type":"integer"}},{"description":"The next_cursor of a previous call, to get the next page.","in":"query","name":"cursor","required":false,"schema":{"description":"The next_cursor of a previous call, to get the next page.","type":"string"}},{"description":"How many results to return (default 50).","in":"query","name":"limit","required":false,"schema":{"description":"How many results to return (default 50).","maximum":200,"minimum":1,"type":"integer"}},{"description":"Only travaux (works) or only entretien (maintenance).","in":"query","name":"task_type","required":false,"schema":{"description":"Only travaux (works) or only entretien (maintenance).","enum":["travaux","entretien"],"type":"string"}},{"description":"Only tasks whose code starts with this, e.g. B30.","in":"query","name":"uniformat_code","required":false,"schema":{"description":"Only tasks whose code starts with this, e.g. B30.","maxLength":20,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"next_cursor":null,"tasks":[{"component_id":812,"display_code":"B2020","estimated_cost":8.64e4,"estimated_year":2034,"frequency":null,"id":530,"intervention_type":"replacement","task_type":"travaux","title":"Remplacement des fenêtres","uniformat_code":"B2020"}]},"schema":{"additionalProperties":false,"properties":{"next_cursor":{"description":"Pass it as cursor to get the next page; null on the last page.","type":["string","null"]},"tasks":{"description":"The tasks, oldest first.","items":{"additionalProperties":false,"description":"A work or maintenance task, in short.","properties":{"component_id":{"description":"The component it is tied to, if any.","minimum":1,"type":["integer","null"]},"display_code":{"description":"The code as the report prints it (B2020-1 for a sub-component).","type":["string","null"]},"estimated_cost":{"description":"Estimated cost. In CAD.","minimum":0,"type":["number","null"]},"estimated_year":{"description":"Year the work is planned (travaux).","type":["integer","null"]},"frequency":{"description":"Maintenance frequency (entretien), e.g. annuelle.","type":["string","null"]},"id":{"description":"The task's id (task_id in the other tools).","minimum":1,"type":"integer"},"intervention_type":{"description":"What a travaux does to its component: major_repair, replacement, or a provision for either. Null for an entretien.","enum":["major_repair","replacement","major_repair_provision","replacement_provision",null],"type":["string","null"]},"task_type":{"description":"travaux (a work: repair or replacement) or entretien (maintenance).","enum":["travaux","entretien"],"type":"string"},"title":{"description":"Title of the task.","type":"string"},"uniformat_code":{"description":"UNIFORMAT II code of its component.","type":["string","null"]}},"required":["component_id","display_code","estimated_cost","estimated_year","frequency","id","intervention_type","task_type","title","uniformat_code"],"type":"object"},"type":"array"}},"required":["tasks","next_cursor"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"List works and maintenance","tags":["tasks"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List works and maintenance"},"x-roles":"every member"},"post":{"description":"Creates a work (task_type travaux: repair, replacement or provision) or a maintenance task (entretien) in an étude, usually tied to a component. A travaux takes an intervention type (replacement by default), a planned year, lifespan and recurrence, and a cost: estimated_cost, or cost lines (line_items) whose subtotals make it. With a planned year, a travaux is placed in the financing scenarios that pay for it. An entretien takes a frequency and recommended months. Refused with conflict when the component's matching tab is marked complete. Returns the new task.","operationId":"create_task","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"component_id":812,"estimated_year":2034,"intervention_type":"replacement","lifespan_years":30,"line_items":[{"description":"Fenêtre PVC à battant","quantity":24,"unit_price":3.6e3}],"task_type":"travaux","title":"Remplacement des fenêtres"},"schema":{"additionalProperties":false,"properties":{"component_id":{"description":"The component it is tied to (see list_components); sets its uniformat_code.","minimum":1,"type":["integer","null"]},"description":{"description":"Description printed in the report (HTML or plain text).","maxLength":50000,"type":["string","null"]},"estimated_cost":{"description":"Estimated cost; computed from line_items when they are sent. In CAD.","minimum":0,"type":["number","null"]},"estimated_year":{"description":"Year the work is planned (travaux); places it in the financing scenarios.","maximum":2200,"minimum":1900,"type":["integer","null"]},"frequency":{"description":"Maintenance frequency (entretien): semi_annuelle, annuelle, biannuelle (every 2 years), 5_ans, 10_ans, 15_ans, 20_ans or au_besoin (as needed).","enum":["semi_annuelle","annuelle","biannuelle","5_ans","10_ans","15_ans","20_ans","au_besoin",null],"type":["string","null"]},"intervention_type":{"description":"What a travaux does to its component: major_repair, replacement, or a provision for either. Null for an entretien.","enum":["major_repair","replacement","major_repair_provision","replacement_provision",null],"type":["string","null"]},"is_one_time":{"description":"True for a one-off work; false (default) when it recurs after its lifespan.","type":"boolean"},"lifespan_years":{"description":"Useful life after the work, in years.","maximum":200,"minimum":0,"type":["integer","null"]},"line_items":{"description":"Cost lines of a travaux; their subtotals make estimated_cost.","items":{"additionalProperties":false,"description":"A cost line: unit_price, or price_id, times quantity.","properties":{"description":{"description":"What the line covers.","maxLength":500,"type":["string","null"]},"price_id":{"description":"A price from the account's catalogue (see list_prices); gives the unit price when unit_price is omitted.","minimum":1,"type":["integer","null"]},"price_overridden":{"description":"True when the line keeps its own unit price instead of the catalogue's.","type":"boolean"},"quantity":{"description":"Quantity.","minimum":0,"type":"number"},"unit_price":{"description":"Unit price. In CAD.","minimum":0,"type":["number","null"]}},"required":["quantity"],"type":"object"},"maxItems":100,"type":"array"},"next_due_year":{"description":"Next due year of the maintenance.","maximum":2200,"minimum":1900,"type":["integer","null"]},"priority":{"description":"Priority.","maxLength":50,"type":["string","null"]},"private_note":{"description":"The firm's private note on the task: shown in the app only, in no report.","maxLength":20000,"type":["string","null"]},"recommended_months":{"description":"Months the maintenance should be done (1-12).","items":{"description":"A month number.","maximum":12,"minimum":1,"type":"integer"},"maxItems":12,"type":"array"},"recurrence_years":{"description":"Years between occurrences; the lifespan when null.","maximum":200,"minimum":1,"type":["integer","null"]},"responsibility":{"description":"Who carries out the maintenance: syndicat (default), coproprietaire (each co-owner) or shared.","enum":["syndicat","coproprietaire","shared"],"type":"string"},"task_type":{"description":"travaux (a work: repair, replacement) or entretien (maintenance).","enum":["travaux","entretien"],"type":"string"},"taxes_included":{"description":"True (default) when estimated_cost includes sales taxes; false to add them.","type":"boolean"},"title":{"description":"Title of the task.","maxLength":255,"minLength":1,"type":"string"},"uniformat_code":{"description":"UNIFORMAT II code, when the task is tied to no component.","maxLength":20,"type":["string","null"]}},"required":["task_type","title"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"task":{"component_id":812,"estimated_cost":8.64e4,"estimated_year":2034,"id":530,"task_type":"travaux","title":"Remplacement des fenêtres"}},"schema":{"additionalProperties":false,"properties":{"task":{"additionalProperties":false,"description":"A work or maintenance task, in full.","properties":{"component_id":{"description":"The component it is tied to, if any.","minimum":1,"type":["integer","null"]},"created_at":{"description":"When it was created. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"description":{"description":"Description printed in the report (HTML or plain text).","maxLength":50000,"type":["string","null"]},"display_code":{"description":"The code as the report prints it (B2020-1 for a sub-component).","type":["string","null"]},"estimated_cost":{"description":"Estimated cost; computed from line_items when they are sent. In CAD.","minimum":0,"type":["number","null"]},"estimated_year":{"description":"Year the work is planned (travaux); places it in the financing scenarios.","maximum":2200,"minimum":1900,"type":["integer","null"]},"frequency":{"description":"Maintenance frequency (entretien), e.g. annuelle.","type":["string","null"]},"id":{"description":"The task's id (task_id in the other tools).","minimum":1,"type":"integer"},"intervention_type":{"description":"What a travaux does to its component: major_repair, replacement, or a provision for either. Null for an entretien.","enum":["major_repair","replacement","major_repair_provision","replacement_provision",null],"type":["string","null"]},"is_one_time":{"description":"True for a one-off work; false (default) when it recurs after its lifespan.","type":"boolean"},"lifespan_years":{"description":"Useful life after the work, in years.","maximum":200,"minimum":0,"type":["integer","null"]},"line_items":{"description":"Cost lines.","items":{"additionalProperties":false,"description":"A cost line.","properties":{"description":{"description":"What the line covers.","type":["string","null"]},"id":{"description":"The line's id.","minimum":1,"type":"integer"},"price_id":{"description":"The catalogue price it came from.","minimum":1,"type":["integer","null"]},"price_overridden":{"description":"True when it keeps its own unit price.","type":"boolean"},"quantity":{"description":"Quantity.","type":["number","null"]},"subtotal":{"description":"Unit price times quantity. In CAD.","minimum":0,"type":["number","null"]},"unit_price":{"description":"Unit price. In CAD.","minimum":0,"type":["number","null"]}},"required":["description","id","price_id","price_overridden","quantity","subtotal","unit_price"],"type":"object"},"type":"array"},"maintenance_steps":{"description":"Named steps of a maintenance intervention.","items":{"additionalProperties":false,"description":"A maintenance step.","properties":{"description":{"description":"What the step involves.","type":["string","null"]},"id":{"description":"The step's id.","minimum":1,"type":"integer"},"label":{"description":"Name of the step, e.g. Inspection visuelle.","type":"string"},"position":{"description":"Order of the step.","type":"integer"}},"required":["description","id","label","position"],"type":"object"},"type":"array"},"next_due_year":{"description":"Next due year of the maintenance.","maximum":2200,"minimum":1900,"type":["integer","null"]},"priority":{"description":"Priority.","maxLength":50,"type":["string","null"]},"private_note":{"description":"The firm's private note on the task: shown in the app only, in no report.","maxLength":20000,"type":["string","null"]},"recommended_months":{"description":"Months the maintenance should be done (1-12).","items":{"description":"A month number.","type":"integer"},"type":"array"},"recurrence_years":{"description":"Years between occurrences; the lifespan when null.","maximum":200,"minimum":1,"type":["integer","null"]},"responsibility":{"description":"Who carries out the maintenance.","type":["string","null"]},"restricted_group_id":{"description":"The restricted-use group that pays for the work, when not the whole building.","minimum":1,"type":["integer","null"]},"status":{"description":"Status of the task (open by default).","type":["string","null"]},"task_type":{"description":"travaux (a work: repair or replacement) or entretien (maintenance).","enum":["travaux","entretien"],"type":"string"},"taxes_included":{"description":"True (default) when estimated_cost includes sales taxes; false to add them.","type":"boolean"},"title":{"description":"Title of the task.","type":"string"},"uniformat_code":{"description":"UNIFORMAT II code of its component.","type":["string","null"]},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]}},"required":["component_id","created_at","description","display_code","estimated_cost","estimated_year","frequency","id","intervention_type","is_one_time","lifespan_years","line_items","maintenance_steps","next_due_year","priority","private_note","recommended_months","recurrence_years","responsibility","restricted_group_id","status","task_type","taxes_included","title","uniformat_code","updated_at"],"type":"object"}},"required":["task"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Create a work or maintenance task","tags":["tasks"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Create a work or maintenance task"},"x-roles":"every member"}},"/etudes/{etude_id}/public-report-link":{"get":{"description":"Returns the étude's public report link: a URL anyone can open without an account to read the HTML report and download the generated documents put in it (set_document_in_public_report). Share it only with the syndicate's people; it stays valid until the token is regenerated in CarnetCopro's Documents tab, which these tools do not do. Also says how many documents the page offers. url is null when the étude has no public token. Read-only; not available to inspectors.","operationId":"get_public_report_link","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"documents_in_report":2,"url":"https://carnetcopro.ca/public/etudes/41?token=SFMyNTY.g2gD…"},"schema":{"additionalProperties":false,"properties":{"documents_in_report":{"description":"Generated documents the public report offers.","type":"integer"},"url":{"description":"The public report's URL, with its access token.","type":["string","null"]}},"required":["url","documents_in_report"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"Get the public report link","tags":["documents"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Get the public report link"},"x-roles":"owners, administrators and technicians"}},"/etudes/{etude_id}/groups/{group_id}/components":{"put":{"description":"Sets which components of an étude a restricted-use group bears, replacing the whole list (send [] to detach all). Attached components become restricted-use; a component already in another group moves to this one; detached ones are no longer restricted-use. The works of these components follow them: they are paid by the group and move to its scenario, or back to the building scenarios. Get component ids from list_components. Not available to inspectors.","operationId":"set_group_components","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"group_id","required":true,"schema":{"description":"The group (see list_groups).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"component_ids":[310,311]},"schema":{"additionalProperties":false,"properties":{"component_ids":{"description":"Every component the group bears, replacing the current list.","items":{"description":"A component of the étude (see list_components).","minimum":1,"type":"integer"},"maxItems":1000,"type":"array"}},"required":["component_ids"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"group":{"allocation_method":"relative_value","basis_reference":null,"components":[{"id":310,"name":"Toiture — terrasses","uniformat_code":"B3010"},{"id":311,"name":"Garde-corps","uniformat_code":"B2010"}],"id":5,"name":"Terrasses au toit","position":0,"scenario_ids":[],"starting_balance":0.0,"starting_balance_note":null,"unit_numbers":["601","602"],"works":[]}},"schema":{"additionalProperties":false,"properties":{"group":{"additionalProperties":false,"description":"A restricted-use group.","properties":{"allocation_method":{"description":"How the contribution is split.","enum":["relative_value","equal_shares"],"type":"string"},"basis_reference":{"description":"The clause of the declaration.","type":["string","null"]},"components":{"description":"The components this group bears (set with set_group_components).","items":{"additionalProperties":false,"description":"A component.","properties":{"id":{"description":"The component's id.","minimum":1,"type":"integer"},"name":{"description":"Component name, with its subcomponent label.","type":"string"},"uniformat_code":{"description":"UNIFORMAT code.","type":["string","null"]}},"required":["id","uniformat_code","name"],"type":"object"},"type":"array"},"id":{"description":"The group's id.","minimum":1,"type":"integer"},"name":{"description":"The restricted-use common portion.","type":"string"},"position":{"description":"Order in the report (0 first).","type":"integer"},"scenario_ids":{"description":"The scenario(s) computing the group's distinct contribution; create one with create_scenario and group_id.","items":{"description":"A scenario id.","minimum":1,"type":"integer"},"type":"array"},"starting_balance":{"description":"Money already set aside for the group, in CAD.","type":"number"},"starting_balance_note":{"description":"Note on the starting balance.","type":["string","null"]},"unit_numbers":{"description":"The units that bear it.","items":{"description":"A unit number.","type":"string"},"type":"array"},"works":{"description":"The works (travaux) the group pays for: those of its components.","items":{"additionalProperties":false,"description":"A work.","properties":{"estimated_year":{"description":"Planned year.","type":["integer","null"]},"id":{"description":"The work's (task's) id.","minimum":1,"type":"integer"},"title":{"description":"Title of the work.","type":["string","null"]}},"required":["id","title","estimated_year"],"type":"object"},"type":"array"}},"required":["id","name","basis_reference","allocation_method","unit_numbers","starting_balance","starting_balance_note","position","components","works","scenario_ids"],"type":"object"}},"required":["group"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Set a group's components","tags":["groups"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Set a group's components"},"x-roles":"owners, administrators and technicians"}},"/buildings/{building_id}/units/{unit_id}":{"delete":{"description":"Deletes a unit entered in CarnetCopro from a building, with its fraction; the per-unit contribution tables no longer list it. Permanent. Only units listed by get_building with units_source \"pro\" can be deleted; those read from the MaCopro owners' portal are maintained there. Does not change the building's unit_count (update_building). To correct a unit's number or fraction, delete it and add it again with add_building_unit.","operationId":"delete_building_unit","parameters":[{"in":"path","name":"building_id","required":true,"schema":{"description":"The building (see list_buildings).","minimum":1,"type":"integer"}},{"in":"path","name":"unit_id","required":true,"schema":{"description":"The unit to delete (see get_building).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"building_id":17,"deleted":true,"unit_id":301},"schema":{"additionalProperties":false,"properties":{"building_id":{"description":"Its building.","minimum":1,"type":"integer"},"deleted":{"description":"True: the unit is gone.","type":"boolean"},"unit_id":{"description":"The deleted unit's id.","minimum":1,"type":"integer"}},"required":["deleted","unit_id","building_id"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:delete"]}],"summary":"Delete a building unit","tags":["buildings"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Delete a building unit"},"x-roles":"every member"}},"/etudes/{etude_id}/components/{component_id}/photos":{"post":{"description":"Adds a photo to a component of an étude, either downloaded from an https url or sent as content_base64 with file_name and content_type. JPEG, PNG, WebP or HEIC, 10 MB at most (a base64 body is limited to about 6 MB: use url for larger files). Without deficiency_id it is a reference photo of the component (tab general by default); with deficiency_id it illustrates that constat. title is the legend printed under it. The file is stored in the firm's private storage. Refused with conflict when the tab is marked complete. Change the legend with set_photo_title.","operationId":"upload_component_photo","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"component_id","required":true,"schema":{"description":"The component photographed (see list_components).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"title":"Coupe-froid détaché, façade nord","url":"https://photos.exemple.ca/visite/fenetre-nord.jpg"},"schema":{"additionalProperties":false,"properties":{"content_base64":{"description":"The image itself, base64-encoded. Send either url or content_base64.","maxLength":11000000,"type":"string"},"content_type":{"description":"The image's type (required with content_base64).","enum":["image/jpeg","image/png","image/webp","image/heic"],"type":"string"},"deficiency_id":{"description":"A constat of this component the photo illustrates (see get_component).","minimum":1,"type":"integer"},"file_name":{"description":"The file's name, e.g. toiture-nord.jpg (required with content_base64).","maxLength":255,"type":"string"},"tab":{"description":"The editor tab the photo belongs to (default general, the reference photos). Ignored with deficiency_id.","enum":["general","specific","travaux","entretien"],"type":"string"},"title":{"description":"Legend printed under the photo.","maxLength":500,"type":"string"},"url":{"description":"An https link to the image to download. Send either url or content_base64.","maxLength":2048,"type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"photo":{"component_id":812,"content_type":"image/jpeg","deficiency_id":null,"file_name":"fenetre-nord.jpg","file_size":845211,"id":3021,"tab":"general","title":"Coupe-froid détaché, façade nord","url":"https://stockage.exemple.ca/pro-documents/3/1761660000_fenetre-nord.jpg?X-Amz-Expires=3600"}},"schema":{"additionalProperties":false,"properties":{"photo":{"additionalProperties":false,"description":"A photo of a component.","properties":{"component_id":{"description":"The component it belongs to.","minimum":1,"type":"integer"},"content_type":{"description":"MIME type, e.g. image/jpeg.","type":["string","null"]},"deficiency_id":{"description":"The constat it illustrates; null for a photo of the component itself.","minimum":1,"type":["integer","null"]},"file_name":{"description":"Original file name.","type":["string","null"]},"file_size":{"description":"Size in bytes.","type":["integer","null"]},"id":{"description":"The photo's id (photo_id in set_photo_title and delete_photo).","minimum":1,"type":"integer"},"tab":{"description":"The editor tab it was added on (general for the reference photos).","type":["string","null"]},"title":{"description":"Legend printed under the photo in the report.","type":["string","null"]},"url":{"description":"A signed link to the image, valid for about one hour; call again for a fresh one.","type":["string","null"]}},"required":["component_id","content_type","deficiency_id","file_name","file_size","id","tab","title","url"],"type":"object"}},"required":["photo"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Upload a component photo","tags":["components"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Upload a component photo"},"x-roles":"every member"}},"/document-templates":{"get":{"description":"Lists the firm's document templates (the report, its annexes, letters…), oldest first, with the free-input tags each one asks the user to fill before generating it. Use a template's id with generate_document to produce a document for an étude. Templates are edited in CarnetCopro's settings, not through these tools. Read-only; takes no arguments; not available to inspectors.","operationId":"list_document_templates","parameters":[],"responses":{"200":{"content":{"application/json":{"example":{"templates":[{"description":"Rapport complet","free_input_names":["mot_du_president"],"has_current_version":true,"id":3,"template_type":"etude_report","title":"Étude du fonds de prévoyance"}]},"schema":{"additionalProperties":false,"properties":{"templates":{"description":"The templates.","items":{"additionalProperties":false,"description":"A document template.","properties":{"description":{"description":"What the template is for.","type":["string","null"]},"free_input_names":{"description":"The free-input tags the template asks for, filled through generate_document's free_inputs.","items":{"description":"A free-input tag name.","type":"string"},"type":"array"},"has_current_version":{"description":"False when the template has no current version yet: it cannot be generated.","type":"boolean"},"id":{"description":"The template's id.","minimum":1,"type":"integer"},"template_type":{"description":"Kind of document, e.g. etude_report.","type":"string"},"title":{"description":"Title of the template.","type":"string"}},"required":["id","title","description","template_type","has_current_version","free_input_names"],"type":"object"},"type":"array"}},"required":["templates"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"List document templates","tags":["documents"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List document templates"},"x-roles":"owners, administrators and technicians"}},"/etudes/{etude_id}/components":{"get":{"description":"Lists the components (composantes) of an étude in UNIFORMAT II order: each canonical component of a code, then its sub-components, with the code as printed (B2020-1), general condition, installation year, lifespan, whether it is in the report's scope and which editor tabs are marked complete. Filter by uniformat_code prefix (e.g. B20), completion (complete or incomplete) or selected_in_report. Paginated: pass next_cursor back as cursor. Use get_component for a component's details, measurements, photos, constats and tasks. Read-only.","operationId":"list_components","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"description":"complete: all four tabs marked complete; incomplete: at least one open.","in":"query","name":"completion","required":false,"schema":{"description":"complete: all four tabs marked complete; incomplete: at least one open.","enum":["complete","incomplete"],"type":"string"}},{"description":"The next_cursor of a previous call, to get the next page.","in":"query","name":"cursor","required":false,"schema":{"description":"The next_cursor of a previous call, to get the next page.","type":"string"}},{"description":"How many results to return (default 50).","in":"query","name":"limit","required":false,"schema":{"description":"How many results to return (default 50).","maximum":200,"minimum":1,"type":"integer"}},{"description":"true: only components in the report's scope; false: only those outside it.","in":"query","name":"selected_in_report","required":false,"schema":{"description":"true: only components in the report's scope; false: only those outside it.","type":"boolean"}},{"description":"Only components whose code starts with this, e.g. B20 or B2020.","in":"query","name":"uniformat_code","required":false,"schema":{"description":"Only components whose code starts with this, e.g. B20 or B2020.","maxLength":20,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"components":[{"completed_at":null,"completed_tabs":["general"],"condition":"passable","display_code":"B2020","element_name":"Fenêtres extérieures","id":812,"is_subcomponent":false,"lifespan_years":30,"selected_in_report":true,"subcomponent_label":null,"subcomponent_number":null,"uniformat_code":"B2020","year_of_installation":2004}],"next_cursor":null},"schema":{"additionalProperties":false,"properties":{"components":{"description":"The components, in code order.","items":{"additionalProperties":false,"description":"A component of the étude, in short.","properties":{"completed_at":{"description":"When all four tabs were marked complete; null until then. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"completed_tabs":{"description":"Editor tabs marked complete: general (Description), specific (Constats), travaux, entretien. A complete tab no longer changes until reopened.","items":{"description":"An editor tab.","enum":["general","specific","travaux","entretien"],"type":"string"},"type":"array"},"condition":{"description":"General condition. One of the account's condition_states values (get_account_context); by default bon, passable, mauvais, non_visible when it could not be seen, na when outside the study's scope.","type":["string","null"]},"display_code":{"description":"The code as the report prints it: B2020, or B2020-1 for a sub-component.","type":"string"},"element_name":{"description":"The UNIFORMAT element's name.","type":["string","null"]},"id":{"description":"The component's id (component_id in the other tools).","minimum":1,"type":"integer"},"is_subcomponent":{"description":"True for a sub-component added under a code (it can be deleted).","type":"boolean"},"lifespan_years":{"description":"Retained useful life, in years.","type":["integer","null"]},"selected_in_report":{"description":"True when the component is in the report's scope (see set_report_scope).","type":"boolean"},"subcomponent_label":{"description":"The sub-component's own label; null on the canonical component of the code.","type":["string","null"]},"subcomponent_number":{"description":"The sub-component's number under its code; null on the canonical component.","type":["integer","null"]},"uniformat_code":{"description":"Its UNIFORMAT II code, e.g. B2020.","type":"string"},"year_of_installation":{"description":"Year of installation.","type":["integer","null"]}},"required":["completed_at","completed_tabs","condition","display_code","element_name","id","is_subcomponent","lifespan_years","selected_in_report","subcomponent_label","subcomponent_number","uniformat_code","year_of_installation"],"type":"object"},"type":"array"},"next_cursor":{"description":"Pass it as cursor to get the next page; null on the last page.","type":["string","null"]}},"required":["components","next_cursor"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"List components","tags":["components"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List components"},"x-roles":"every member"},"post":{"description":"Adds a sub-component under a UNIFORMAT code of an étude, e.g. a second B2020 entry labelled « Fenêtres en PVC », numbered B2020-1, B2020-2… It joins the report's scope, and the account's other études offer it too (unselected). The code must be one of the étude's components (list_components). Returns the new component; fill it with update_component. Does not create canonical components, which every étude already has.","operationId":"add_subcomponent","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"label":"Fenêtres en PVC","uniformat_code":"B2020"},"schema":{"additionalProperties":false,"properties":{"label":{"description":"The sub-component's label, e.g. Fenêtres en PVC.","maxLength":255,"minLength":1,"type":"string"},"uniformat_code":{"description":"The UNIFORMAT II code it goes under, e.g. B2020 (see list_components).","maxLength":20,"minLength":1,"type":"string"}},"required":["uniformat_code","label"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"component":{"completed_at":null,"completed_tabs":[],"condition":null,"display_code":"B2020-1","element_name":"Fenêtres extérieures","id":1290,"is_subcomponent":true,"lifespan_years":null,"selected_in_report":true,"subcomponent_label":"Fenêtres en PVC","subcomponent_number":1,"uniformat_code":"B2020","year_of_installation":null}},"schema":{"additionalProperties":false,"properties":{"component":{"additionalProperties":false,"description":"A component of the étude, in short.","properties":{"completed_at":{"description":"When all four tabs were marked complete; null until then. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"completed_tabs":{"description":"Editor tabs marked complete: general (Description), specific (Constats), travaux, entretien. A complete tab no longer changes until reopened.","items":{"description":"An editor tab.","enum":["general","specific","travaux","entretien"],"type":"string"},"type":"array"},"condition":{"description":"General condition. One of the account's condition_states values (get_account_context); by default bon, passable, mauvais, non_visible when it could not be seen, na when outside the study's scope.","type":["string","null"]},"display_code":{"description":"The code as the report prints it: B2020, or B2020-1 for a sub-component.","type":"string"},"element_name":{"description":"The UNIFORMAT element's name.","type":["string","null"]},"id":{"description":"The component's id (component_id in the other tools).","minimum":1,"type":"integer"},"is_subcomponent":{"description":"True for a sub-component added under a code (it can be deleted).","type":"boolean"},"lifespan_years":{"description":"Retained useful life, in years.","type":["integer","null"]},"selected_in_report":{"description":"True when the component is in the report's scope (see set_report_scope).","type":"boolean"},"subcomponent_label":{"description":"The sub-component's own label; null on the canonical component of the code.","type":["string","null"]},"subcomponent_number":{"description":"The sub-component's number under its code; null on the canonical component.","type":["integer","null"]},"uniformat_code":{"description":"Its UNIFORMAT II code, e.g. B2020.","type":"string"},"year_of_installation":{"description":"Year of installation.","type":["integer","null"]}},"required":["completed_at","completed_tabs","condition","display_code","element_name","id","is_subcomponent","lifespan_years","selected_in_report","subcomponent_label","subcomponent_number","uniformat_code","year_of_installation"],"type":"object"}},"required":["component"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Add a sub-component","tags":["components"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Add a sub-component"},"x-roles":"every member"}},"/etudes/{etude_id}/attendees/{attendee_id}":{"delete":{"description":"Removes a person from those present at the inspection of an étude; the report no longer lists them. Permanent. The attendee ids are in get_etude. To correct a name or capacity, remove the attendee and add them again with add_etude_attendee. Does not affect account members or signatories.","operationId":"remove_etude_attendee","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"attendee_id","required":true,"schema":{"description":"The attendee to remove (see get_etude).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"attendee_id":5,"deleted":true,"etude_id":41},"schema":{"additionalProperties":false,"properties":{"attendee_id":{"description":"The removed attendee's id.","minimum":1,"type":"integer"},"deleted":{"description":"True: the attendee is gone.","type":"boolean"},"etude_id":{"description":"The étude.","minimum":1,"type":"integer"}},"required":["deleted","attendee_id","etude_id"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:delete"]}],"summary":"Remove an inspection attendee","tags":["etudes"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Remove an inspection attendee"},"x-roles":"every member"}},"/etudes/{etude_id}/history":{"get":{"description":"Lists the recorded changes of an étude, newest first: when, who, what kind of record (etude_item for a component, attachment for a photo, …), its id, the action (create, update, delete, complete) and the changed values. Paginated: pass next_cursor back as cursor. Use it to see who changed a component and when. Only the changes the app records appear (mainly component edits and photos); it cannot undo anything. Read-only.","operationId":"get_etude_history","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"description":"The next_cursor of a previous call, to get the next page.","in":"query","name":"cursor","required":false,"schema":{"description":"The next_cursor of a previous call, to get the next page.","type":"string"}},{"description":"How many results to return (default 50).","in":"query","name":"limit","required":false,"schema":{"description":"How many results to return (default 50).","maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"entries":[{"action":"update","at":"2026-10-20T14:03:11Z","changes":{"lifespan_years":25},"entity_id":3310,"entity_type":"etude_item","id":908,"user":{"email":"marie@exemple.ca","id":12,"name":"Marie Tremblay"}}],"next_cursor":null},"schema":{"additionalProperties":false,"properties":{"entries":{"description":"The changes, newest first.","items":{"additionalProperties":false,"description":"A recorded change.","properties":{"action":{"description":"create, update, delete or complete.","type":["string","null"]},"at":{"description":"When the change was made. ISO 8601 date-time, UTC.","format":"date-time","type":"string"},"changes":{"description":"The changed values, as recorded.","type":"object"},"entity_id":{"description":"Id of the record that changed.","type":["integer","null"]},"entity_type":{"description":"What changed: etude, etude_item, attachment, …","type":["string","null"]},"id":{"description":"The entry's id.","minimum":1,"type":"integer"},"user":{"additionalProperties":false,"description":"Who made it; null for the system.","properties":{"email":{"description":"Email address.","type":"string"},"id":{"description":"The member's id.","minimum":1,"type":"integer"},"name":{"description":"Full name.","type":"string"}},"required":["id","name","email"],"type":["object","null"]}},"required":["id","at","user","entity_type","entity_id","action","changes"],"type":"object"},"type":"array"},"next_cursor":{"description":"Pass it as cursor to get the next page; null on the last page.","type":["string","null"]}},"required":["entries","next_cursor"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"Get an étude's history","tags":["etudes"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Get an étude's history"},"x-roles":"every member"}},"/context":{"get":{"description":"Returns who you are acting for in CarnetCopro: the signed-in member, their firm's account, their role, the scopes this connection may use (granted at sign-in, capped by the access an administrator gave the member), the firm's sales tax rates and the condition states (états) a constat can take. Call it first in a session: the role says which other tools are available (inspectors cannot use group, scenario, report or document tools; only owners and administrators set an étude's access). Read-only; takes no arguments.","operationId":"get_account_context","parameters":[],"responses":{"200":{"content":{"application/json":{"example":{"account":{"id":3,"name":"Inspections Tremblay inc."},"condition_states":[{"label":"Bon","value":"bon"},{"label":"Passable","value":"passable"}],"constat_states":[{"label":"Recommandations","value":"recommandations"},{"label":"À surveiller","value":"a_surveiller"}],"full_access":true,"role":"admin","scopes":["etudes:read","etudes:write"],"tax_rates":{"gst":5.0,"qst":9.975},"user":{"email":"marie@exemple.ca","id":12,"name":"Marie Tremblay"}},"schema":{"additionalProperties":false,"properties":{"account":{"additionalProperties":false,"description":"The firm's account every call works in.","properties":{"id":{"description":"The account's id.","minimum":1,"type":"integer"},"name":{"description":"The firm's name.","type":"string"}},"required":["id","name"],"type":"object"},"condition_states":{"description":"The general condition states a component can take, in order.","items":{"additionalProperties":false,"properties":{"label":{"description":"Label shown in the report.","type":"string"},"value":{"description":"Value to send as a component's condition.","type":"string"}},"required":["value","label"],"type":"object"},"type":"array"},"constat_states":{"description":"The condition states a constat can take, in order.","items":{"additionalProperties":false,"properties":{"label":{"description":"Label shown in the report.","type":"string"},"value":{"description":"Value to send as a constat's state.","type":"string"}},"required":["value","label"],"type":"object"},"type":"array"},"full_access":{"description":"True for owners and administrators: every tool is available, set_etude_access included.","type":"boolean"},"role":{"description":"The member's role in the account.","enum":["owner","admin","technician","inspector"],"type":"string"},"scopes":{"description":"What this connection may do.","items":{"description":"A scope.","enum":["etudes:read","etudes:write","etudes:delete"],"type":"string"},"type":"array"},"tax_rates":{"additionalProperties":false,"description":"Sales taxes applied to costs.","properties":{"gst":{"description":"GST (TPS) in percent.","type":"number"},"qst":{"description":"QST (TVQ) in percent.","type":"number"}},"required":["gst","qst"],"type":"object"},"user":{"additionalProperties":false,"description":"The signed-in member.","properties":{"email":{"description":"Email address.","type":"string"},"id":{"description":"The member's id.","minimum":1,"type":"integer"},"name":{"description":"Full name.","type":"string"}},"required":["id","name","email"],"type":["object","null"]}},"required":["user","account","role","full_access","scopes","tax_rates","constat_states","condition_states"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"Get account context","tags":["context"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Get account context"},"x-roles":"every member"}},"/etudes/{etude_id}/groups":{"get":{"description":"Lists the restricted-use groups of an étude, in report order: the co-owners who alone bear the major repairs of one restricted-use common portion under a clause of the declaration (e.g. rooftop terraces of units 601-604). Each group comes with its units, allocation method, starting balance, the components it bears, the works it pays for and its scenario ids. The report prints one distinct-contribution block per group. Read-only; not available to inspectors. Create one with create_group; compute its contribution with create_scenario and group_id.","operationId":"list_groups","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"groups":[{"allocation_method":"relative_value","basis_reference":"Déclaration, art. 8.6","components":[{"id":310,"name":"Toiture — terrasses","uniformat_code":"B3010"}],"id":5,"name":"Terrasses au toit","position":0,"scenario_ids":[77],"starting_balance":0.0,"starting_balance_note":null,"unit_numbers":["601","602","603","604"],"works":[{"estimated_year":2031,"id":902,"title":"Réfection des terrasses"}]}]},"schema":{"additionalProperties":false,"properties":{"groups":{"description":"The groups, in report order.","items":{"additionalProperties":false,"description":"A restricted-use group.","properties":{"allocation_method":{"description":"How the contribution is split.","enum":["relative_value","equal_shares"],"type":"string"},"basis_reference":{"description":"The clause of the declaration.","type":["string","null"]},"components":{"description":"The components this group bears (set with set_group_components).","items":{"additionalProperties":false,"description":"A component.","properties":{"id":{"description":"The component's id.","minimum":1,"type":"integer"},"name":{"description":"Component name, with its subcomponent label.","type":"string"},"uniformat_code":{"description":"UNIFORMAT code.","type":["string","null"]}},"required":["id","uniformat_code","name"],"type":"object"},"type":"array"},"id":{"description":"The group's id.","minimum":1,"type":"integer"},"name":{"description":"The restricted-use common portion.","type":"string"},"position":{"description":"Order in the report (0 first).","type":"integer"},"scenario_ids":{"description":"The scenario(s) computing the group's distinct contribution; create one with create_scenario and group_id.","items":{"description":"A scenario id.","minimum":1,"type":"integer"},"type":"array"},"starting_balance":{"description":"Money already set aside for the group, in CAD.","type":"number"},"starting_balance_note":{"description":"Note on the starting balance.","type":["string","null"]},"unit_numbers":{"description":"The units that bear it.","items":{"description":"A unit number.","type":"string"},"type":"array"},"works":{"description":"The works (travaux) the group pays for: those of its components.","items":{"additionalProperties":false,"description":"A work.","properties":{"estimated_year":{"description":"Planned year.","type":["integer","null"]},"id":{"description":"The work's (task's) id.","minimum":1,"type":"integer"},"title":{"description":"Title of the work.","type":["string","null"]}},"required":["id","title","estimated_year"],"type":"object"},"type":"array"}},"required":["id","name","basis_reference","allocation_method","unit_numbers","starting_balance","starting_balance_note","position","components","works","scenario_ids"],"type":"object"},"type":"array"}},"required":["groups"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"List restricted-use groups","tags":["groups"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List restricted-use groups"},"x-roles":"owners, administrators and technicians"},"post":{"description":"Adds a restricted-use group to an étude: the units whose co-owners alone bear the major repairs of one restricted-use common portion, per a clause of the declaration (C.c.Q. 1064). It is placed after the existing groups in the report. A new group has no components: attach them with set_group_components (their works then move to the group's scenario), then create its scenario with create_scenario and group_id. Not available to inspectors.","operationId":"create_group","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"allocation_method":"relative_value","basis_reference":"Déclaration, art. 8.6","name":"Terrasses au toit","unit_numbers":["601","602","603","604"]},"schema":{"additionalProperties":false,"properties":{"allocation_method":{"description":"How the group's contribution is split among its units: by relative value (the default under the Civil Code) or in equal shares.","enum":["relative_value","equal_shares"],"type":"string"},"basis_reference":{"description":"The clause of the declaration it rests on, e.g. « Déclaration, art. 8.6 ».","maxLength":500,"type":["string","null"]},"name":{"description":"The restricted-use common portion, e.g. « Terrasses au toit ».","maxLength":255,"minLength":1,"type":"string"},"starting_balance":{"description":"Money already set aside for the group (usually 0). In CAD.","minimum":0,"type":["number","null"]},"starting_balance_note":{"description":"A note on that balance, printed in the report.","maxLength":2000,"type":["string","null"]},"unit_numbers":{"description":"The units whose co-owners alone bear this portion's major repairs; at least one.","items":{"description":"A unit number, as in the building's units.","maxLength":50,"minLength":1,"type":"string"},"maxItems":500,"type":"array"}},"required":["name","unit_numbers"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"group":{"allocation_method":"relative_value","basis_reference":"Déclaration, art. 8.6","components":[],"id":5,"name":"Terrasses au toit","position":0,"scenario_ids":[],"starting_balance":0.0,"starting_balance_note":null,"unit_numbers":["601","602","603","604"],"works":[]}},"schema":{"additionalProperties":false,"properties":{"group":{"additionalProperties":false,"description":"A restricted-use group.","properties":{"allocation_method":{"description":"How the contribution is split.","enum":["relative_value","equal_shares"],"type":"string"},"basis_reference":{"description":"The clause of the declaration.","type":["string","null"]},"components":{"description":"The components this group bears (set with set_group_components).","items":{"additionalProperties":false,"description":"A component.","properties":{"id":{"description":"The component's id.","minimum":1,"type":"integer"},"name":{"description":"Component name, with its subcomponent label.","type":"string"},"uniformat_code":{"description":"UNIFORMAT code.","type":["string","null"]}},"required":["id","uniformat_code","name"],"type":"object"},"type":"array"},"id":{"description":"The group's id.","minimum":1,"type":"integer"},"name":{"description":"The restricted-use common portion.","type":"string"},"position":{"description":"Order in the report (0 first).","type":"integer"},"scenario_ids":{"description":"The scenario(s) computing the group's distinct contribution; create one with create_scenario and group_id.","items":{"description":"A scenario id.","minimum":1,"type":"integer"},"type":"array"},"starting_balance":{"description":"Money already set aside for the group, in CAD.","type":"number"},"starting_balance_note":{"description":"Note on the starting balance.","type":["string","null"]},"unit_numbers":{"description":"The units that bear it.","items":{"description":"A unit number.","type":"string"},"type":"array"},"works":{"description":"The works (travaux) the group pays for: those of its components.","items":{"additionalProperties":false,"description":"A work.","properties":{"estimated_year":{"description":"Planned year.","type":["integer","null"]},"id":{"description":"The work's (task's) id.","minimum":1,"type":"integer"},"title":{"description":"Title of the work.","type":["string","null"]}},"required":["id","title","estimated_year"],"type":"object"},"type":"array"}},"required":["id","name","basis_reference","allocation_method","unit_numbers","starting_balance","starting_balance_note","position","components","works","scenario_ids"],"type":"object"}},"required":["group"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Create a restricted-use group","tags":["groups"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Create a restricted-use group"},"x-roles":"owners, administrators and technicians"}},"/etudes/{etude_id}/documents":{"get":{"description":"Lists the documents generated for an étude, newest first, with their PDF status (pending, ready, failed) and whether the public report offers them. Use get_generated_document for one document's download URL, generate_document for a new one. Read-only; not available to inspectors.","operationId":"list_generated_documents","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"documents":[{"generated_at":"2026-10-30T15:02:11Z","id":120,"in_public_report":true,"pdf_failed_reason":null,"pdf_status":"ready","template_id":3,"title":"Étude du fonds de prévoyance — 1200, rue King Ouest"}]},"schema":{"additionalProperties":false,"properties":{"documents":{"description":"The documents, newest first.","items":{"additionalProperties":false,"description":"A generated document.","properties":{"generated_at":{"description":"When it was generated. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"id":{"description":"The generated document's id.","minimum":1,"type":"integer"},"in_public_report":{"description":"Offered by the étude's public report link.","type":"boolean"},"pdf_failed_reason":{"description":"Why the PDF failed.","type":["string","null"]},"pdf_status":{"description":"pending: the PDF is being rendered (poll get_generated_document); ready: download_url is available; failed: see pdf_failed_reason.","enum":["pending","ready","failed"],"type":"string"},"template_id":{"description":"The template it was generated from.","minimum":1,"type":["integer","null"]},"title":{"description":"Title: the template's and the building's address.","type":["string","null"]}},"required":["generated_at","id","in_public_report","pdf_failed_reason","pdf_status","template_id","title"],"type":"object"},"type":"array"}},"required":["documents"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"List generated documents","tags":["documents"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List generated documents"},"x-roles":"owners, administrators and technicians"},"post":{"description":"Generates a document for an étude from a template (see list_document_templates), with the étude's current data, and starts rendering its PDF in the background. Returns at once with pdf_status pending: poll get_generated_document every few seconds until it is ready (then it gives a download URL) or failed. report_date is the date printed on the document (default today). free_inputs fills the template's free-input tags; the values are saved on the étude and reused next time. The new document is included in the public report (set_document_in_public_report to change). Generating again makes a new document; earlier ones stay. Not available to inspectors.","operationId":"generate_document","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"free_inputs":{"mot_du_president":"<p>Merci au conseil.</p>"},"report_date":"2026-10-30","template_id":3},"schema":{"additionalProperties":false,"properties":{"free_inputs":{"description":"Values of the template's free-input tags, as {tag name: text or simple HTML}; names from list_document_templates.","type":"object"},"report_date":{"description":"Date printed on the document; default today. ISO 8601 date (YYYY-MM-DD).","format":"date","type":"string"},"template_id":{"description":"The template (see list_document_templates).","minimum":1,"type":"integer"}},"required":["template_id"],"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"example":{"document":{"generated_at":"2026-10-30T15:02:11Z","id":120,"in_public_report":true,"pdf_failed_reason":null,"pdf_status":"pending","template_id":3,"title":"Étude du fonds de prévoyance — 1200, rue King Ouest"},"missing_free_inputs":[]},"schema":{"additionalProperties":false,"properties":{"document":{"additionalProperties":false,"description":"A generated document.","properties":{"generated_at":{"description":"When it was generated. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"id":{"description":"The generated document's id.","minimum":1,"type":"integer"},"in_public_report":{"description":"Offered by the étude's public report link.","type":"boolean"},"pdf_failed_reason":{"description":"Why the PDF failed.","type":["string","null"]},"pdf_status":{"description":"pending: the PDF is being rendered (poll get_generated_document); ready: download_url is available; failed: see pdf_failed_reason.","enum":["pending","ready","failed"],"type":"string"},"template_id":{"description":"The template it was generated from.","minimum":1,"type":["integer","null"]},"title":{"description":"Title: the template's and the building's address.","type":["string","null"]}},"required":["generated_at","id","in_public_report","pdf_failed_reason","pdf_status","template_id","title"],"type":"object"},"missing_free_inputs":{"description":"Free-input tags of the template still empty on the étude (printed blank).","items":{"description":"A free-input tag name.","type":"string"},"type":"array"}},"required":["document","missing_free_inputs"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Generate a document","tags":["documents"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Generate a document"},"x-roles":"owners, administrators and technicians"}},"/etudes/{etude_id}/financial-basis":{"patch":{"description":"Sets the financial basis every building scenario of an étude starts from: the reserve fund balance, the current yearly contribution, the safety threshold, and the inflation and investment return rates. The values are kept on the étude, for scenarios created later, and copied onto each existing building scenario at once, completed ones included (the fund balance becomes their opening balance). A building scenario may then depart from it through update_scenario; this call overwrites such changes. Restricted-use group scenarios keep their own values (update_scenario). Send the three amounts: a missing or null one is cleared. The rates are optional: one left out keeps the étude's, and is still applied to every building scenario. Not available to inspectors.","operationId":"update_financial_basis","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"current_annual_contribution":38000,"fund_balance":184500,"safety_threshold":25000},"schema":{"additionalProperties":false,"properties":{"current_annual_contribution":{"description":"Yearly contribution paid to the fund today. In CAD.","minimum":0,"type":["number","null"]},"fund_balance":{"description":"Reserve fund balance reported by the syndicate. In CAD.","minimum":0,"type":["number","null"]},"inflation_rate":{"description":"Yearly inflation applied to work costs, in percent (e.g. 3).","maximum":99.99,"minimum":0,"type":"number"},"investment_return_rate":{"description":"Yearly return on the fund's average balance, in percent.","maximum":99.99,"minimum":0,"type":"number"},"safety_threshold":{"description":"Minimum balance the fund must keep; below it, a special contribution. In CAD.","minimum":0,"type":["number","null"]}},"required":["fund_balance","current_annual_contribution","safety_threshold"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"current_annual_contribution":3.8e4,"fund_balance":1.845e5,"inflation_rate":3.0,"investment_return_rate":1.5,"safety_threshold":2.5e4,"scenarios":[{"annual_contribution":6.2e4,"completed_at":null,"contribution_ramp_years":3,"contribution_rate":2.0,"current_annual_contribution":3.8e4,"duration_years":25,"end_month":"2051-12","group_id":null,"id":77,"inflation_rate":3.0,"initial_balance":1.845e5,"investment_return_rate":1.5,"is_base":false,"is_recommended":false,"locked":false,"name":"Scénario recommandé","safety_threshold":2.5e4,"scope":"building","start_month":"2027-01","unit_numbers":[],"updated_at":"2026-10-20T14:03:11Z"}]},"schema":{"additionalProperties":false,"properties":{"current_annual_contribution":{"description":"Current yearly contribution, in CAD.","type":["number","null"]},"fund_balance":{"description":"Reserve fund balance, in CAD.","type":["number","null"]},"inflation_rate":{"description":"Yearly inflation, in percent.","type":"number"},"investment_return_rate":{"description":"Yearly return on the fund, in percent.","type":"number"},"safety_threshold":{"description":"Safety threshold, in CAD.","type":["number","null"]},"scenarios":{"description":"The étude's building scenarios, as updated.","items":{"additionalProperties":false,"description":"A financing scenario.","properties":{"annual_contribution":{"description":"Target yearly contribution (reached after the ramp), in CAD.","type":"number"},"completed_at":{"description":"When it was marked completed. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"contribution_ramp_years":{"description":"Years taken to go from the current contribution to the target, in equal steps.","type":"integer"},"contribution_rate":{"description":"Yearly increase of the contribution after the ramp, in percent.","type":["number","null"]},"current_annual_contribution":{"description":"Contribution paid today, in CAD.","type":["number","null"]},"duration_years":{"description":"Length of the projection in years.","type":["integer","null"]},"end_month":{"description":"End of the projection. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":"string"},"group_id":{"description":"The restricted-use group, for a group scenario.","minimum":1,"type":["integer","null"]},"id":{"description":"The scenario's id.","minimum":1,"type":"integer"},"inflation_rate":{"description":"Yearly inflation applied to work costs, in percent.","type":"number"},"initial_balance":{"description":"Fund balance at the start, in CAD.","type":"number"},"investment_return_rate":{"description":"Yearly return on the fund's average balance, in percent.","type":["number","null"]},"is_base":{"description":"The étude's base scenario: one per étude, created with it and never deleted. Placing a work in it, or moving the work's first occurrence, sets the work's estimated_year (« Année prévue »); taking the work out clears it.","type":"boolean"},"is_recommended":{"description":"The étude's recommended strategy (at most one building scenario).","type":"boolean"},"locked":{"description":"Completed, so read only: hypotheses, works and deletion are refused until reopened with update_scenario completed=false.","type":"boolean"},"name":{"description":"Name of the scenario.","type":"string"},"safety_threshold":{"description":"Minimum balance; a year falling below it gets a special contribution, in CAD.","type":["number","null"]},"scope":{"description":"building: a strategy for the whole reserve fund; group: the distinct contribution of a restricted-use group.","enum":["building","group"],"type":"string"},"start_month":{"description":"First month of the projection. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":"string"},"unit_numbers":{"description":"Units paying it (a group scenario); empty for the building.","items":{"description":"A unit number.","type":"string"},"type":"array"},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":"string"}},"required":["annual_contribution","completed_at","contribution_ramp_years","contribution_rate","current_annual_contribution","duration_years","end_month","group_id","id","inflation_rate","initial_balance","investment_return_rate","is_base","is_recommended","locked","name","safety_threshold","scope","start_month","unit_numbers","updated_at"],"type":"object"},"type":"array"}},"required":["fund_balance","current_annual_contribution","safety_threshold","inflation_rate","investment_return_rate","scenarios"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Update the financial basis","tags":["financing"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Update the financial basis"},"x-roles":"owners, administrators and technicians"}},"/etudes/{etude_id}/documents/{document_id}":{"delete":{"description":"Deletes a document generated for an étude, and its stored PDF. It disappears from the public report and its download links stop working. The template and the étude are unchanged; generate_document makes a new one. Cannot be undone; to only hide it from the public report, use set_document_in_public_report. Not available to inspectors.","operationId":"delete_generated_document","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"document_id","required":true,"schema":{"description":"The generated document to delete (see list_generated_documents).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"deleted":true,"document_id":120},"schema":{"additionalProperties":false,"properties":{"deleted":{"description":"True once deleted.","type":"boolean"},"document_id":{"description":"The deleted document's id.","minimum":1,"type":"integer"}},"required":["deleted","document_id"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:delete"]}],"summary":"Delete a generated document","tags":["documents"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Delete a generated document"},"x-roles":"owners, administrators and technicians"},"get":{"description":"Returns one document generated for an étude with its PDF status. Once pdf_status is ready it includes download_url, a signed link to the PDF valid about one hour (call again for a fresh one); while pending, call again in a few seconds; failed gives pdf_failed_reason (generate_document again after fixing the cause). Read-only; not available to inspectors. List documents with list_generated_documents.","operationId":"get_generated_document","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"document_id","required":true,"schema":{"description":"The generated document (see list_generated_documents).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"document":{"download_url":"https://files.carnetcopro.ca/pdfs/120.pdf?X-Amz-Signature=…","generated_at":"2026-10-30T15:02:11Z","id":120,"in_public_report":true,"pdf_failed_reason":null,"pdf_status":"ready","template_id":3,"title":"Étude du fonds de prévoyance — 1200, rue King Ouest"}},"schema":{"additionalProperties":false,"properties":{"document":{"additionalProperties":false,"description":"A generated document.","properties":{"download_url":{"description":"When the PDF is ready: a signed URL to download it, valid about one hour; null otherwise.","type":["string","null"]},"generated_at":{"description":"When it was generated. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"id":{"description":"The generated document's id.","minimum":1,"type":"integer"},"in_public_report":{"description":"Offered by the étude's public report link.","type":"boolean"},"pdf_failed_reason":{"description":"Why the PDF failed.","type":["string","null"]},"pdf_status":{"description":"pending: the PDF is being rendered (poll get_generated_document); ready: download_url is available; failed: see pdf_failed_reason.","enum":["pending","ready","failed"],"type":"string"},"template_id":{"description":"The template it was generated from.","minimum":1,"type":["integer","null"]},"title":{"description":"Title: the template's and the building's address.","type":["string","null"]}},"required":["download_url","generated_at","id","in_public_report","pdf_failed_reason","pdf_status","template_id","title"],"type":"object"}},"required":["document"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"Get a generated document","tags":["documents"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Get a generated document"},"x-roles":"owners, administrators and technicians"}},"/etudes/{etude_id}/photos/{photo_id}":{"delete":{"description":"Deletes a photo of a component or of a constat, with its stored file. Cannot be undone. Refused with conflict when the photo's editor tab is marked complete. Find photo ids with get_component. Does not delete the constat it illustrates (delete_deficiency) nor the component's other photos.","operationId":"delete_photo","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"photo_id","required":true,"schema":{"description":"The photo to delete (see get_component).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"deleted":true,"photo_id":3021},"schema":{"additionalProperties":false,"properties":{"deleted":{"description":"True when the photo was deleted.","type":"boolean"},"photo_id":{"description":"The deleted photo's id.","minimum":1,"type":"integer"}},"required":["deleted","photo_id"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:delete"]}],"summary":"Delete a photo","tags":["components"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Delete a photo"},"x-roles":"every member"},"patch":{"description":"Sets the legend of a component's or a constat's photo: the line printed under it in the report. Send null or an empty string to remove it. Refused with conflict when the photo's editor tab is marked complete. Find photo ids with get_component. Does not replace the image itself; delete_photo then upload_component_photo for that.","operationId":"set_photo_title","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"photo_id","required":true,"schema":{"description":"The photo (see get_component).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"title":"Coupe-froid détaché"},"schema":{"additionalProperties":false,"properties":{"title":{"description":"The legend; null or empty removes it.","maxLength":500,"type":["string","null"]}},"required":["title"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"photo":{"component_id":812,"content_type":"image/jpeg","deficiency_id":null,"file_name":"fenetre-nord.jpg","file_size":845211,"id":3021,"tab":"general","title":"Coupe-froid détaché","url":null}},"schema":{"additionalProperties":false,"properties":{"photo":{"additionalProperties":false,"description":"A photo of a component.","properties":{"component_id":{"description":"The component it belongs to.","minimum":1,"type":"integer"},"content_type":{"description":"MIME type, e.g. image/jpeg.","type":["string","null"]},"deficiency_id":{"description":"The constat it illustrates; null for a photo of the component itself.","minimum":1,"type":["integer","null"]},"file_name":{"description":"Original file name.","type":["string","null"]},"file_size":{"description":"Size in bytes.","type":["integer","null"]},"id":{"description":"The photo's id (photo_id in set_photo_title and delete_photo).","minimum":1,"type":"integer"},"tab":{"description":"The editor tab it was added on (general for the reference photos).","type":["string","null"]},"title":{"description":"Legend printed under the photo in the report.","type":["string","null"]},"url":{"description":"A signed link to the image, valid for about one hour; call again for a fresh one.","type":["string","null"]}},"required":["component_id","content_type","deficiency_id","file_name","file_size","id","tab","title","url"],"type":"object"}},"required":["photo"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Set a photo's legend","tags":["components"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Set a photo's legend"},"x-roles":"every member"}},"/etudes/{etude_id}/documents-consulted/{document_id}":{"patch":{"description":"Records what came of a document requested from the syndicate for an étude: whether it was obtained (yes, no, partial, or none when it does not exist for this building) and whether the syndicate must gather it before the next revision. Only the fields you send change. The report's annex prints both. Document ids come from list_documents_consulted. Does not upload or remove the document's files, nor add documents to the list.","operationId":"update_document_consulted","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"document_id","required":true,"schema":{"description":"The document (see list_documents_consulted).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"obtained":"no","to_obtain_before_revision":true},"schema":{"additionalProperties":false,"properties":{"obtained":{"description":"yes, no, partial (some of it usable), or none (it does not exist for this building).","enum":["yes","no","partial","none"],"type":"string"},"to_obtain_before_revision":{"description":"True when the syndicate must gather it before the next revision.","type":"boolean"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"document":{"category":"technical","consequence":null,"detail":null,"files":[],"id":79,"name":"Plans et devis d'origine","obtained":"no","to_obtain_before_revision":true}},"schema":{"additionalProperties":false,"properties":{"document":{"additionalProperties":false,"description":"A document requested from the syndicate.","properties":{"category":{"description":"Constitutive (declaration) or technical document.","enum":["constitutive","technical"],"type":"string"},"consequence":{"description":"What its absence changed in the study.","type":["string","null"]},"detail":{"description":"What it is used for in the study.","type":["string","null"]},"files":{"description":"Copies kept with the étude (uploaded in the app).","items":{"additionalProperties":false,"description":"A copy of the document kept with the étude.","properties":{"file_name":{"description":"File name.","type":["string","null"]},"file_size":{"description":"Size in bytes.","type":["integer","null"]},"file_type":{"description":"MIME type.","type":["string","null"]},"id":{"description":"The file's id.","minimum":1,"type":"integer"}},"required":["id","file_name","file_type","file_size"],"type":"object"},"type":"array"},"id":{"description":"The document's id.","minimum":1,"type":"integer"},"name":{"description":"The document, e.g. Déclaration de copropriété.","type":"string"},"obtained":{"description":"yes, no, partial (some of it usable), or none (it does not exist for this building).","enum":["yes","no","partial","none"],"type":"string"},"to_obtain_before_revision":{"description":"True when the syndicate must gather it before the next revision.","type":"boolean"}},"required":["id","category","name","detail","obtained","consequence","to_obtain_before_revision","files"],"type":"object"}},"required":["document"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Update a document consulted","tags":["etudes"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Update a document consulted"},"x-roles":"every member"}},"/etudes/{etude_id}/scenarios":{"get":{"description":"Lists the financing scenarios of an étude: first the building scenarios (the reserve-fund strategies compared in the report, oldest first, one of them possibly recommended), then the scenarios computing a restricted-use group's distinct contribution. Each comes with its hypotheses (period, rates, balances, target contribution and ramp), its recommended flag and its locked flag (completed scenarios are read only). Read-only; not available to inspectors. Use get_scenario_projection for a scenario's year-by-year figures.","operationId":"list_scenarios","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"scenarios":[{"annual_contribution":6.2e4,"completed_at":null,"contribution_ramp_years":3,"contribution_rate":2.0,"current_annual_contribution":3.8e4,"duration_years":25,"end_month":"2051-12","group_id":null,"id":77,"inflation_rate":3.0,"initial_balance":1.845e5,"investment_return_rate":1.5,"is_base":false,"is_recommended":false,"locked":false,"name":"Scénario recommandé","safety_threshold":2.5e4,"scope":"building","start_month":"2027-01","unit_numbers":[],"updated_at":"2026-10-20T14:03:11Z"}]},"schema":{"additionalProperties":false,"properties":{"scenarios":{"description":"Building scenarios first, then group scenarios.","items":{"additionalProperties":false,"description":"A financing scenario.","properties":{"annual_contribution":{"description":"Target yearly contribution (reached after the ramp), in CAD.","type":"number"},"completed_at":{"description":"When it was marked completed. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"contribution_ramp_years":{"description":"Years taken to go from the current contribution to the target, in equal steps.","type":"integer"},"contribution_rate":{"description":"Yearly increase of the contribution after the ramp, in percent.","type":["number","null"]},"current_annual_contribution":{"description":"Contribution paid today, in CAD.","type":["number","null"]},"duration_years":{"description":"Length of the projection in years.","type":["integer","null"]},"end_month":{"description":"End of the projection. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":"string"},"group_id":{"description":"The restricted-use group, for a group scenario.","minimum":1,"type":["integer","null"]},"id":{"description":"The scenario's id.","minimum":1,"type":"integer"},"inflation_rate":{"description":"Yearly inflation applied to work costs, in percent.","type":"number"},"initial_balance":{"description":"Fund balance at the start, in CAD.","type":"number"},"investment_return_rate":{"description":"Yearly return on the fund's average balance, in percent.","type":["number","null"]},"is_base":{"description":"The étude's base scenario: one per étude, created with it and never deleted. Placing a work in it, or moving the work's first occurrence, sets the work's estimated_year (« Année prévue »); taking the work out clears it.","type":"boolean"},"is_recommended":{"description":"The étude's recommended strategy (at most one building scenario).","type":"boolean"},"locked":{"description":"Completed, so read only: hypotheses, works and deletion are refused until reopened with update_scenario completed=false.","type":"boolean"},"name":{"description":"Name of the scenario.","type":"string"},"safety_threshold":{"description":"Minimum balance; a year falling below it gets a special contribution, in CAD.","type":["number","null"]},"scope":{"description":"building: a strategy for the whole reserve fund; group: the distinct contribution of a restricted-use group.","enum":["building","group"],"type":"string"},"start_month":{"description":"First month of the projection. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":"string"},"unit_numbers":{"description":"Units paying it (a group scenario); empty for the building.","items":{"description":"A unit number.","type":"string"},"type":"array"},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":"string"}},"required":["annual_contribution","completed_at","contribution_ramp_years","contribution_rate","current_annual_contribution","duration_years","end_month","group_id","id","inflation_rate","initial_balance","investment_return_rate","is_base","is_recommended","locked","name","safety_threshold","scope","start_month","unit_numbers","updated_at"],"type":"object"},"type":"array"}},"required":["scenarios"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"List financing scenarios","tags":["financing"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List financing scenarios"},"x-roles":"owners, administrators and technicians"},"post":{"description":"Creates a financing scenario in an étude, already planned with every work that has a planned year. Without group_id it is a building scenario (a reserve-fund strategy): send name, start_month, duration_years and annual_contribution; the contribution increase defaults to 2 %; its opening balance, current contribution, safety threshold, inflation rate and return rate come from the étude's financial basis (update_financial_basis), and the rates sent here override them. With group_id it computes that restricted-use group's distinct contribution, starting from the recommended strategy's rates and period and the group's starting balance; the other fields then override those. A group has one scenario. To start from an existing scenario, use duplicate_scenario. Not available to inspectors.","operationId":"create_scenario","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"annual_contribution":62000,"contribution_ramp_years":3,"duration_years":25,"name":"Scénario recommandé","start_month":"2027-01"},"schema":{"additionalProperties":false,"properties":{"annual_contribution":{"description":"Target yearly contribution to the fund, reached after the ramp. In CAD.","minimum":0,"type":"number"},"contribution_ramp_years":{"description":"Years to go from the current contribution to the target in equal steps; 0 applies the target from the first year.","maximum":100,"minimum":0,"type":"integer"},"contribution_rate":{"description":"Yearly increase of the contribution once the target is reached, in percent.","maximum":99.99,"minimum":0,"type":"number"},"duration_years":{"description":"Length of the projection in years (the study horizon is usually 25 to 30).","maximum":100,"minimum":1,"type":"integer"},"group_id":{"description":"For a restricted-use group's scenario: the group (see list_groups).","minimum":1,"type":"integer"},"inflation_rate":{"description":"Yearly inflation applied to work costs, in percent (e.g. 3).","maximum":99.99,"minimum":0,"type":"number"},"investment_return_rate":{"description":"Yearly return on the fund's average balance, in percent.","maximum":99.99,"minimum":0,"type":"number"},"name":{"description":"Name of the scenario.","maxLength":255,"minLength":1,"type":"string"},"start_month":{"description":"First month of the projection. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"scenario":{"annual_contribution":6.2e4,"completed_at":null,"contribution_ramp_years":3,"contribution_rate":2.0,"current_annual_contribution":3.8e4,"duration_years":25,"end_month":"2051-12","group_id":null,"id":77,"inflation_rate":3.0,"initial_balance":1.845e5,"investment_return_rate":1.5,"is_base":false,"is_recommended":false,"locked":false,"name":"Scénario recommandé","safety_threshold":2.5e4,"scope":"building","start_month":"2027-01","summary_narrative":null,"unit_numbers":[],"updated_at":"2026-10-20T14:03:11Z","works":[{"estimated_year":2031,"moved_occurrences":[],"planned_month":"2031-01","task_id":902,"title":"Réfection de la toiture"}]}},"schema":{"additionalProperties":false,"properties":{"scenario":{"additionalProperties":false,"description":"A financing scenario with its planned works.","properties":{"annual_contribution":{"description":"Target yearly contribution (reached after the ramp), in CAD.","type":"number"},"completed_at":{"description":"When it was marked completed. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"contribution_ramp_years":{"description":"Years taken to go from the current contribution to the target, in equal steps.","type":"integer"},"contribution_rate":{"description":"Yearly increase of the contribution after the ramp, in percent.","type":["number","null"]},"current_annual_contribution":{"description":"Contribution paid today, in CAD.","type":["number","null"]},"duration_years":{"description":"Length of the projection in years.","type":["integer","null"]},"end_month":{"description":"End of the projection. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":"string"},"group_id":{"description":"The restricted-use group, for a group scenario.","minimum":1,"type":["integer","null"]},"id":{"description":"The scenario's id.","minimum":1,"type":"integer"},"inflation_rate":{"description":"Yearly inflation applied to work costs, in percent.","type":"number"},"initial_balance":{"description":"Fund balance at the start, in CAD.","type":"number"},"investment_return_rate":{"description":"Yearly return on the fund's average balance, in percent.","type":["number","null"]},"is_base":{"description":"The étude's base scenario: one per étude, created with it and never deleted. Placing a work in it, or moving the work's first occurrence, sets the work's estimated_year (« Année prévue »); taking the work out clears it.","type":"boolean"},"is_recommended":{"description":"The étude's recommended strategy (at most one building scenario).","type":"boolean"},"locked":{"description":"Completed, so read only: hypotheses, works and deletion are refused until reopened with update_scenario completed=false.","type":"boolean"},"name":{"description":"Name of the scenario.","type":"string"},"safety_threshold":{"description":"Minimum balance; a year falling below it gets a special contribution, in CAD.","type":["number","null"]},"scope":{"description":"building: a strategy for the whole reserve fund; group: the distinct contribution of a restricted-use group.","enum":["building","group"],"type":"string"},"start_month":{"description":"First month of the projection. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":"string"},"summary_narrative":{"description":"The report's paragraph on this strategy (HTML).","type":["string","null"]},"unit_numbers":{"description":"Units paying it (a group scenario); empty for the building.","items":{"description":"A unit number.","type":"string"},"type":"array"},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":"string"},"works":{"description":"Every work this scenario can plan (paid by the same payer), planned or not.","items":{"additionalProperties":false,"description":"A work the scenario can plan.","properties":{"estimated_year":{"description":"Year planned on the component's Travaux tab.","type":["integer","null"]},"moved_occurrences":{"description":"Occurrences moved to another year in this scenario.","items":{"additionalProperties":false,"description":"An occurrence moved to another year.","properties":{"from_year":{"description":"Year the recurrence gives the occurrence.","type":"integer"},"to_year":{"description":"Year it is paid in, in this scenario.","type":"integer"}},"required":["from_year","to_year"],"type":"object"},"type":"array"},"planned_month":{"description":"Start of the work in this scenario, from which its recurrence counts; null when the scenario leaves it out. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":["string","null"]},"task_id":{"description":"The work's id (see list_tasks).","minimum":1,"type":"integer"},"title":{"description":"Title of the work.","type":["string","null"]}},"required":["task_id","title","estimated_year","planned_month","moved_occurrences"],"type":"object"},"type":"array"}},"required":["annual_contribution","completed_at","contribution_ramp_years","contribution_rate","current_annual_contribution","duration_years","end_month","group_id","id","inflation_rate","initial_balance","investment_return_rate","is_base","is_recommended","locked","name","safety_threshold","scope","start_month","summary_narrative","unit_numbers","updated_at","works"],"type":"object"}},"required":["scenario"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Create a financing scenario","tags":["financing"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Create a financing scenario"},"x-roles":"owners, administrators and technicians"}},"/etudes":{"get":{"description":"Lists the reserve fund studies (études) you may open in the account, newest first, with their building. Filter by building_id, by text (matches the file number, address, city or syndicate name) or by étude date range. Results are paginated: pass next_cursor back as cursor for more. Use get_etude for an étude's full header and parameters. Read-only.","operationId":"list_etudes","parameters":[{"description":"Only études of this building (see list_buildings).","in":"query","name":"building_id","required":false,"schema":{"description":"Only études of this building (see list_buildings).","minimum":1,"type":"integer"}},{"description":"The next_cursor of a previous call, to get the next page.","in":"query","name":"cursor","required":false,"schema":{"description":"The next_cursor of a previous call, to get the next page.","type":"string"}},{"description":"Only études dated on or after this day. ISO 8601 date (YYYY-MM-DD).","in":"query","name":"date_from","required":false,"schema":{"description":"Only études dated on or after this day. ISO 8601 date (YYYY-MM-DD).","format":"date","type":"string"}},{"description":"Only études dated on or before this day. ISO 8601 date (YYYY-MM-DD).","in":"query","name":"date_to","required":false,"schema":{"description":"Only études dated on or before this day. ISO 8601 date (YYYY-MM-DD).","format":"date","type":"string"}},{"description":"How many results to return (default 50).","in":"query","name":"limit","required":false,"schema":{"description":"How many results to return (default 50).","maximum":200,"minimum":1,"type":"integer"}},{"description":"Text to look for in the file number, address, city or syndicate name.","in":"query","name":"query","required":false,"schema":{"description":"Text to look for in the file number, address, city or syndicate name.","maxLength":200,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"etudes":[{"building":{"address":"1200, rue King Ouest","city":"Sherbrooke","id":17,"syndicat_name":"Syndicat du 1200 King"},"dossier_no":"CCETD-2026-0041","etude_date":"2026-09-15","id":41,"report_date":null,"updated_at":"2026-10-20T14:03:11Z"}],"next_cursor":null},"schema":{"additionalProperties":false,"properties":{"etudes":{"description":"The études, newest first.","items":{"additionalProperties":false,"description":"An étude, in short.","properties":{"building":{"additionalProperties":false,"description":"The building studied.","properties":{"address":{"description":"Street address.","type":["string","null"]},"city":{"description":"City.","type":["string","null"]},"id":{"description":"The building's id.","minimum":1,"type":"integer"},"syndicat_name":{"description":"Name of the syndicate of co-owners.","type":["string","null"]}},"required":["id","address","city","syndicat_name"],"type":["object","null"]},"dossier_no":{"description":"The firm's file number for this étude.","type":["string","null"]},"etude_date":{"description":"Date of the étude. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"id":{"description":"The étude's id.","minimum":1,"type":"integer"},"report_date":{"description":"Date printed on the report. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":"string"}},"required":["id","dossier_no","etude_date","report_date","building","updated_at"],"type":"object"},"type":"array"},"next_cursor":{"description":"Pass it as cursor to get the next page; null on the last page.","type":["string","null"]}},"required":["etudes","next_cursor"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"List études","tags":["etudes"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List études"},"x-roles":"every member"},"post":{"description":"Creates a new reserve fund study (étude) of an existing building (create_building first if needed). The étude gets the next file number unless you give one, the full UNIFORMAT component list, the firm's sub-components, sales tax rate and default signatories, and opens for the administrators and its inspector. inspector_id defaults to you; only owners and administrators may name another member. Returns the étude as get_etude does. To copy an existing étude onto a new building, use duplicate_etude; to fill in its header, update_etude.","operationId":"create_etude","parameters":[],"requestBody":{"content":{"application/json":{"example":{"building_id":17,"etude_date":"2026-11-04"},"schema":{"additionalProperties":false,"properties":{"building_id":{"description":"The building studied (see list_buildings).","minimum":1,"type":"integer"},"dossier_no":{"description":"The firm's file number; generated when left out.","maxLength":100,"minLength":1,"type":"string"},"etude_date":{"description":"Date of the étude. ISO 8601 date (YYYY-MM-DD).","format":"date","type":"string"},"inspector_id":{"description":"The member who inspects the building (see list_account_users); defaults to you.","minimum":1,"type":"integer"},"notes":{"description":"Free notes on the étude, not printed in the report.","maxLength":20000,"type":"string"}},"required":["building_id"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"attendees":[],"etude":{"dossier_no":"CCETD-2026-0042","etude_date":"2026-11-04","id":42},"inspector":{"email":"marie@exemple.ca","id":12,"name":"Marie Tremblay"},"progress":{"completed":0,"components":62,"in_report":0},"signatories":{"established_by":"Julie Bouchard","site_visit":null,"writing":null}},"schema":{"additionalProperties":false,"properties":{"attendees":{"description":"People present at the inspection, in order.","items":{"additionalProperties":false,"description":"A person present at the inspection.","properties":{"id":{"description":"The attendee's id.","minimum":1,"type":"integer"},"name":{"description":"Full name.","type":"string"},"role":{"description":"In what capacity, e.g. Administrateur du syndicat, Gestionnaire.","type":["string","null"]}},"required":["id","name","role"],"type":"object"},"type":"array"},"etude":{"additionalProperties":false,"description":"An étude's header and study parameters.","properties":{"access_mode":{"description":"Who may open the étude: listed users only, administrators plus listed users, or every member.","enum":["users","admins","everyone"],"type":"string"},"access_user_ids":{"description":"Members explicitly given access.","items":{"description":"A member id.","type":"integer"},"type":"array"},"building":{"additionalProperties":false,"description":"The building studied.","properties":{"address":{"description":"Street address.","type":["string","null"]},"city":{"description":"City.","type":["string","null"]},"id":{"description":"The building's id.","minimum":1,"type":"integer"},"syndicat_name":{"description":"Name of the syndicate of co-owners.","type":["string","null"]}},"required":["id","address","city","syndicat_name"],"type":["object","null"]},"carnet_revision_year":{"description":"Year the maintenance log (carnet d'entretien) is next revised.","maximum":2100,"minimum":2000,"type":["integer","null"]},"current_annual_contribution":{"description":"Current yearly contribution to the fund. In CAD.","minimum":0,"type":["number","null"]},"dossier_no":{"description":"The firm's file number.","maxLength":100,"type":["string","null"]},"established_by_signatory_id":{"description":"Signatory who establishes the study (see list_signatories).","minimum":1,"type":["integer","null"]},"etude_date":{"description":"Date of the étude. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"fund_balance":{"description":"Reserve fund balance reported by the syndicate. In CAD.","minimum":0,"type":["number","null"]},"fund_balance_as_of":{"description":"Date of that balance. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"id":{"description":"The étude's id.","minimum":1,"type":"integer"},"inflation_rate":{"description":"Yearly inflation building scenarios start from, in percent (e.g. 3).","maximum":99.99,"minimum":0,"type":"number"},"inspection_date":{"description":"Date of the on-site examination (printed in the signed declarations). ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"inspector_id":{"description":"The member who inspects the building.","minimum":1,"type":["integer","null"]},"investment_return_rate":{"description":"Yearly return on the fund building scenarios start from, in percent.","maximum":99.99,"minimum":0,"type":"number"},"mandate_nature":{"description":"First study of the building, or a revision of an earlier one.","enum":["first_study","revision"],"type":"string"},"next_study_year":{"description":"Year the next study is due.","maximum":2100,"minimum":2000,"type":["integer","null"]},"notes":{"description":"Free notes on the étude, not printed in the report.","maxLength":20000,"type":["string","null"]},"reference_year":{"description":"First year of the projections.","maximum":2100,"minimum":2000,"type":["integer","null"]},"report_date":{"description":"Date printed on the report. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"safety_threshold":{"description":"Minimum fund balance the scenarios must keep. In CAD.","minimum":0,"type":["number","null"]},"site_visit_mode":{"description":"Whether the signatory visited the site themself, or supervised someone who did.","enum":["self","supervised"],"type":"string"},"site_visit_signatory_id":{"description":"Signatory for the site visit.","minimum":1,"type":["integer","null"]},"site_visit_supervisee_name":{"description":"Who visited under supervision (when site_visit_mode is supervised).","maxLength":200,"type":["string","null"]},"study_horizon_years":{"description":"Projection horizon in years; the regulation requires at least 25.","maximum":50,"minimum":25,"type":"integer"},"syndicat_rep":{"description":"Who represented the syndicate at the visit.","maxLength":200,"type":["string","null"]},"tax_rate":{"description":"Sales taxes (GST + QST) applied to costs, in percent.","type":"number"},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":"string"},"weather":{"description":"Weather during the site visit.","maxLength":200,"type":["string","null"]},"writing_signatory_id":{"description":"Signatory who wrote the report.","minimum":1,"type":["integer","null"]}},"required":["access_mode","access_user_ids","building","carnet_revision_year","current_annual_contribution","dossier_no","established_by_signatory_id","etude_date","fund_balance","fund_balance_as_of","id","inflation_rate","inspection_date","inspector_id","investment_return_rate","mandate_nature","next_study_year","notes","reference_year","report_date","safety_threshold","site_visit_mode","site_visit_signatory_id","site_visit_supervisee_name","study_horizon_years","syndicat_rep","tax_rate","updated_at","weather","writing_signatory_id"],"type":"object"},"inspector":{"additionalProperties":false,"description":"The member who inspects the building.","properties":{"email":{"description":"Email address.","type":"string"},"id":{"description":"The member's id.","minimum":1,"type":"integer"},"name":{"description":"Full name.","type":"string"}},"required":["id","name","email"],"type":["object","null"]},"progress":{"additionalProperties":false,"description":"How far the inspection is.","properties":{"completed":{"description":"Components marked complete.","minimum":0,"type":"integer"},"components":{"description":"Components (and sub-components) of the étude.","minimum":0,"type":"integer"},"in_report":{"description":"Components included in the report (set_report_scope).","minimum":0,"type":"integer"}},"required":["components","completed","in_report"],"type":"object"},"signatories":{"additionalProperties":false,"description":"The signatories' names (ids are in etude).","properties":{"established_by":{"description":"Name of the signatory who establishes the study.","type":["string","null"]},"site_visit":{"description":"Name of the signatory for the site visit.","type":["string","null"]},"writing":{"description":"Name of the signatory who wrote the report.","type":["string","null"]}},"required":["established_by","site_visit","writing"],"type":"object"}},"required":["etude","inspector","signatories","attendees","progress"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Create an étude","tags":["etudes"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Create an étude"},"x-roles":"every member"}},"/etudes/{etude_id}/access":{"put":{"description":"Sets who may open an étude, replacing the current setting: mode \"everyone\" (every member), \"admins\" (owners and administrators, plus the members in user_ids) or \"users\" (only the members in user_ids). The account owner can always open it. Owners and administrators only. Leaving yourself out makes the étude unreachable for you afterwards. Use list_account_users for the ids. Does not change members' roles or any other part of the étude.","operationId":"set_etude_access","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"mode":"admins","user_ids":[15]},"schema":{"additionalProperties":false,"properties":{"mode":{"description":"everyone: every member; admins: administrators plus user_ids; users: user_ids only.","enum":["users","admins","everyone"],"type":"string"},"user_ids":{"description":"Members let in by name; ignored for everyone.","items":{"description":"A member id (see list_account_users).","minimum":1,"type":"integer"},"maxItems":500,"type":"array"}},"required":["mode"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"access_mode":"admins","access_user_ids":[15],"etude_id":41,"you_can_open":true},"schema":{"additionalProperties":false,"properties":{"access_mode":{"description":"Who may open the étude now.","enum":["users","admins","everyone"],"type":"string"},"access_user_ids":{"description":"Members let in by name.","items":{"description":"A member id.","type":"integer"},"type":"array"},"etude_id":{"description":"The étude.","minimum":1,"type":"integer"},"you_can_open":{"description":"Whether you can still open the étude.","type":"boolean"}},"required":["etude_id","access_mode","access_user_ids","you_can_open"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Set who may open an étude","tags":["etudes"],"x-admin-only":true,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Set who may open an étude"},"x-roles":"owners and administrators only"}},"/etudes/{etude_id}/scenarios/{scenario_id}":{"delete":{"description":"Deletes a financing scenario of an étude, with its planned works, moved occurrences and report paragraph. The works themselves stay on their components. A completed scenario is refused with scenario_locked: reopen it first with update_scenario completed=false. The étude's base scenario (is_base) is always refused. Deleting a group's scenario leaves the group without a distinct-contribution computation until a new one is created. Cannot be undone; to keep a variant, use duplicate_scenario. Not available to inspectors.","operationId":"delete_scenario","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"scenario_id","required":true,"schema":{"description":"The scenario to delete (see list_scenarios).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"deleted":true,"scenario_id":78},"schema":{"additionalProperties":false,"properties":{"deleted":{"description":"True once deleted.","type":"boolean"},"scenario_id":{"description":"The deleted scenario's id.","minimum":1,"type":"integer"}},"required":["deleted","scenario_id"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:delete"]}],"summary":"Delete a financing scenario","tags":["financing"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Delete a financing scenario"},"x-roles":"owners, administrators and technicians"},"patch":{"description":"Changes a financing scenario: its hypotheses (name, period, rates, target contribution and ramp), its recommendation, its report paragraph, and whether it is completed. Only the fields you send change. Recommending a building scenario withdraws the recommendation from the étude's other scenarios. completed=true locks the scenario (hypotheses, works and deletion refused); completed=false reopens it and may be sent with other changes. A locked scenario accepts only is_recommended, summary_narrative and completed; anything else fails with scenario_locked. initial_balance, current_annual_contribution and safety_threshold change this scenario's alone; update_financial_basis sets them for every building scenario at once, overwriting such changes. Works are planned with schedule_work_in_scenario. Not available to inspectors.","operationId":"update_scenario","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"scenario_id","required":true,"schema":{"description":"The scenario to change (see list_scenarios).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"annual_contribution":65000,"is_recommended":true},"schema":{"additionalProperties":false,"properties":{"annual_contribution":{"description":"Target yearly contribution to the fund, reached after the ramp. In CAD.","minimum":0,"type":"number"},"completed":{"description":"true marks it completed (locked, read only); false reopens it for changes.","type":"boolean"},"contribution_ramp_years":{"description":"Years to go from the current contribution to the target in equal steps; 0 applies the target from the first year.","maximum":100,"minimum":0,"type":"integer"},"contribution_rate":{"description":"Yearly increase of the contribution once the target is reached, in percent.","maximum":99.99,"minimum":0,"type":"number"},"current_annual_contribution":{"description":"The contribution paid today, as this scenario takes it. In CAD.","minimum":0,"type":["number","null"]},"duration_years":{"description":"Length of the projection in years (the study horizon is usually 25 to 30).","maximum":100,"minimum":1,"type":"integer"},"inflation_rate":{"description":"Yearly inflation applied to work costs, in percent (e.g. 3).","maximum":99.99,"minimum":0,"type":"number"},"initial_balance":{"description":"The fund balance this scenario starts from. In CAD.","minimum":0,"type":["number","null"]},"investment_return_rate":{"description":"Yearly return on the fund's average balance, in percent.","maximum":99.99,"minimum":0,"type":"number"},"is_recommended":{"description":"Building scenarios only: true makes it the étude's recommended strategy.","type":"boolean"},"name":{"description":"Name of the scenario.","maxLength":255,"minLength":1,"type":"string"},"safety_threshold":{"description":"The minimum balance this scenario keeps the fund above. In CAD.","minimum":0,"type":["number","null"]},"start_month":{"description":"First month of the projection. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":"string"},"summary_narrative":{"description":"Building scenarios only: the report's paragraph on this strategy, as simple HTML (<p>, <strong>, <ul>).","maxLength":50000,"type":["string","null"]}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"scenario":{"annual_contribution":6.5e4,"completed_at":null,"contribution_ramp_years":3,"contribution_rate":2.0,"current_annual_contribution":3.8e4,"duration_years":25,"end_month":"2051-12","group_id":null,"id":77,"inflation_rate":3.0,"initial_balance":1.845e5,"investment_return_rate":1.5,"is_base":false,"is_recommended":true,"locked":false,"name":"Scénario recommandé","safety_threshold":2.5e4,"scope":"building","start_month":"2027-01","summary_narrative":null,"unit_numbers":[],"updated_at":"2026-10-20T14:03:11Z","works":[]}},"schema":{"additionalProperties":false,"properties":{"scenario":{"additionalProperties":false,"description":"A financing scenario with its planned works.","properties":{"annual_contribution":{"description":"Target yearly contribution (reached after the ramp), in CAD.","type":"number"},"completed_at":{"description":"When it was marked completed. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"contribution_ramp_years":{"description":"Years taken to go from the current contribution to the target, in equal steps.","type":"integer"},"contribution_rate":{"description":"Yearly increase of the contribution after the ramp, in percent.","type":["number","null"]},"current_annual_contribution":{"description":"Contribution paid today, in CAD.","type":["number","null"]},"duration_years":{"description":"Length of the projection in years.","type":["integer","null"]},"end_month":{"description":"End of the projection. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":"string"},"group_id":{"description":"The restricted-use group, for a group scenario.","minimum":1,"type":["integer","null"]},"id":{"description":"The scenario's id.","minimum":1,"type":"integer"},"inflation_rate":{"description":"Yearly inflation applied to work costs, in percent.","type":"number"},"initial_balance":{"description":"Fund balance at the start, in CAD.","type":"number"},"investment_return_rate":{"description":"Yearly return on the fund's average balance, in percent.","type":["number","null"]},"is_base":{"description":"The étude's base scenario: one per étude, created with it and never deleted. Placing a work in it, or moving the work's first occurrence, sets the work's estimated_year (« Année prévue »); taking the work out clears it.","type":"boolean"},"is_recommended":{"description":"The étude's recommended strategy (at most one building scenario).","type":"boolean"},"locked":{"description":"Completed, so read only: hypotheses, works and deletion are refused until reopened with update_scenario completed=false.","type":"boolean"},"name":{"description":"Name of the scenario.","type":"string"},"safety_threshold":{"description":"Minimum balance; a year falling below it gets a special contribution, in CAD.","type":["number","null"]},"scope":{"description":"building: a strategy for the whole reserve fund; group: the distinct contribution of a restricted-use group.","enum":["building","group"],"type":"string"},"start_month":{"description":"First month of the projection. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":"string"},"summary_narrative":{"description":"The report's paragraph on this strategy (HTML).","type":["string","null"]},"unit_numbers":{"description":"Units paying it (a group scenario); empty for the building.","items":{"description":"A unit number.","type":"string"},"type":"array"},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":"string"},"works":{"description":"Every work this scenario can plan (paid by the same payer), planned or not.","items":{"additionalProperties":false,"description":"A work the scenario can plan.","properties":{"estimated_year":{"description":"Year planned on the component's Travaux tab.","type":["integer","null"]},"moved_occurrences":{"description":"Occurrences moved to another year in this scenario.","items":{"additionalProperties":false,"description":"An occurrence moved to another year.","properties":{"from_year":{"description":"Year the recurrence gives the occurrence.","type":"integer"},"to_year":{"description":"Year it is paid in, in this scenario.","type":"integer"}},"required":["from_year","to_year"],"type":"object"},"type":"array"},"planned_month":{"description":"Start of the work in this scenario, from which its recurrence counts; null when the scenario leaves it out. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":["string","null"]},"task_id":{"description":"The work's id (see list_tasks).","minimum":1,"type":"integer"},"title":{"description":"Title of the work.","type":["string","null"]}},"required":["task_id","title","estimated_year","planned_month","moved_occurrences"],"type":"object"},"type":"array"}},"required":["annual_contribution","completed_at","contribution_ramp_years","contribution_rate","current_annual_contribution","duration_years","end_month","group_id","id","inflation_rate","initial_balance","investment_return_rate","is_base","is_recommended","locked","name","safety_threshold","scope","start_month","summary_narrative","unit_numbers","updated_at","works"],"type":"object"}},"required":["scenario"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Update a financing scenario","tags":["financing"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Update a financing scenario"},"x-roles":"owners, administrators and technicians"}},"/signatories":{"get":{"description":"Lists the people the firm can name on a report (signataires), by name: their professional title, order and member number, whether a signature image is on file, and the roles they are the default for on new études (established_by, site_visit, writing). Use the ids for an étude's established_by_signatory_id, site_visit_signatory_id and writing_signatory_id (update_etude). Signatories need not be app members (see list_account_users). Does not return the signature images, nor edit the roster. Read-only; takes no arguments.","operationId":"list_signatories","parameters":[],"responses":{"200":{"content":{"application/json":{"example":{"signatories":[{"default_for":["established_by","writing"],"has_signature":true,"id":3,"member_number":"12345","name":"Julie Bouchard","professional_order":"OTPQ","professional_title":"Technologue professionnelle"}]},"schema":{"additionalProperties":false,"properties":{"signatories":{"description":"The roster, by name.","items":{"additionalProperties":false,"description":"A signatory.","properties":{"default_for":{"description":"The roles new études name them for by default.","items":{"description":"A role.","enum":["established_by","site_visit","writing"],"type":"string"},"type":"array"},"has_signature":{"description":"True when a signature image is on file.","type":"boolean"},"id":{"description":"The signatory's id.","minimum":1,"type":"integer"},"member_number":{"description":"Member number in that order.","type":["string","null"]},"name":{"description":"Full name.","type":"string"},"professional_order":{"description":"Professional order they belong to.","type":["string","null"]},"professional_title":{"description":"Professional title, e.g. Technologue professionnel.","type":["string","null"]}},"required":["id","name","professional_title","professional_order","member_number","has_signature","default_for"],"type":"object"},"type":"array"}},"required":["signatories"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"List signatories","tags":["context"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List signatories"},"x-roles":"every member"}},"/etudes/{etude_id}/groups/{group_id}":{"delete":{"description":"Deletes a restricted-use group of an étude. Its scenario is deleted with it, even when completed. Its components stay in the inventory but are no longer restricted-use, and its works fall back to the whole building and join the building scenarios again. Cannot be undone. To change a group, use update_group instead. Not available to inspectors.","operationId":"delete_group","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"group_id","required":true,"schema":{"description":"The group to delete (see list_groups).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"deleted":true,"group_id":5},"schema":{"additionalProperties":false,"properties":{"deleted":{"description":"True once deleted.","type":"boolean"},"group_id":{"description":"The deleted group's id.","minimum":1,"type":"integer"}},"required":["deleted","group_id"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:delete"]}],"summary":"Delete a restricted-use group","tags":["groups"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Delete a restricted-use group"},"x-roles":"owners, administrators and technicians"},"patch":{"description":"Changes a restricted-use group of an étude: its name, units, clause of the declaration, allocation method, starting balance and note. Only the fields you send change; unit_numbers replaces the whole list. Does not change the group's components (set_group_components) nor its scenario's figures (update_scenario); the scenario keeps the units it was created with. Not available to inspectors.","operationId":"update_group","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"group_id","required":true,"schema":{"description":"The group to change (see list_groups).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"unit_numbers":["601","602","603"]},"schema":{"additionalProperties":false,"properties":{"allocation_method":{"description":"How the group's contribution is split among its units: by relative value (the default under the Civil Code) or in equal shares.","enum":["relative_value","equal_shares"],"type":"string"},"basis_reference":{"description":"The clause of the declaration it rests on, e.g. « Déclaration, art. 8.6 ».","maxLength":500,"type":["string","null"]},"name":{"description":"The restricted-use common portion, e.g. « Terrasses au toit ».","maxLength":255,"minLength":1,"type":"string"},"starting_balance":{"description":"Money already set aside for the group (usually 0). In CAD.","minimum":0,"type":["number","null"]},"starting_balance_note":{"description":"A note on that balance, printed in the report.","maxLength":2000,"type":["string","null"]},"unit_numbers":{"description":"The units whose co-owners alone bear this portion's major repairs; at least one.","items":{"description":"A unit number, as in the building's units.","maxLength":50,"minLength":1,"type":"string"},"maxItems":500,"type":"array"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"group":{"allocation_method":"relative_value","basis_reference":"Déclaration, art. 8.6","components":[],"id":5,"name":"Terrasses au toit","position":0,"scenario_ids":[77],"starting_balance":0.0,"starting_balance_note":null,"unit_numbers":["601","602","603"],"works":[]}},"schema":{"additionalProperties":false,"properties":{"group":{"additionalProperties":false,"description":"A restricted-use group.","properties":{"allocation_method":{"description":"How the contribution is split.","enum":["relative_value","equal_shares"],"type":"string"},"basis_reference":{"description":"The clause of the declaration.","type":["string","null"]},"components":{"description":"The components this group bears (set with set_group_components).","items":{"additionalProperties":false,"description":"A component.","properties":{"id":{"description":"The component's id.","minimum":1,"type":"integer"},"name":{"description":"Component name, with its subcomponent label.","type":"string"},"uniformat_code":{"description":"UNIFORMAT code.","type":["string","null"]}},"required":["id","uniformat_code","name"],"type":"object"},"type":"array"},"id":{"description":"The group's id.","minimum":1,"type":"integer"},"name":{"description":"The restricted-use common portion.","type":"string"},"position":{"description":"Order in the report (0 first).","type":"integer"},"scenario_ids":{"description":"The scenario(s) computing the group's distinct contribution; create one with create_scenario and group_id.","items":{"description":"A scenario id.","minimum":1,"type":"integer"},"type":"array"},"starting_balance":{"description":"Money already set aside for the group, in CAD.","type":"number"},"starting_balance_note":{"description":"Note on the starting balance.","type":["string","null"]},"unit_numbers":{"description":"The units that bear it.","items":{"description":"A unit number.","type":"string"},"type":"array"},"works":{"description":"The works (travaux) the group pays for: those of its components.","items":{"additionalProperties":false,"description":"A work.","properties":{"estimated_year":{"description":"Planned year.","type":["integer","null"]},"id":{"description":"The work's (task's) id.","minimum":1,"type":"integer"},"title":{"description":"Title of the work.","type":["string","null"]}},"required":["id","title","estimated_year"],"type":"object"},"type":"array"}},"required":["id","name","basis_reference","allocation_method","unit_numbers","starting_balance","starting_balance_note","position","components","works","scenario_ids"],"type":"object"}},"required":["group"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Update a restricted-use group","tags":["groups"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Update a restricted-use group"},"x-roles":"owners, administrators and technicians"}},"/text-templates":{"get":{"description":"Lists the firm's text templates (modèles): reusable descriptions, constats (category specific), works (travaux), maintenance (entretien), methodology and responsibility texts, with their suggested costs, lifespans and priorities. Give a uniformat_code (and optionally a subcomponent_label) for the templates of one element, a category, or both; at least one is required. Paginated. Use them as a starting point when writing a component's texts, constats or tasks. Does not create or edit templates (done in the app's Modèles page). Read-only.","operationId":"list_text_templates","parameters":[{"description":"Only templates of this category.","in":"query","name":"category","required":false,"schema":{"description":"Only templates of this category.","enum":["general","methodology","specific","travaux","entretien","responsibility"],"type":"string"}},{"description":"The next_cursor of a previous call, to get the next page.","in":"query","name":"cursor","required":false,"schema":{"description":"The next_cursor of a previous call, to get the next page.","type":"string"}},{"description":"How many results to return (default 50).","in":"query","name":"limit","required":false,"schema":{"description":"How many results to return (default 50).","maximum":200,"minimum":1,"type":"integer"}},{"description":"With uniformat_code: the templates of this sub-component instead of the element's own.","in":"query","name":"subcomponent_label","required":false,"schema":{"description":"With uniformat_code: the templates of this sub-component instead of the element's own.","maxLength":200,"type":"string"}},{"description":"The individual element, e.g. B3010 (see search_uniformat_elements).","in":"query","name":"uniformat_code","required":false,"schema":{"description":"The individual element, e.g. B3010 (see search_uniformat_elements).","maxLength":10,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"next_cursor":null,"templates":[{"category":"travaux","description":"Remplacement complet de la membrane de toiture.","estimated_cost":8.5e4,"frequency":null,"goal":null,"id":230,"intervention_type":"remplacement","is_one_time":false,"lifespan_years":25,"line_items":[],"method":null,"priority":"moyenne","recommended_months":[],"recurrence_years":25,"state":null,"subcomponent_label":null,"title":"Remplacement de la membrane","uniformat_code":"B3010"}]},"schema":{"additionalProperties":false,"properties":{"next_cursor":{"description":"Pass it as cursor to get the next page; null on the last page.","type":["string","null"]},"templates":{"description":"The templates, by title.","items":{"additionalProperties":false,"description":"A text template.","properties":{"category":{"description":"Kind of text.","enum":["general","methodology","specific","travaux","entretien","responsibility"],"type":"string"},"description":{"description":"The text itself (may contain HTML).","type":["string","null"]},"estimated_cost":{"description":"Suggested cost. In CAD.","minimum":0,"type":["number","null"]},"frequency":{"description":"Frequency, for maintenance.","type":["string","null"]},"goal":{"description":"Goal, for works.","type":["string","null"]},"id":{"description":"The template's id.","minimum":1,"type":"integer"},"intervention_type":{"description":"Kind of intervention, for works.","type":["string","null"]},"is_one_time":{"description":"True for a one-time intervention.","type":"boolean"},"lifespan_years":{"description":"Suggested lifespan in years.","type":["integer","null"]},"line_items":{"description":"Cost lines.","items":{"additionalProperties":false,"description":"A cost line of the template.","properties":{"description":{"description":"What the line costs.","type":["string","null"]},"price_id":{"description":"The catalogue price it comes from (list_prices).","type":["integer","null"]},"quantity":{"description":"Quantity.","type":["number","null"]},"subtotal":{"description":"Line total. In CAD.","minimum":0,"type":["number","null"]},"unit_price":{"description":"Price per unit. In CAD.","minimum":0,"type":["number","null"]}},"required":["description","price_id","unit_price","quantity","subtotal"],"type":"object"},"type":"array"},"method":{"description":"Method, for works.","type":["string","null"]},"priority":{"description":"Suggested priority.","type":["string","null"]},"recommended_months":{"description":"Months the maintenance is recommended in.","items":{"description":"A month, 1 to 12.","type":"integer"},"type":"array"},"recurrence_years":{"description":"Years between occurrences, for works.","type":["integer","null"]},"state":{"description":"Suggested condition state, for constats.","type":["string","null"]},"subcomponent_label":{"description":"The sub-component it belongs to; null for the element itself.","type":["string","null"]},"title":{"description":"Short title.","type":"string"},"uniformat_code":{"description":"The element it belongs to.","type":"string"}},"required":["id","uniformat_code","subcomponent_label","category","title","description","priority","state","method","goal","intervention_type","estimated_cost","lifespan_years","recurrence_years","frequency","recommended_months","is_one_time","line_items"],"type":"object"},"type":"array"}},"required":["templates","next_cursor"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"List text templates","tags":["context"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List text templates"},"x-roles":"every member"}},"/etudes/{etude_id}/documents-consulted":{"get":{"description":"Lists the documents requested from the syndicate for an étude (declaration of co-ownership, plans, previous reports and studies, …), in the report's order: whether each was obtained, whether it must be gathered before the next revision, and the copies kept with the étude. The report's « Documents consultés » annex prints this list. Like the app, the first call lays out the standard checklist, every document marked not obtained. Use update_document_consulted to record what arrived. Does not return the files' content.","operationId":"list_documents_consulted","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"documents":[{"category":"constitutive","consequence":null,"detail":"Établissement du périmètre de responsabilité et de la qualification des parties communes.","files":[{"file_name":"declaration.pdf","file_size":2400000,"file_type":"application/pdf","id":9}],"id":77,"name":"Déclaration de copropriété","obtained":"yes","to_obtain_before_revision":false}]},"schema":{"additionalProperties":false,"properties":{"documents":{"description":"The documents, in the report's order.","items":{"additionalProperties":false,"description":"A document requested from the syndicate.","properties":{"category":{"description":"Constitutive (declaration) or technical document.","enum":["constitutive","technical"],"type":"string"},"consequence":{"description":"What its absence changed in the study.","type":["string","null"]},"detail":{"description":"What it is used for in the study.","type":["string","null"]},"files":{"description":"Copies kept with the étude (uploaded in the app).","items":{"additionalProperties":false,"description":"A copy of the document kept with the étude.","properties":{"file_name":{"description":"File name.","type":["string","null"]},"file_size":{"description":"Size in bytes.","type":["integer","null"]},"file_type":{"description":"MIME type.","type":["string","null"]},"id":{"description":"The file's id.","minimum":1,"type":"integer"}},"required":["id","file_name","file_type","file_size"],"type":"object"},"type":"array"},"id":{"description":"The document's id.","minimum":1,"type":"integer"},"name":{"description":"The document, e.g. Déclaration de copropriété.","type":"string"},"obtained":{"description":"yes, no, partial (some of it usable), or none (it does not exist for this building).","enum":["yes","no","partial","none"],"type":"string"},"to_obtain_before_revision":{"description":"True when the syndicate must gather it before the next revision.","type":"boolean"}},"required":["id","category","name","detail","obtained","consequence","to_obtain_before_revision","files"],"type":"object"},"type":"array"}},"required":["documents"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"List documents consulted","tags":["etudes"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List documents consulted"},"x-roles":"every member"}},"/etudes/{etude_id}/components/{component_id}/deficiencies":{"post":{"description":"Records a constat (a deficiency observed on site) on a component of an étude: a one-line title, an optional HTML or plain-text description, its état from the account's constat states (get_account_context), whether it is printed in the report and the copropriété horizontale flag. Refused with conflict when the component's Constats tab (specific) is marked complete. Add photos to it with upload_component_photo (deficiency_id). Does not change the component's general condition (update_component).","operationId":"add_deficiency","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"component_id","required":true,"schema":{"description":"The component the constat is on (see list_components).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"description":"<p>Plusieurs coupe-froid détachés sur la façade nord.</p>","state":"a_corriger","title":"Coupe-froid détachés"},"schema":{"additionalProperties":false,"properties":{"copropriete_horizontale":{"description":"True when the constat concerns a horizontal co-ownership (copropriété horizontale); default false.","type":"boolean"},"description":{"description":"The constat's text, HTML or plain text, printed in the report.","maxLength":50000,"type":["string","null"]},"include_in_report":{"description":"False keeps the constat out of the report (default true).","type":"boolean"},"state":{"description":"Its état: one of the account's constat states, e.g. a_surveiller (see get_account_context). The account's first state when omitted on creation.","maxLength":60,"type":"string"},"title":{"description":"The constat's title, one line.","maxLength":500,"minLength":1,"type":"string"}},"required":["title"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"deficiency":{"component_display_code":"B2020","component_id":812,"component_name":"Fenêtres extérieures","copropriete_horizontale":false,"created_at":"2026-10-28T14:03:11Z","description":"<p>Plusieurs coupe-froid détachés sur la façade nord.</p>","id":977,"include_in_report":true,"photos":[],"state":"a_corriger","state_label":"À corriger immédiatement","title":"Coupe-froid détachés"}},"schema":{"additionalProperties":false,"properties":{"deficiency":{"additionalProperties":false,"description":"A constat (deficiency) on a component.","properties":{"component_display_code":{"description":"The component's code as printed, e.g. B2020-1.","type":"string"},"component_id":{"description":"The component it is on.","minimum":1,"type":"integer"},"component_name":{"description":"The component's label or element name.","type":["string","null"]},"copropriete_horizontale":{"description":"True when the constat concerns a horizontal co-ownership (copropriété horizontale).","type":"boolean"},"created_at":{"description":"When it was recorded. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"description":{"description":"The constat's text, HTML; null when it has none.","type":["string","null"]},"id":{"description":"The constat's id (deficiency_id in the other tools).","minimum":1,"type":"integer"},"include_in_report":{"description":"False when the constat is kept out of the report.","type":"boolean"},"photos":{"description":"Photos illustrating the constat.","items":{"additionalProperties":false,"description":"A photo of a component.","properties":{"component_id":{"description":"The component it belongs to.","minimum":1,"type":"integer"},"content_type":{"description":"MIME type, e.g. image/jpeg.","type":["string","null"]},"deficiency_id":{"description":"The constat it illustrates; null for a photo of the component itself.","minimum":1,"type":["integer","null"]},"file_name":{"description":"Original file name.","type":["string","null"]},"file_size":{"description":"Size in bytes.","type":["integer","null"]},"id":{"description":"The photo's id (photo_id in set_photo_title and delete_photo).","minimum":1,"type":"integer"},"tab":{"description":"The editor tab it was added on (general for the reference photos).","type":["string","null"]},"title":{"description":"Legend printed under the photo in the report.","type":["string","null"]},"url":{"description":"A signed link to the image, valid for about one hour; call again for a fresh one.","type":["string","null"]}},"required":["component_id","content_type","deficiency_id","file_name","file_size","id","tab","title","url"],"type":"object"},"type":"array"},"state":{"description":"Its état, one of the account's constat states (see get_account_context).","type":"string"},"state_label":{"description":"The état's label as the report prints it.","type":"string"},"title":{"description":"The constat's title (its first line).","type":"string"}},"required":["component_display_code","component_id","component_name","copropriete_horizontale","created_at","description","id","include_in_report","photos","state","state_label","title"],"type":"object"}},"required":["deficiency"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Add a constat","tags":["deficiencies"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Add a constat"},"x-roles":"every member"}},"/etudes/{etude_id}/scenarios/{scenario_id}/duplicate":{"post":{"description":"Creates a copy of a financing scenario in the same étude, named « Copie de … »: its hypotheses, its scope (building or restricted-use group), the month each work starts in and the occurrences moved to other years. The copy is not recommended, has no report paragraph and is not completed, so it can be changed at once (rename it with update_scenario). Works on completed scenarios too; the original is unchanged. To start from scratch, use create_scenario. Not available to inspectors.","operationId":"duplicate_scenario","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"scenario_id","required":true,"schema":{"description":"The scenario to copy (see list_scenarios).","minimum":1,"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"example":{"scenario":{"annual_contribution":6.2e4,"completed_at":null,"contribution_ramp_years":3,"contribution_rate":2.0,"current_annual_contribution":3.8e4,"duration_years":25,"end_month":"2051-12","group_id":null,"id":78,"inflation_rate":3.0,"initial_balance":1.845e5,"investment_return_rate":1.5,"is_base":false,"is_recommended":false,"locked":false,"name":"Copie de Scénario recommandé","safety_threshold":2.5e4,"scope":"building","start_month":"2027-01","summary_narrative":null,"unit_numbers":[],"updated_at":"2026-10-20T14:03:11Z","works":[]}},"schema":{"additionalProperties":false,"properties":{"scenario":{"additionalProperties":false,"description":"A financing scenario with its planned works.","properties":{"annual_contribution":{"description":"Target yearly contribution (reached after the ramp), in CAD.","type":"number"},"completed_at":{"description":"When it was marked completed. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"contribution_ramp_years":{"description":"Years taken to go from the current contribution to the target, in equal steps.","type":"integer"},"contribution_rate":{"description":"Yearly increase of the contribution after the ramp, in percent.","type":["number","null"]},"current_annual_contribution":{"description":"Contribution paid today, in CAD.","type":["number","null"]},"duration_years":{"description":"Length of the projection in years.","type":["integer","null"]},"end_month":{"description":"End of the projection. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":"string"},"group_id":{"description":"The restricted-use group, for a group scenario.","minimum":1,"type":["integer","null"]},"id":{"description":"The scenario's id.","minimum":1,"type":"integer"},"inflation_rate":{"description":"Yearly inflation applied to work costs, in percent.","type":"number"},"initial_balance":{"description":"Fund balance at the start, in CAD.","type":"number"},"investment_return_rate":{"description":"Yearly return on the fund's average balance, in percent.","type":["number","null"]},"is_base":{"description":"The étude's base scenario: one per étude, created with it and never deleted. Placing a work in it, or moving the work's first occurrence, sets the work's estimated_year (« Année prévue »); taking the work out clears it.","type":"boolean"},"is_recommended":{"description":"The étude's recommended strategy (at most one building scenario).","type":"boolean"},"locked":{"description":"Completed, so read only: hypotheses, works and deletion are refused until reopened with update_scenario completed=false.","type":"boolean"},"name":{"description":"Name of the scenario.","type":"string"},"safety_threshold":{"description":"Minimum balance; a year falling below it gets a special contribution, in CAD.","type":["number","null"]},"scope":{"description":"building: a strategy for the whole reserve fund; group: the distinct contribution of a restricted-use group.","enum":["building","group"],"type":"string"},"start_month":{"description":"First month of the projection. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":"string"},"summary_narrative":{"description":"The report's paragraph on this strategy (HTML).","type":["string","null"]},"unit_numbers":{"description":"Units paying it (a group scenario); empty for the building.","items":{"description":"A unit number.","type":"string"},"type":"array"},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":"string"},"works":{"description":"Every work this scenario can plan (paid by the same payer), planned or not.","items":{"additionalProperties":false,"description":"A work the scenario can plan.","properties":{"estimated_year":{"description":"Year planned on the component's Travaux tab.","type":["integer","null"]},"moved_occurrences":{"description":"Occurrences moved to another year in this scenario.","items":{"additionalProperties":false,"description":"An occurrence moved to another year.","properties":{"from_year":{"description":"Year the recurrence gives the occurrence.","type":"integer"},"to_year":{"description":"Year it is paid in, in this scenario.","type":"integer"}},"required":["from_year","to_year"],"type":"object"},"type":"array"},"planned_month":{"description":"Start of the work in this scenario, from which its recurrence counts; null when the scenario leaves it out. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":["string","null"]},"task_id":{"description":"The work's id (see list_tasks).","minimum":1,"type":"integer"},"title":{"description":"Title of the work.","type":["string","null"]}},"required":["task_id","title","estimated_year","planned_month","moved_occurrences"],"type":"object"},"type":"array"}},"required":["annual_contribution","completed_at","contribution_ramp_years","contribution_rate","current_annual_contribution","duration_years","end_month","group_id","id","inflation_rate","initial_balance","investment_return_rate","is_base","is_recommended","locked","name","safety_threshold","scope","start_month","summary_narrative","unit_numbers","updated_at","works"],"type":"object"}},"required":["scenario"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Duplicate a financing scenario","tags":["financing"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Duplicate a financing scenario"},"x-roles":"owners, administrators and technicians"}},"/etudes/{etude_id}/report-scope":{"put":{"description":"Sets which components of an étude the report covers, replacing the whole selection with component_ids (send every id to keep, an empty list to clear it). Components left out stay in the étude with their data but are not printed nor projected. The ids are those of list_components for this étude; ids of another étude are refused. Use get_etude to see how many are selected. Does not create or delete components.","operationId":"set_report_scope","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"component_ids":[3301,3302,3310]},"schema":{"additionalProperties":false,"properties":{"component_ids":{"description":"Every component the report covers.","items":{"description":"A component id of this étude (see list_components).","minimum":1,"type":"integer"},"maxItems":2000,"type":"array"}},"required":["component_ids"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"component_ids":[3301,3302,3310],"count":3,"etude_id":41},"schema":{"additionalProperties":false,"properties":{"component_ids":{"description":"The components the report covers, by id.","items":{"description":"A component id.","type":"integer"},"type":"array"},"count":{"description":"How many.","minimum":0,"type":"integer"},"etude_id":{"description":"The étude.","minimum":1,"type":"integer"}},"required":["etude_id","component_ids","count"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Set the report's components","tags":["etudes"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Set the report's components"},"x-roles":"every member"}},"/etudes/{etude_id}/duplicate":{"post":{"description":"Copies an étude onto a new building, for a similar building or a new client: creates the building from the identity you give (with a NEQ, linked to its MaCopro owners' portal account), then a new étude with you as inspector, a new file number and today's date. The components with their descriptions, lifespans and constats (text only), and the report scope, are always copied; works (copy_travaux), maintenance (copy_entretien) and financing scenarios (copy_scenarios) only on request. Photos, generated documents and history are never copied. The source étude is unchanged. To revise the same building, use create_etude instead.","operationId":"duplicate_etude","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude to copy (see list_etudes).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"building":{"address":"1210, rue King Ouest","city":"Sherbrooke","postal_code":"J1H 1S2","syndicat_name":"Syndicat du 1210 King"},"copy_entretien":true,"copy_travaux":true},"schema":{"additionalProperties":false,"properties":{"building":{"additionalProperties":false,"description":"The new building's identity; complete it later with update_building.","properties":{"address":{"description":"Street address.","maxLength":255,"type":"string"},"city":{"description":"City.","maxLength":255,"type":"string"},"neq":{"description":"Quebec enterprise number of the syndicate: exactly 10 digits. Setting it links the building to its MaCopro owners' portal account (created if needed).","maxLength":10,"type":["string","null"]},"postal_code":{"description":"Postal code, e.g. H2X 3J6.","maxLength":20,"type":"string"},"syndicat_name":{"description":"Legal name of the syndicate of co-owners.","maxLength":255,"type":"string"}},"required":["address","city","postal_code","syndicat_name"],"type":"object"},"copy_entretien":{"description":"Also copy the maintenance (entretien) tasks. Default false.","type":"boolean"},"copy_scenarios":{"description":"Also copy the financing scenarios, with their planning of the copied tasks. Default false.","type":"boolean"},"copy_travaux":{"description":"Also copy the works (travaux) tasks. Default false.","type":"boolean"}},"required":["building"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"attendees":[],"etude":{"dossier_no":"CCETD-2026-0043","id":43},"inspector":{"email":"marie@exemple.ca","id":12,"name":"Marie Tremblay"},"progress":{"completed":0,"components":62,"in_report":40},"signatories":{"established_by":null,"site_visit":null,"writing":null}},"schema":{"additionalProperties":false,"properties":{"attendees":{"description":"People present at the inspection, in order.","items":{"additionalProperties":false,"description":"A person present at the inspection.","properties":{"id":{"description":"The attendee's id.","minimum":1,"type":"integer"},"name":{"description":"Full name.","type":"string"},"role":{"description":"In what capacity, e.g. Administrateur du syndicat, Gestionnaire.","type":["string","null"]}},"required":["id","name","role"],"type":"object"},"type":"array"},"etude":{"additionalProperties":false,"description":"An étude's header and study parameters.","properties":{"access_mode":{"description":"Who may open the étude: listed users only, administrators plus listed users, or every member.","enum":["users","admins","everyone"],"type":"string"},"access_user_ids":{"description":"Members explicitly given access.","items":{"description":"A member id.","type":"integer"},"type":"array"},"building":{"additionalProperties":false,"description":"The building studied.","properties":{"address":{"description":"Street address.","type":["string","null"]},"city":{"description":"City.","type":["string","null"]},"id":{"description":"The building's id.","minimum":1,"type":"integer"},"syndicat_name":{"description":"Name of the syndicate of co-owners.","type":["string","null"]}},"required":["id","address","city","syndicat_name"],"type":["object","null"]},"carnet_revision_year":{"description":"Year the maintenance log (carnet d'entretien) is next revised.","maximum":2100,"minimum":2000,"type":["integer","null"]},"current_annual_contribution":{"description":"Current yearly contribution to the fund. In CAD.","minimum":0,"type":["number","null"]},"dossier_no":{"description":"The firm's file number.","maxLength":100,"type":["string","null"]},"established_by_signatory_id":{"description":"Signatory who establishes the study (see list_signatories).","minimum":1,"type":["integer","null"]},"etude_date":{"description":"Date of the étude. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"fund_balance":{"description":"Reserve fund balance reported by the syndicate. In CAD.","minimum":0,"type":["number","null"]},"fund_balance_as_of":{"description":"Date of that balance. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"id":{"description":"The étude's id.","minimum":1,"type":"integer"},"inflation_rate":{"description":"Yearly inflation building scenarios start from, in percent (e.g. 3).","maximum":99.99,"minimum":0,"type":"number"},"inspection_date":{"description":"Date of the on-site examination (printed in the signed declarations). ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"inspector_id":{"description":"The member who inspects the building.","minimum":1,"type":["integer","null"]},"investment_return_rate":{"description":"Yearly return on the fund building scenarios start from, in percent.","maximum":99.99,"minimum":0,"type":"number"},"mandate_nature":{"description":"First study of the building, or a revision of an earlier one.","enum":["first_study","revision"],"type":"string"},"next_study_year":{"description":"Year the next study is due.","maximum":2100,"minimum":2000,"type":["integer","null"]},"notes":{"description":"Free notes on the étude, not printed in the report.","maxLength":20000,"type":["string","null"]},"reference_year":{"description":"First year of the projections.","maximum":2100,"minimum":2000,"type":["integer","null"]},"report_date":{"description":"Date printed on the report. ISO 8601 date (YYYY-MM-DD).","format":"date","type":["string","null"]},"safety_threshold":{"description":"Minimum fund balance the scenarios must keep. In CAD.","minimum":0,"type":["number","null"]},"site_visit_mode":{"description":"Whether the signatory visited the site themself, or supervised someone who did.","enum":["self","supervised"],"type":"string"},"site_visit_signatory_id":{"description":"Signatory for the site visit.","minimum":1,"type":["integer","null"]},"site_visit_supervisee_name":{"description":"Who visited under supervision (when site_visit_mode is supervised).","maxLength":200,"type":["string","null"]},"study_horizon_years":{"description":"Projection horizon in years; the regulation requires at least 25.","maximum":50,"minimum":25,"type":"integer"},"syndicat_rep":{"description":"Who represented the syndicate at the visit.","maxLength":200,"type":["string","null"]},"tax_rate":{"description":"Sales taxes (GST + QST) applied to costs, in percent.","type":"number"},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":"string"},"weather":{"description":"Weather during the site visit.","maxLength":200,"type":["string","null"]},"writing_signatory_id":{"description":"Signatory who wrote the report.","minimum":1,"type":["integer","null"]}},"required":["access_mode","access_user_ids","building","carnet_revision_year","current_annual_contribution","dossier_no","established_by_signatory_id","etude_date","fund_balance","fund_balance_as_of","id","inflation_rate","inspection_date","inspector_id","investment_return_rate","mandate_nature","next_study_year","notes","reference_year","report_date","safety_threshold","site_visit_mode","site_visit_signatory_id","site_visit_supervisee_name","study_horizon_years","syndicat_rep","tax_rate","updated_at","weather","writing_signatory_id"],"type":"object"},"inspector":{"additionalProperties":false,"description":"The member who inspects the building.","properties":{"email":{"description":"Email address.","type":"string"},"id":{"description":"The member's id.","minimum":1,"type":"integer"},"name":{"description":"Full name.","type":"string"}},"required":["id","name","email"],"type":["object","null"]},"progress":{"additionalProperties":false,"description":"How far the inspection is.","properties":{"completed":{"description":"Components marked complete.","minimum":0,"type":"integer"},"components":{"description":"Components (and sub-components) of the étude.","minimum":0,"type":"integer"},"in_report":{"description":"Components included in the report (set_report_scope).","minimum":0,"type":"integer"}},"required":["components","completed","in_report"],"type":"object"},"signatories":{"additionalProperties":false,"description":"The signatories' names (ids are in etude).","properties":{"established_by":{"description":"Name of the signatory who establishes the study.","type":["string","null"]},"site_visit":{"description":"Name of the signatory for the site visit.","type":["string","null"]},"writing":{"description":"Name of the signatory who wrote the report.","type":["string","null"]}},"required":["established_by","site_visit","writing"],"type":"object"}},"required":["etude","inspector","signatories","attendees","progress"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Duplicate an étude","tags":["etudes"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Duplicate an étude"},"x-roles":"every member"}},"/etudes/{etude_id}/deficiencies":{"get":{"description":"Lists the constats (deficiencies observed on site) of a whole étude, in component order, each with its component, title, HTML description, état and label, whether it is in the report, the copropriété horizontale flag and its photos (signed links valid about one hour). Filter by state, component_id or include_in_report. Paginated: pass next_cursor back as cursor. For one component's constats with its other details, use get_component. Read-only.","operationId":"list_deficiencies","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"description":"Only the constats of this component (see list_components).","in":"query","name":"component_id","required":false,"schema":{"description":"Only the constats of this component (see list_components).","minimum":1,"type":"integer"}},{"description":"The next_cursor of a previous call, to get the next page.","in":"query","name":"cursor","required":false,"schema":{"description":"The next_cursor of a previous call, to get the next page.","type":"string"}},{"description":"true: only constats printed in the report; false: only those left out.","in":"query","name":"include_in_report","required":false,"schema":{"description":"true: only constats printed in the report; false: only those left out.","type":"boolean"}},{"description":"How many results to return (default 50).","in":"query","name":"limit","required":false,"schema":{"description":"How many results to return (default 50).","maximum":200,"minimum":1,"type":"integer"}},{"description":"Only constats in this état (see get_account_context for the states).","in":"query","name":"state","required":false,"schema":{"description":"Only constats in this état (see get_account_context for the states).","maxLength":60,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"deficiencies":[{"component_display_code":"B2020","component_id":812,"component_name":"Fenêtres extérieures","copropriete_horizontale":false,"created_at":"2026-10-02T15:12:40Z","description":"<p>Plusieurs coupe-froid détachés sur la façade nord.</p>","id":977,"include_in_report":true,"photos":[],"state":"a_corriger","state_label":"À corriger immédiatement","title":"Coupe-froid détachés"}],"next_cursor":null},"schema":{"additionalProperties":false,"properties":{"deficiencies":{"description":"The constats.","items":{"additionalProperties":false,"description":"A constat (deficiency) on a component.","properties":{"component_display_code":{"description":"The component's code as printed, e.g. B2020-1.","type":"string"},"component_id":{"description":"The component it is on.","minimum":1,"type":"integer"},"component_name":{"description":"The component's label or element name.","type":["string","null"]},"copropriete_horizontale":{"description":"True when the constat concerns a horizontal co-ownership (copropriété horizontale).","type":"boolean"},"created_at":{"description":"When it was recorded. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"description":{"description":"The constat's text, HTML; null when it has none.","type":["string","null"]},"id":{"description":"The constat's id (deficiency_id in the other tools).","minimum":1,"type":"integer"},"include_in_report":{"description":"False when the constat is kept out of the report.","type":"boolean"},"photos":{"description":"Photos illustrating the constat.","items":{"additionalProperties":false,"description":"A photo of a component.","properties":{"component_id":{"description":"The component it belongs to.","minimum":1,"type":"integer"},"content_type":{"description":"MIME type, e.g. image/jpeg.","type":["string","null"]},"deficiency_id":{"description":"The constat it illustrates; null for a photo of the component itself.","minimum":1,"type":["integer","null"]},"file_name":{"description":"Original file name.","type":["string","null"]},"file_size":{"description":"Size in bytes.","type":["integer","null"]},"id":{"description":"The photo's id (photo_id in set_photo_title and delete_photo).","minimum":1,"type":"integer"},"tab":{"description":"The editor tab it was added on (general for the reference photos).","type":["string","null"]},"title":{"description":"Legend printed under the photo in the report.","type":["string","null"]},"url":{"description":"A signed link to the image, valid for about one hour; call again for a fresh one.","type":["string","null"]}},"required":["component_id","content_type","deficiency_id","file_name","file_size","id","tab","title","url"],"type":"object"},"type":"array"},"state":{"description":"Its état, one of the account's constat states (see get_account_context).","type":"string"},"state_label":{"description":"The état's label as the report prints it.","type":"string"},"title":{"description":"The constat's title (its first line).","type":"string"}},"required":["component_display_code","component_id","component_name","copropriete_horizontale","created_at","description","id","include_in_report","photos","state","state_label","title"],"type":"object"},"type":"array"},"next_cursor":{"description":"Pass it as cursor to get the next page; null on the last page.","type":["string","null"]}},"required":["deficiencies","next_cursor"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"List constats","tags":["deficiencies"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List constats"},"x-roles":"every member"}},"/etudes/{etude_id}/components/{component_id}/completion":{"put":{"description":"Marks a component's editor tabs complete, or reopens them. With tab (general for Description, specific for Constats, travaux, entretien) only that tab changes; without it, all four do. A component is complete once its four tabs are, and a complete tab refuses changes from the other tools until it is reopened. Returns the component in short with its completed_tabs. Does not change any field of the component (update_component).","operationId":"set_component_completion","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"component_id","required":true,"schema":{"description":"The component (see list_components).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"complete":true,"tab":"general"},"schema":{"additionalProperties":false,"properties":{"complete":{"description":"true marks complete; false reopens.","type":"boolean"},"tab":{"description":"Only this tab: general (Description), specific (Constats), travaux or entretien. Omit for all four.","enum":["general","specific","travaux","entretien"],"type":"string"}},"required":["complete"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"component":{"completed_at":null,"completed_tabs":["general"],"display_code":"B2020","id":812}},"schema":{"additionalProperties":false,"properties":{"component":{"additionalProperties":false,"description":"A component of the étude, in short.","properties":{"completed_at":{"description":"When all four tabs were marked complete; null until then. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"completed_tabs":{"description":"Editor tabs marked complete: general (Description), specific (Constats), travaux, entretien. A complete tab no longer changes until reopened.","items":{"description":"An editor tab.","enum":["general","specific","travaux","entretien"],"type":"string"},"type":"array"},"condition":{"description":"General condition. One of the account's condition_states values (get_account_context); by default bon, passable, mauvais, non_visible when it could not be seen, na when outside the study's scope.","type":["string","null"]},"display_code":{"description":"The code as the report prints it: B2020, or B2020-1 for a sub-component.","type":"string"},"element_name":{"description":"The UNIFORMAT element's name.","type":["string","null"]},"id":{"description":"The component's id (component_id in the other tools).","minimum":1,"type":"integer"},"is_subcomponent":{"description":"True for a sub-component added under a code (it can be deleted).","type":"boolean"},"lifespan_years":{"description":"Retained useful life, in years.","type":["integer","null"]},"selected_in_report":{"description":"True when the component is in the report's scope (see set_report_scope).","type":"boolean"},"subcomponent_label":{"description":"The sub-component's own label; null on the canonical component of the code.","type":["string","null"]},"subcomponent_number":{"description":"The sub-component's number under its code; null on the canonical component.","type":["integer","null"]},"uniformat_code":{"description":"Its UNIFORMAT II code, e.g. B2020.","type":"string"},"year_of_installation":{"description":"Year of installation.","type":["integer","null"]}},"required":["completed_at","completed_tabs","condition","display_code","element_name","id","is_subcomponent","lifespan_years","selected_in_report","subcomponent_label","subcomponent_number","uniformat_code","year_of_installation"],"type":"object"}},"required":["component"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Mark a component complete","tags":["components"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Mark a component complete"},"x-roles":"every member"}},"/etudes/{etude_id}/deficiencies/{deficiency_id}":{"delete":{"description":"Deletes a constat of an étude, with the photos attached to it. Cannot be undone. To keep it but leave it out of the report, use update_deficiency with include_in_report false instead. Refused with conflict when its component's Constats tab (specific) is marked complete. Find constat ids with list_deficiencies.","operationId":"delete_deficiency","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"deficiency_id","required":true,"schema":{"description":"The constat to delete (see list_deficiencies).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"deficiency_id":977,"deleted":true},"schema":{"additionalProperties":false,"properties":{"deficiency_id":{"description":"The deleted constat's id.","minimum":1,"type":"integer"},"deleted":{"description":"True when the constat was deleted.","type":"boolean"}},"required":["deleted","deficiency_id"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:delete"]}],"summary":"Delete a constat","tags":["deficiencies"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Delete a constat"},"x-roles":"every member"},"patch":{"description":"Changes a constat of an étude: its title, description, état (one of the account's constat states, see get_account_context), whether it is printed in the report, or the copropriété horizontale flag. Only the fields you send change; send description null to remove it. Refused with conflict when its component's Constats tab (specific) is marked complete. Find constat ids with list_deficiencies. Does not move it to another component, nor change its photos (set_photo_title, delete_photo).","operationId":"update_deficiency","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"deficiency_id","required":true,"schema":{"description":"The constat to change (see list_deficiencies).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"state":"a_surveiller"},"schema":{"additionalProperties":false,"properties":{"copropriete_horizontale":{"description":"True when the constat concerns a horizontal co-ownership (copropriété horizontale); default false.","type":"boolean"},"description":{"description":"The constat's text, HTML or plain text, printed in the report.","maxLength":50000,"type":["string","null"]},"include_in_report":{"description":"False keeps the constat out of the report (default true).","type":"boolean"},"state":{"description":"Its état: one of the account's constat states, e.g. a_surveiller (see get_account_context). The account's first state when omitted on creation.","maxLength":60,"type":"string"},"title":{"description":"The constat's title, one line.","maxLength":500,"minLength":1,"type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"deficiency":{"id":977,"state":"a_surveiller","state_label":"À surveiller","title":"Coupe-froid détachés"}},"schema":{"additionalProperties":false,"properties":{"deficiency":{"additionalProperties":false,"description":"A constat (deficiency) on a component.","properties":{"component_display_code":{"description":"The component's code as printed, e.g. B2020-1.","type":"string"},"component_id":{"description":"The component it is on.","minimum":1,"type":"integer"},"component_name":{"description":"The component's label or element name.","type":["string","null"]},"copropriete_horizontale":{"description":"True when the constat concerns a horizontal co-ownership (copropriété horizontale).","type":"boolean"},"created_at":{"description":"When it was recorded. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"description":{"description":"The constat's text, HTML; null when it has none.","type":["string","null"]},"id":{"description":"The constat's id (deficiency_id in the other tools).","minimum":1,"type":"integer"},"include_in_report":{"description":"False when the constat is kept out of the report.","type":"boolean"},"photos":{"description":"Photos illustrating the constat.","items":{"additionalProperties":false,"description":"A photo of a component.","properties":{"component_id":{"description":"The component it belongs to.","minimum":1,"type":"integer"},"content_type":{"description":"MIME type, e.g. image/jpeg.","type":["string","null"]},"deficiency_id":{"description":"The constat it illustrates; null for a photo of the component itself.","minimum":1,"type":["integer","null"]},"file_name":{"description":"Original file name.","type":["string","null"]},"file_size":{"description":"Size in bytes.","type":["integer","null"]},"id":{"description":"The photo's id (photo_id in set_photo_title and delete_photo).","minimum":1,"type":"integer"},"tab":{"description":"The editor tab it was added on (general for the reference photos).","type":["string","null"]},"title":{"description":"Legend printed under the photo in the report.","type":["string","null"]},"url":{"description":"A signed link to the image, valid for about one hour; call again for a fresh one.","type":["string","null"]}},"required":["component_id","content_type","deficiency_id","file_name","file_size","id","tab","title","url"],"type":"object"},"type":"array"},"state":{"description":"Its état, one of the account's constat states (see get_account_context).","type":"string"},"state_label":{"description":"The état's label as the report prints it.","type":"string"},"title":{"description":"The constat's title (its first line).","type":"string"}},"required":["component_display_code","component_id","component_name","copropriete_horizontale","created_at","description","id","include_in_report","photos","state","state_label","title"],"type":"object"}},"required":["deficiency"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Update a constat","tags":["deficiencies"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Update a constat"},"x-roles":"every member"}},"/etudes/{etude_id}/measurements/{measurement_id}":{"delete":{"description":"Deletes one row of a component's measurement takeoff (métré); the totals follow. Cannot be undone. Refused with conflict when the component's travaux tab is marked complete. Find measurement ids with get_component. Does not touch the component's other rows or its works.","operationId":"delete_measurement","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"measurement_id","required":true,"schema":{"description":"The measurement row to delete (see get_component).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"deleted":true,"measurement_id":55},"schema":{"additionalProperties":false,"properties":{"deleted":{"description":"True when the row was deleted.","type":"boolean"},"measurement_id":{"description":"The deleted row's id.","minimum":1,"type":"integer"}},"required":["deleted","measurement_id"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:delete"]}],"summary":"Delete a measurement","tags":["components"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Delete a measurement"},"x-roles":"every member"},"patch":{"description":"Changes one row of a component's measurement takeoff (métré): label, count, width, height, unit or position. Only the fields you send change. Refused with conflict when the component's travaux tab is marked complete. Find measurement ids with get_component. Does not move the row to another component; delete it and add_measurement there instead.","operationId":"update_measurement","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"measurement_id","required":true,"schema":{"description":"The measurement row (see get_component).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"quantity":26},"schema":{"additionalProperties":false,"properties":{"height":{"description":"Height (or length) of one element, in unit.","minimum":0,"type":["number","null"]},"label":{"description":"What is measured, e.g. « Fenêtre type A ».","maxLength":255,"type":["string","null"]},"position":{"description":"Order among the component's rows.","maximum":10000,"minimum":0,"type":"integer"},"quantity":{"description":"How many identical elements.","maximum":1000000,"minimum":0,"type":"integer"},"unit":{"description":"Unit of width and height: m (metres) or ft (feet).","enum":["m","ft"],"type":"string"},"width":{"description":"Width of one element, in unit.","minimum":0,"type":["number","null"]}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"measurement":{"component_id":812,"height":1.5,"id":55,"label":"Fenêtre type A","position":0,"quantity":26,"unit":"m","width":1.2}},"schema":{"additionalProperties":false,"properties":{"measurement":{"additionalProperties":false,"description":"A measurement takeoff (métré) row.","properties":{"component_id":{"description":"The component it belongs to.","minimum":1,"type":"integer"},"height":{"description":"Height (or length) of one element, in unit.","minimum":0,"type":["number","null"]},"id":{"description":"The measurement's id.","minimum":1,"type":"integer"},"label":{"description":"What is measured, e.g. « Fenêtre type A ».","maxLength":255,"type":["string","null"]},"position":{"description":"Order among the component's rows.","type":"integer"},"quantity":{"description":"How many identical elements.","type":"integer"},"unit":{"description":"Unit of width and height: m (metres) or ft (feet).","enum":["m","ft"],"type":"string"},"width":{"description":"Width of one element, in unit.","minimum":0,"type":["number","null"]}},"required":["component_id","height","id","label","position","quantity","unit","width"],"type":"object"}},"required":["measurement"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Update a measurement","tags":["components"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Update a measurement"},"x-roles":"every member"}},"/etudes/{etude_id}/tasks/{task_id}":{"delete":{"description":"Deletes a work (travaux) or maintenance task (entretien) of an étude, with its cost lines and maintenance steps; a work leaves the financing scenarios it was scheduled in. Cannot be undone. Refused with conflict when its component's travaux or entretien tab is marked complete. Find task ids with list_tasks. Does not touch the component itself.","operationId":"delete_task","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"task_id","required":true,"schema":{"description":"The task to delete (see list_tasks).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"deleted":true,"task_id":530},"schema":{"additionalProperties":false,"properties":{"deleted":{"description":"True when the task was deleted.","type":"boolean"},"task_id":{"description":"The deleted task's id.","minimum":1,"type":"integer"}},"required":["deleted","task_id"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:delete"]}],"summary":"Delete a work or maintenance task","tags":["tasks"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Delete a work or maintenance task"},"x-roles":"every member"},"get":{"description":"Returns one work (travaux) or maintenance task (entretien) of an étude in full: title, description, the firm's private note (never printed), component, intervention type, cost and its cost lines, taxes, planned year, lifespan and recurrence, frequency and recommended months, responsibility, the restricted-use group paying for it and its named maintenance steps. Use list_tasks to find task ids. Read-only.","operationId":"get_task","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"task_id","required":true,"schema":{"description":"The task (see list_tasks).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"task":{"component_id":812,"estimated_cost":8.64e4,"estimated_year":2034,"id":530,"intervention_type":"replacement","line_items":[{"description":"Fenêtre PVC à battant","id":77,"price_id":14,"price_overridden":false,"quantity":24.0,"subtotal":8.64e4,"unit_price":3.6e3}],"maintenance_steps":[],"task_type":"travaux","title":"Remplacement des fenêtres"}},"schema":{"additionalProperties":false,"properties":{"task":{"additionalProperties":false,"description":"A work or maintenance task, in full.","properties":{"component_id":{"description":"The component it is tied to, if any.","minimum":1,"type":["integer","null"]},"created_at":{"description":"When it was created. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"description":{"description":"Description printed in the report (HTML or plain text).","maxLength":50000,"type":["string","null"]},"display_code":{"description":"The code as the report prints it (B2020-1 for a sub-component).","type":["string","null"]},"estimated_cost":{"description":"Estimated cost; computed from line_items when they are sent. In CAD.","minimum":0,"type":["number","null"]},"estimated_year":{"description":"Year the work is planned (travaux); places it in the financing scenarios.","maximum":2200,"minimum":1900,"type":["integer","null"]},"frequency":{"description":"Maintenance frequency (entretien), e.g. annuelle.","type":["string","null"]},"id":{"description":"The task's id (task_id in the other tools).","minimum":1,"type":"integer"},"intervention_type":{"description":"What a travaux does to its component: major_repair, replacement, or a provision for either. Null for an entretien.","enum":["major_repair","replacement","major_repair_provision","replacement_provision",null],"type":["string","null"]},"is_one_time":{"description":"True for a one-off work; false (default) when it recurs after its lifespan.","type":"boolean"},"lifespan_years":{"description":"Useful life after the work, in years.","maximum":200,"minimum":0,"type":["integer","null"]},"line_items":{"description":"Cost lines.","items":{"additionalProperties":false,"description":"A cost line.","properties":{"description":{"description":"What the line covers.","type":["string","null"]},"id":{"description":"The line's id.","minimum":1,"type":"integer"},"price_id":{"description":"The catalogue price it came from.","minimum":1,"type":["integer","null"]},"price_overridden":{"description":"True when it keeps its own unit price.","type":"boolean"},"quantity":{"description":"Quantity.","type":["number","null"]},"subtotal":{"description":"Unit price times quantity. In CAD.","minimum":0,"type":["number","null"]},"unit_price":{"description":"Unit price. In CAD.","minimum":0,"type":["number","null"]}},"required":["description","id","price_id","price_overridden","quantity","subtotal","unit_price"],"type":"object"},"type":"array"},"maintenance_steps":{"description":"Named steps of a maintenance intervention.","items":{"additionalProperties":false,"description":"A maintenance step.","properties":{"description":{"description":"What the step involves.","type":["string","null"]},"id":{"description":"The step's id.","minimum":1,"type":"integer"},"label":{"description":"Name of the step, e.g. Inspection visuelle.","type":"string"},"position":{"description":"Order of the step.","type":"integer"}},"required":["description","id","label","position"],"type":"object"},"type":"array"},"next_due_year":{"description":"Next due year of the maintenance.","maximum":2200,"minimum":1900,"type":["integer","null"]},"priority":{"description":"Priority.","maxLength":50,"type":["string","null"]},"private_note":{"description":"The firm's private note on the task: shown in the app only, in no report.","maxLength":20000,"type":["string","null"]},"recommended_months":{"description":"Months the maintenance should be done (1-12).","items":{"description":"A month number.","type":"integer"},"type":"array"},"recurrence_years":{"description":"Years between occurrences; the lifespan when null.","maximum":200,"minimum":1,"type":["integer","null"]},"responsibility":{"description":"Who carries out the maintenance.","type":["string","null"]},"restricted_group_id":{"description":"The restricted-use group that pays for the work, when not the whole building.","minimum":1,"type":["integer","null"]},"status":{"description":"Status of the task (open by default).","type":["string","null"]},"task_type":{"description":"travaux (a work: repair or replacement) or entretien (maintenance).","enum":["travaux","entretien"],"type":"string"},"taxes_included":{"description":"True (default) when estimated_cost includes sales taxes; false to add them.","type":"boolean"},"title":{"description":"Title of the task.","type":"string"},"uniformat_code":{"description":"UNIFORMAT II code of its component.","type":["string","null"]},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]}},"required":["component_id","created_at","description","display_code","estimated_cost","estimated_year","frequency","id","intervention_type","is_one_time","lifespan_years","line_items","maintenance_steps","next_due_year","priority","private_note","recommended_months","recurrence_years","responsibility","restricted_group_id","status","task_type","taxes_included","title","uniformat_code","updated_at"],"type":"object"}},"required":["task"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"Get a work or maintenance task","tags":["tasks"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Get a work or maintenance task"},"x-roles":"every member"},"patch":{"description":"Changes a work (travaux) or maintenance task (entretien) of an étude: title, description, private note, component, intervention type, cost, taxes, planned year, lifespan, recurrence, frequency, recommended months, responsibility. Only the fields you send change. line_items, when sent, replace the whole list of cost lines and the cost becomes their sum; an empty list removes them. A travaux with a planned year moves in the financing scenarios. Refused with conflict when the component's matching tab is marked complete. Does not change the task type: delete_task and create_task for that.","operationId":"update_task","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"task_id","required":true,"schema":{"description":"The task to change (see list_tasks).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"estimated_year":2033},"schema":{"additionalProperties":false,"properties":{"component_id":{"description":"The component it is tied to (see list_components); sets its uniformat_code.","minimum":1,"type":["integer","null"]},"description":{"description":"Description printed in the report (HTML or plain text).","maxLength":50000,"type":["string","null"]},"estimated_cost":{"description":"Estimated cost; computed from line_items when they are sent. In CAD.","minimum":0,"type":["number","null"]},"estimated_year":{"description":"Year the work is planned (travaux); places it in the financing scenarios.","maximum":2200,"minimum":1900,"type":["integer","null"]},"frequency":{"description":"Maintenance frequency (entretien): semi_annuelle, annuelle, biannuelle (every 2 years), 5_ans, 10_ans, 15_ans, 20_ans or au_besoin (as needed).","enum":["semi_annuelle","annuelle","biannuelle","5_ans","10_ans","15_ans","20_ans","au_besoin",null],"type":["string","null"]},"intervention_type":{"description":"What a travaux does to its component: major_repair, replacement, or a provision for either. Null for an entretien.","enum":["major_repair","replacement","major_repair_provision","replacement_provision",null],"type":["string","null"]},"is_one_time":{"description":"True for a one-off work; false (default) when it recurs after its lifespan.","type":"boolean"},"lifespan_years":{"description":"Useful life after the work, in years.","maximum":200,"minimum":0,"type":["integer","null"]},"line_items":{"description":"Cost lines of a travaux; their subtotals make estimated_cost.","items":{"additionalProperties":false,"description":"A cost line: unit_price, or price_id, times quantity.","properties":{"description":{"description":"What the line covers.","maxLength":500,"type":["string","null"]},"price_id":{"description":"A price from the account's catalogue (see list_prices); gives the unit price when unit_price is omitted.","minimum":1,"type":["integer","null"]},"price_overridden":{"description":"True when the line keeps its own unit price instead of the catalogue's.","type":"boolean"},"quantity":{"description":"Quantity.","minimum":0,"type":"number"},"unit_price":{"description":"Unit price. In CAD.","minimum":0,"type":["number","null"]}},"required":["quantity"],"type":"object"},"maxItems":100,"type":"array"},"next_due_year":{"description":"Next due year of the maintenance.","maximum":2200,"minimum":1900,"type":["integer","null"]},"priority":{"description":"Priority.","maxLength":50,"type":["string","null"]},"private_note":{"description":"The firm's private note on the task: shown in the app only, in no report.","maxLength":20000,"type":["string","null"]},"recommended_months":{"description":"Months the maintenance should be done (1-12).","items":{"description":"A month number.","maximum":12,"minimum":1,"type":"integer"},"maxItems":12,"type":"array"},"recurrence_years":{"description":"Years between occurrences; the lifespan when null.","maximum":200,"minimum":1,"type":["integer","null"]},"responsibility":{"description":"Who carries out the maintenance: syndicat (default), coproprietaire (each co-owner) or shared.","enum":["syndicat","coproprietaire","shared"],"type":"string"},"taxes_included":{"description":"True (default) when estimated_cost includes sales taxes; false to add them.","type":"boolean"},"title":{"description":"Title of the task.","maxLength":255,"minLength":1,"type":"string"},"uniformat_code":{"description":"UNIFORMAT II code, when the task is tied to no component.","maxLength":20,"type":["string","null"]}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"task":{"estimated_year":2033,"id":530,"task_type":"travaux","title":"Remplacement des fenêtres"}},"schema":{"additionalProperties":false,"properties":{"task":{"additionalProperties":false,"description":"A work or maintenance task, in full.","properties":{"component_id":{"description":"The component it is tied to, if any.","minimum":1,"type":["integer","null"]},"created_at":{"description":"When it was created. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"description":{"description":"Description printed in the report (HTML or plain text).","maxLength":50000,"type":["string","null"]},"display_code":{"description":"The code as the report prints it (B2020-1 for a sub-component).","type":["string","null"]},"estimated_cost":{"description":"Estimated cost; computed from line_items when they are sent. In CAD.","minimum":0,"type":["number","null"]},"estimated_year":{"description":"Year the work is planned (travaux); places it in the financing scenarios.","maximum":2200,"minimum":1900,"type":["integer","null"]},"frequency":{"description":"Maintenance frequency (entretien), e.g. annuelle.","type":["string","null"]},"id":{"description":"The task's id (task_id in the other tools).","minimum":1,"type":"integer"},"intervention_type":{"description":"What a travaux does to its component: major_repair, replacement, or a provision for either. Null for an entretien.","enum":["major_repair","replacement","major_repair_provision","replacement_provision",null],"type":["string","null"]},"is_one_time":{"description":"True for a one-off work; false (default) when it recurs after its lifespan.","type":"boolean"},"lifespan_years":{"description":"Useful life after the work, in years.","maximum":200,"minimum":0,"type":["integer","null"]},"line_items":{"description":"Cost lines.","items":{"additionalProperties":false,"description":"A cost line.","properties":{"description":{"description":"What the line covers.","type":["string","null"]},"id":{"description":"The line's id.","minimum":1,"type":"integer"},"price_id":{"description":"The catalogue price it came from.","minimum":1,"type":["integer","null"]},"price_overridden":{"description":"True when it keeps its own unit price.","type":"boolean"},"quantity":{"description":"Quantity.","type":["number","null"]},"subtotal":{"description":"Unit price times quantity. In CAD.","minimum":0,"type":["number","null"]},"unit_price":{"description":"Unit price. In CAD.","minimum":0,"type":["number","null"]}},"required":["description","id","price_id","price_overridden","quantity","subtotal","unit_price"],"type":"object"},"type":"array"},"maintenance_steps":{"description":"Named steps of a maintenance intervention.","items":{"additionalProperties":false,"description":"A maintenance step.","properties":{"description":{"description":"What the step involves.","type":["string","null"]},"id":{"description":"The step's id.","minimum":1,"type":"integer"},"label":{"description":"Name of the step, e.g. Inspection visuelle.","type":"string"},"position":{"description":"Order of the step.","type":"integer"}},"required":["description","id","label","position"],"type":"object"},"type":"array"},"next_due_year":{"description":"Next due year of the maintenance.","maximum":2200,"minimum":1900,"type":["integer","null"]},"priority":{"description":"Priority.","maxLength":50,"type":["string","null"]},"private_note":{"description":"The firm's private note on the task: shown in the app only, in no report.","maxLength":20000,"type":["string","null"]},"recommended_months":{"description":"Months the maintenance should be done (1-12).","items":{"description":"A month number.","type":"integer"},"type":"array"},"recurrence_years":{"description":"Years between occurrences; the lifespan when null.","maximum":200,"minimum":1,"type":["integer","null"]},"responsibility":{"description":"Who carries out the maintenance.","type":["string","null"]},"restricted_group_id":{"description":"The restricted-use group that pays for the work, when not the whole building.","minimum":1,"type":["integer","null"]},"status":{"description":"Status of the task (open by default).","type":["string","null"]},"task_type":{"description":"travaux (a work: repair or replacement) or entretien (maintenance).","enum":["travaux","entretien"],"type":"string"},"taxes_included":{"description":"True (default) when estimated_cost includes sales taxes; false to add them.","type":"boolean"},"title":{"description":"Title of the task.","type":"string"},"uniformat_code":{"description":"UNIFORMAT II code of its component.","type":["string","null"]},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]}},"required":["component_id","created_at","description","display_code","estimated_cost","estimated_year","frequency","id","intervention_type","is_one_time","lifespan_years","line_items","maintenance_steps","next_due_year","priority","private_note","recommended_months","recurrence_years","responsibility","restricted_group_id","status","task_type","taxes_included","title","uniformat_code","updated_at"],"type":"object"}},"required":["task"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Update a work or maintenance task","tags":["tasks"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Update a work or maintenance task"},"x-roles":"every member"}},"/etudes/{etude_id}/scenarios/{scenario_id}/projection":{"get":{"description":"Computes a financing scenario's projection over its period, as its page shows it: one row per year with opening balance, contributions, special contribution (added when the fund would fall below the safety threshold), interest, works paid (taxes and inflation included) and closing balance; the study's metrics (totals, special contribution years, lowest and final balance, and the smallest target contribution avoiding special contributions); and every work the scenario can plan with its start month and moved occurrences. include_minimal_targets adds the smallest target for each ramp length (slower). Amounts in CAD. Read-only; not available to inspectors. List scenarios with list_scenarios.","operationId":"get_scenario_projection","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"scenario_id","required":true,"schema":{"description":"The scenario (see list_scenarios).","minimum":1,"type":"integer"}},{"description":"Also compute the minimal target for each ramp length (default false; slower).","in":"query","name":"include_minimal_targets","required":false,"schema":{"description":"Also compute the minimal target for each ramp length (default false; slower).","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"example":{"metrics":{"contribution_first_year":4.6e4,"contribution_last_year":9.87e4,"final_balance":3.555e5,"final_ratio_years":3.6,"first_year":2027,"last_year":2051,"lowest_balance":3.12e4,"special_total":0.0,"special_years":[],"suggested_target":null,"total_contributions":1.82e6,"total_interest":6.1e4,"total_works":1.71e6},"minimal_targets":null,"scenario":{"annual_contribution":6.2e4,"completed_at":null,"contribution_ramp_years":3,"contribution_rate":2.0,"current_annual_contribution":3.8e4,"duration_years":25,"end_month":"2051-12","group_id":null,"id":77,"inflation_rate":3.0,"initial_balance":1.845e5,"investment_return_rate":1.5,"is_base":false,"is_recommended":false,"locked":false,"name":"Scénario recommandé","safety_threshold":2.5e4,"scope":"building","start_month":"2027-01","summary_narrative":null,"unit_numbers":[],"updated_at":"2026-10-20T14:03:11Z","works":[]},"years":[{"closing_balance":215212.5,"contribution":4.6e4,"interest":3112.5,"lowest_balance":184210.0,"opening_balance":1.845e5,"special_contribution":0.0,"works":[{"cost":1.84e4,"moved_from_year":null,"task_id":902,"title":"Scellant des joints"}],"works_total":1.84e4,"year":2027}]},"schema":{"additionalProperties":false,"properties":{"metrics":{"additionalProperties":false,"description":"The study's figures; null when the scenario has no month to project.","properties":{"contribution_first_year":{"description":"Contribution of the first year, in CAD.","type":"number"},"contribution_last_year":{"description":"Contribution of the last year, in CAD.","type":"number"},"final_balance":{"description":"Balance at the end of the study, in CAD.","type":"number"},"final_ratio_years":{"description":"That balance in years of the last contribution.","type":["number","null"]},"first_year":{"description":"First year.","type":"integer"},"last_year":{"description":"Last year of the study.","type":"integer"},"lowest_balance":{"description":"Lowest month-end balance of the study, in CAD.","type":["number","null"]},"special_total":{"description":"All special contributions, in CAD.","type":"number"},"special_years":{"description":"The years with a special contribution.","items":{"additionalProperties":false,"description":"A year with a special contribution.","properties":{"amount":{"description":"Special contribution, in CAD.","type":"number"},"year":{"description":"Year.","type":"integer"}},"required":["year","amount"],"type":"object"},"type":"array"},"suggested_target":{"description":"When there are special contributions: the smallest target yearly contribution (steps of 100 $) that avoids them with the current ramp; null otherwise or when none below 10 M$ does.","type":["integer","null"]},"total_contributions":{"description":"All regular contributions, in CAD.","type":"number"},"total_interest":{"description":"All investment return, in CAD.","type":"number"},"total_works":{"description":"All works paid, in CAD.","type":"number"}},"required":["first_year","last_year","contribution_first_year","contribution_last_year","total_contributions","total_works","total_interest","special_total","special_years","lowest_balance","final_balance","final_ratio_years","suggested_target"],"type":["object","null"]},"minimal_targets":{"description":"Minimal targets by ramp; null unless include_minimal_targets was true.","items":{"additionalProperties":false,"description":"A ramp and its minimal target.","properties":{"ramp_years":{"description":"Years of ramp from the current contribution.","type":"integer"},"target":{"description":"Smallest target yearly contribution with no special contribution, in CAD.","type":["integer","null"]}},"required":["ramp_years","target"],"type":"object"},"type":["array","null"]},"scenario":{"additionalProperties":false,"description":"A financing scenario with its planned works.","properties":{"annual_contribution":{"description":"Target yearly contribution (reached after the ramp), in CAD.","type":"number"},"completed_at":{"description":"When it was marked completed. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"contribution_ramp_years":{"description":"Years taken to go from the current contribution to the target, in equal steps.","type":"integer"},"contribution_rate":{"description":"Yearly increase of the contribution after the ramp, in percent.","type":["number","null"]},"current_annual_contribution":{"description":"Contribution paid today, in CAD.","type":["number","null"]},"duration_years":{"description":"Length of the projection in years.","type":["integer","null"]},"end_month":{"description":"End of the projection. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":"string"},"group_id":{"description":"The restricted-use group, for a group scenario.","minimum":1,"type":["integer","null"]},"id":{"description":"The scenario's id.","minimum":1,"type":"integer"},"inflation_rate":{"description":"Yearly inflation applied to work costs, in percent.","type":"number"},"initial_balance":{"description":"Fund balance at the start, in CAD.","type":"number"},"investment_return_rate":{"description":"Yearly return on the fund's average balance, in percent.","type":["number","null"]},"is_base":{"description":"The étude's base scenario: one per étude, created with it and never deleted. Placing a work in it, or moving the work's first occurrence, sets the work's estimated_year (« Année prévue »); taking the work out clears it.","type":"boolean"},"is_recommended":{"description":"The étude's recommended strategy (at most one building scenario).","type":"boolean"},"locked":{"description":"Completed, so read only: hypotheses, works and deletion are refused until reopened with update_scenario completed=false.","type":"boolean"},"name":{"description":"Name of the scenario.","type":"string"},"safety_threshold":{"description":"Minimum balance; a year falling below it gets a special contribution, in CAD.","type":["number","null"]},"scope":{"description":"building: a strategy for the whole reserve fund; group: the distinct contribution of a restricted-use group.","enum":["building","group"],"type":"string"},"start_month":{"description":"First month of the projection. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":"string"},"summary_narrative":{"description":"The report's paragraph on this strategy (HTML).","type":["string","null"]},"unit_numbers":{"description":"Units paying it (a group scenario); empty for the building.","items":{"description":"A unit number.","type":"string"},"type":"array"},"updated_at":{"description":"Last change. ISO 8601 date-time, UTC.","format":"date-time","type":"string"},"works":{"description":"Every work this scenario can plan (paid by the same payer), planned or not.","items":{"additionalProperties":false,"description":"A work the scenario can plan.","properties":{"estimated_year":{"description":"Year planned on the component's Travaux tab.","type":["integer","null"]},"moved_occurrences":{"description":"Occurrences moved to another year in this scenario.","items":{"additionalProperties":false,"description":"An occurrence moved to another year.","properties":{"from_year":{"description":"Year the recurrence gives the occurrence.","type":"integer"},"to_year":{"description":"Year it is paid in, in this scenario.","type":"integer"}},"required":["from_year","to_year"],"type":"object"},"type":"array"},"planned_month":{"description":"Start of the work in this scenario, from which its recurrence counts; null when the scenario leaves it out. Month as YYYY-MM.","maxLength":7,"minLength":7,"type":["string","null"]},"task_id":{"description":"The work's id (see list_tasks).","minimum":1,"type":"integer"},"title":{"description":"Title of the work.","type":["string","null"]}},"required":["task_id","title","estimated_year","planned_month","moved_occurrences"],"type":"object"},"type":"array"}},"required":["annual_contribution","completed_at","contribution_ramp_years","contribution_rate","current_annual_contribution","duration_years","end_month","group_id","id","inflation_rate","initial_balance","investment_return_rate","is_base","is_recommended","locked","name","safety_threshold","scope","start_month","summary_narrative","unit_numbers","updated_at","works"],"type":"object"},"years":{"description":"The projection, one row per year.","items":{"additionalProperties":false,"description":"One year of the projection.","properties":{"closing_balance":{"description":"Balance at the end of the year, in CAD.","type":"number"},"contribution":{"description":"Regular contributions of the year, in CAD.","type":"number"},"interest":{"description":"Investment return credited, in CAD.","type":"number"},"lowest_balance":{"description":"Lowest month-end balance of the year, in CAD.","type":"number"},"opening_balance":{"description":"Balance at the start of the year, in CAD.","type":"number"},"special_contribution":{"description":"Special contribution needed to stay above the safety threshold, in CAD.","type":"number"},"works":{"description":"The works paid that year.","items":{"additionalProperties":false,"description":"A work paid that year.","properties":{"cost":{"description":"Cost paid that year, in CAD.","type":"number"},"moved_from_year":{"description":"Year the recurrence gave it, when moved to this year.","type":["integer","null"]},"task_id":{"description":"The work's id.","minimum":1,"type":["integer","null"]},"title":{"description":"Title of the work.","type":["string","null"]}},"required":["task_id","title","cost","moved_from_year"],"type":"object"},"type":"array"},"works_total":{"description":"Works paid, taxes and inflation included, in CAD.","type":"number"},"year":{"description":"Calendar year.","type":"integer"}},"required":["year","opening_balance","contribution","special_contribution","interest","works_total","closing_balance","lowest_balance","works"],"type":"object"},"type":"array"}},"required":["scenario","years","metrics","minimal_targets"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"Get a scenario's projection","tags":["financing"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Get a scenario's projection"},"x-roles":"owners, administrators and technicians"}},"/etudes/{etude_id}/components/{component_id}":{"delete":{"description":"Deletes a sub-component of an étude (one added with add_subcomponent), with its constats, photos and measurements, and takes it out of the report's scope. Cannot be undone. The canonical component of a UNIFORMAT code cannot be deleted: take it out of the report with set_report_scope instead. Works and maintenance tasks tied to it are kept, no longer tied to a component (delete them with delete_task).","operationId":"delete_subcomponent","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"component_id","required":true,"schema":{"description":"The sub-component to delete (see list_components).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"component_id":1290,"deleted":true},"schema":{"additionalProperties":false,"properties":{"component_id":{"description":"The deleted sub-component's id.","minimum":1,"type":"integer"},"deleted":{"description":"True when the sub-component was deleted.","type":"boolean"}},"required":["deleted","component_id"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:delete"]}],"summary":"Delete a sub-component","tags":["components"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Delete a sub-component"},"x-roles":"every member"},"get":{"description":"Returns one component of an étude in full: condition, installation year, lifespans, description notes, the firm's private note (never printed in a report), constats text, method, maintenance fields, the measurement takeoff (métré) with its totals, its photos with signed links valid about one hour, its constats with their photos, and a summary of its works and maintenance tasks (get_task for a task's lines). Use list_components to find component ids. Read-only.","operationId":"get_component","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"component_id","required":true,"schema":{"description":"The component (see list_components).","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"component":{"condition":"passable","deficiencies":[],"display_code":"B2020","element_name":"Fenêtres extérieures","id":812,"lifespan_years":30,"measurement_totals":{"area_m2":43.2,"perimeter_m":129.6},"measurements":[{"component_id":812,"height":1.5,"id":55,"label":"Fenêtre type A","position":0,"quantity":24,"unit":"m","width":1.2}],"notes":"<p>Fenêtres à battant en PVC, double vitrage.</p>","photos":[],"private_note":"Vérifier la facture du remplacement partiel de 2019.","tasks":[],"uniformat_code":"B2020","year_of_installation":2004}},"schema":{"additionalProperties":false,"properties":{"component":{"additionalProperties":false,"description":"A component of the étude, in full.","properties":{"install_year_estimated":{"description":"True when the installation year was estimated on site rather than documented.","type":"boolean"},"measurement_totals":{"additionalProperties":false,"description":"Totals of the measurement takeoff, converted to metres.","properties":{"area_m2":{"description":"Total area of every row, in square metres.","type":"number"},"perimeter_m":{"description":"Total perimeter of every row, in metres.","type":"number"}},"required":["area_m2","perimeter_m"],"type":"object"},"specific_conditions":{"description":"Specific conditions observed (Constats tab text, HTML or plain text).","maxLength":50000,"type":["string","null"]},"selected_in_report":{"description":"True when the component is in the report's scope (see set_report_scope).","type":"boolean"},"display_code":{"description":"The code as the report prints it: B2020, or B2020-1 for a sub-component.","type":"string"},"next_cycle_year":{"description":"Year of the replacement after the one in the horizon.","type":["integer","null"]},"maintenance_description":{"description":"Maintenance description (HTML or plain text).","maxLength":50000,"type":["string","null"]},"lifespan_max_years":{"description":"High end of the typical useful life, in years.","maximum":200,"minimum":0,"type":["integer","null"]},"year_of_installation":{"description":"Year of installation.","maximum":2200,"minimum":1800,"type":["integer","null"]},"subcomponent_label":{"description":"The sub-component's own label; null on the canonical component of the code.","type":["string","null"]},"is_subcomponent":{"description":"True for a sub-component added under a code (it can be deleted).","type":"boolean"},"tasks":{"description":"Works and maintenance tasks of the component.","items":{"additionalProperties":false,"description":"A work or maintenance task, in short.","properties":{"component_id":{"description":"The component it is tied to, if any.","minimum":1,"type":["integer","null"]},"display_code":{"description":"The code as the report prints it (B2020-1 for a sub-component).","type":["string","null"]},"estimated_cost":{"description":"Estimated cost. In CAD.","minimum":0,"type":["number","null"]},"estimated_year":{"description":"Year the work is planned (travaux).","type":["integer","null"]},"frequency":{"description":"Maintenance frequency (entretien), e.g. annuelle.","type":["string","null"]},"id":{"description":"The task's id (task_id in the other tools).","minimum":1,"type":"integer"},"intervention_type":{"description":"What a travaux does to its component: major_repair, replacement, or a provision for either. Null for an entretien.","enum":["major_repair","replacement","major_repair_provision","replacement_provision",null],"type":["string","null"]},"task_type":{"description":"travaux (a work: repair or replacement) or entretien (maintenance).","enum":["travaux","entretien"],"type":"string"},"title":{"description":"Title of the task.","type":"string"},"uniformat_code":{"description":"UNIFORMAT II code of its component.","type":["string","null"]}},"required":["component_id","display_code","estimated_cost","estimated_year","frequency","id","intervention_type","task_type","title","uniformat_code"],"type":"object"},"type":"array"},"restricted_group_id":{"description":"The restricted-use group the component belongs to, if any.","minimum":1,"type":["integer","null"]},"deficiencies":{"description":"The component's constats.","items":{"additionalProperties":false,"description":"A constat (deficiency) on a component.","properties":{"component_display_code":{"description":"The component's code as printed, e.g. B2020-1.","type":"string"},"component_id":{"description":"The component it is on.","minimum":1,"type":"integer"},"component_name":{"description":"The component's label or element name.","type":["string","null"]},"copropriete_horizontale":{"description":"True when the constat concerns a horizontal co-ownership (copropriété horizontale).","type":"boolean"},"created_at":{"description":"When it was recorded. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"description":{"description":"The constat's text, HTML; null when it has none.","type":["string","null"]},"id":{"description":"The constat's id (deficiency_id in the other tools).","minimum":1,"type":"integer"},"include_in_report":{"description":"False when the constat is kept out of the report.","type":"boolean"},"photos":{"description":"Photos illustrating the constat.","items":{"additionalProperties":false,"description":"A photo of a component.","properties":{"component_id":{"description":"The component it belongs to.","minimum":1,"type":"integer"},"content_type":{"description":"MIME type, e.g. image/jpeg.","type":["string","null"]},"deficiency_id":{"description":"The constat it illustrates; null for a photo of the component itself.","minimum":1,"type":["integer","null"]},"file_name":{"description":"Original file name.","type":["string","null"]},"file_size":{"description":"Size in bytes.","type":["integer","null"]},"id":{"description":"The photo's id (photo_id in set_photo_title and delete_photo).","minimum":1,"type":"integer"},"tab":{"description":"The editor tab it was added on (general for the reference photos).","type":["string","null"]},"title":{"description":"Legend printed under the photo in the report.","type":["string","null"]},"url":{"description":"A signed link to the image, valid for about one hour; call again for a fresh one.","type":["string","null"]}},"required":["component_id","content_type","deficiency_id","file_name","file_size","id","tab","title","url"],"type":"object"},"type":"array"},"state":{"description":"Its état, one of the account's constat states (see get_account_context).","type":"string"},"state_label":{"description":"The état's label as the report prints it.","type":"string"},"title":{"description":"The constat's title (its first line).","type":"string"}},"required":["component_display_code","component_id","component_name","copropriete_horizontale","created_at","description","id","include_in_report","photos","state","state_label","title"],"type":"object"},"type":"array"},"condition":{"description":"General condition. One of the account's condition_states values (get_account_context); by default bon, passable, mauvais, non_visible when it could not be seen, na when outside the study's scope.","type":["string","null"]},"id":{"description":"The component's id (component_id in the other tools).","minimum":1,"type":"integer"},"method":{"description":"Inspection method used for this component (HTML or plain text).","maxLength":20000,"type":["string","null"]},"measurements":{"description":"The measurement takeoff (métré) rows.","items":{"additionalProperties":false,"description":"A measurement takeoff (métré) row.","properties":{"component_id":{"description":"The component it belongs to.","minimum":1,"type":"integer"},"height":{"description":"Height (or length) of one element, in unit.","minimum":0,"type":["number","null"]},"id":{"description":"The measurement's id.","minimum":1,"type":"integer"},"label":{"description":"What is measured, e.g. « Fenêtre type A ».","maxLength":255,"type":["string","null"]},"position":{"description":"Order among the component's rows.","type":"integer"},"quantity":{"description":"How many identical elements.","type":"integer"},"unit":{"description":"Unit of width and height: m (metres) or ft (feet).","enum":["m","ft"],"type":"string"},"width":{"description":"Width of one element, in unit.","minimum":0,"type":["number","null"]}},"required":["component_id","height","id","label","position","quantity","unit","width"],"type":"object"},"type":"array"},"photos":{"description":"The component's photos, constat photos included.","items":{"additionalProperties":false,"description":"A photo of a component.","properties":{"component_id":{"description":"The component it belongs to.","minimum":1,"type":"integer"},"content_type":{"description":"MIME type, e.g. image/jpeg.","type":["string","null"]},"deficiency_id":{"description":"The constat it illustrates; null for a photo of the component itself.","minimum":1,"type":["integer","null"]},"file_name":{"description":"Original file name.","type":["string","null"]},"file_size":{"description":"Size in bytes.","type":["integer","null"]},"id":{"description":"The photo's id (photo_id in set_photo_title and delete_photo).","minimum":1,"type":"integer"},"tab":{"description":"The editor tab it was added on (general for the reference photos).","type":["string","null"]},"title":{"description":"Legend printed under the photo in the report.","type":["string","null"]},"url":{"description":"A signed link to the image, valid for about one hour; call again for a fresh one.","type":["string","null"]}},"required":["component_id","content_type","deficiency_id","file_name","file_size","id","tab","title","url"],"type":"object"},"type":"array"},"maintenance_priority":{"description":"Maintenance priority.","maxLength":255,"type":["string","null"]},"goal":{"description":"Objective of the inspection of this component.","maxLength":20000,"type":["string","null"]},"lifespan_years":{"description":"Retained useful life, in years.","maximum":200,"minimum":0,"type":["integer","null"]},"travaux_note":{"description":"The Travaux tab's notepad: the firm's own note, in no report.","maxLength":20000,"type":["string","null"]},"no_intervention_reason":{"description":"Why no intervention is planned in the horizon, when none is.","maxLength":255,"type":["string","null"]},"private_note":{"description":"The firm's private note on the component: shown in the app only, never printed in a report.","maxLength":20000,"type":["string","null"]},"completed_at":{"description":"When all four tabs were marked complete; null until then. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"no_intervention_note":{"description":"Explanation printed with that reason.","maxLength":5000,"type":["string","null"]},"subcomponent_number":{"description":"The sub-component's number under its code; null on the canonical component.","type":["integer","null"]},"lifespan_min_years":{"description":"Low end of the typical useful life, in years.","maximum":200,"minimum":0,"type":["integer","null"]},"element_name":{"description":"The UNIFORMAT element's name.","type":["string","null"]},"completed_tabs":{"description":"Editor tabs marked complete: general (Description), specific (Constats), travaux, entretien. A complete tab no longer changes until reopened.","items":{"description":"An editor tab.","enum":["general","specific","travaux","entretien"],"type":"string"},"type":"array"},"maintenance_estimated_cost":{"description":"Estimated maintenance cost. In CAD.","minimum":0,"type":["number","null"]},"notes":{"description":"Description of the component, printed in the report (HTML or plain text).","maxLength":50000,"type":["string","null"]},"uniformat_code":{"description":"Its UNIFORMAT II code, e.g. B2020.","type":"string"},"maintenance_frequency":{"description":"Maintenance frequency.","maxLength":255,"type":["string","null"]}},"required":["install_year_estimated","measurement_totals","specific_conditions","selected_in_report","display_code","next_cycle_year","maintenance_description","lifespan_max_years","year_of_installation","subcomponent_label","is_subcomponent","tasks","restricted_group_id","deficiencies","condition","id","method","measurements","photos","maintenance_priority","goal","lifespan_years","travaux_note","no_intervention_reason","private_note","completed_at","no_intervention_note","subcomponent_number","lifespan_min_years","element_name","completed_tabs","maintenance_estimated_cost","notes","uniformat_code","maintenance_frequency"],"type":"object"}},"required":["component"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"Get a component","tags":["components"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Get a component"},"x-roles":"every member"},"patch":{"description":"Changes the fields of one component of an étude: general condition, installation year (and whether it is estimated), retained and typical lifespans, description notes, the firm's private note (never printed), constats text, method and goal, the Travaux notepad, maintenance description, frequency, cost and priority, and the no-intervention reason. Only the fields you send change; send null to clear one. Refused with conflict when the field's editor tab is marked complete (reopen it with set_component_completion). Does not touch constats (add_deficiency), measurements, photos or tasks.","operationId":"update_component","parameters":[{"in":"path","name":"etude_id","required":true,"schema":{"description":"The étude (see list_etudes).","minimum":1,"type":"integer"}},{"in":"path","name":"component_id","required":true,"schema":{"description":"The component to change (see list_components).","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{"condition":"passable","lifespan_years":30,"notes":"<p>Fenêtres à battant en PVC, double vitrage. Coupe-froid usés.</p>","year_of_installation":2004},"schema":{"additionalProperties":false,"properties":{"condition":{"description":"General condition. One of the account's condition_states values (get_account_context); by default bon, passable, mauvais, non_visible when it could not be seen, na when outside the study's scope.","type":["string","null"]},"goal":{"description":"Objective of the inspection of this component.","maxLength":20000,"type":["string","null"]},"install_year_estimated":{"description":"True when the installation year was estimated on site rather than documented.","type":"boolean"},"lifespan_max_years":{"description":"High end of the typical useful life, in years.","maximum":200,"minimum":0,"type":["integer","null"]},"lifespan_min_years":{"description":"Low end of the typical useful life, in years.","maximum":200,"minimum":0,"type":["integer","null"]},"lifespan_years":{"description":"Retained useful life, in years.","maximum":200,"minimum":0,"type":["integer","null"]},"maintenance_description":{"description":"Maintenance description (HTML or plain text).","maxLength":50000,"type":["string","null"]},"maintenance_estimated_cost":{"description":"Estimated maintenance cost. In CAD.","minimum":0,"type":["number","null"]},"maintenance_frequency":{"description":"Maintenance frequency.","maxLength":255,"type":["string","null"]},"maintenance_priority":{"description":"Maintenance priority.","maxLength":255,"type":["string","null"]},"method":{"description":"Inspection method used for this component (HTML or plain text).","maxLength":20000,"type":["string","null"]},"no_intervention_note":{"description":"Explanation printed with that reason.","maxLength":5000,"type":["string","null"]},"no_intervention_reason":{"description":"Why no intervention is planned in the horizon, when none is.","maxLength":255,"type":["string","null"]},"notes":{"description":"Description of the component, printed in the report (HTML or plain text).","maxLength":50000,"type":["string","null"]},"private_note":{"description":"The firm's private note on the component: shown in the app only, never printed in a report.","maxLength":20000,"type":["string","null"]},"specific_conditions":{"description":"Specific conditions observed (Constats tab text, HTML or plain text).","maxLength":50000,"type":["string","null"]},"travaux_note":{"description":"The Travaux tab's notepad: the firm's own note, in no report.","maxLength":20000,"type":["string","null"]},"year_of_installation":{"description":"Year of installation.","maximum":2200,"minimum":1800,"type":["integer","null"]}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"component":{"condition":"passable","display_code":"B2020","id":812,"lifespan_years":30,"year_of_installation":2004}},"schema":{"additionalProperties":false,"properties":{"component":{"additionalProperties":false,"description":"A component of the étude, in full.","properties":{"install_year_estimated":{"description":"True when the installation year was estimated on site rather than documented.","type":"boolean"},"measurement_totals":{"additionalProperties":false,"description":"Totals of the measurement takeoff, converted to metres.","properties":{"area_m2":{"description":"Total area of every row, in square metres.","type":"number"},"perimeter_m":{"description":"Total perimeter of every row, in metres.","type":"number"}},"required":["area_m2","perimeter_m"],"type":"object"},"specific_conditions":{"description":"Specific conditions observed (Constats tab text, HTML or plain text).","maxLength":50000,"type":["string","null"]},"selected_in_report":{"description":"True when the component is in the report's scope (see set_report_scope).","type":"boolean"},"display_code":{"description":"The code as the report prints it: B2020, or B2020-1 for a sub-component.","type":"string"},"next_cycle_year":{"description":"Year of the replacement after the one in the horizon.","type":["integer","null"]},"maintenance_description":{"description":"Maintenance description (HTML or plain text).","maxLength":50000,"type":["string","null"]},"lifespan_max_years":{"description":"High end of the typical useful life, in years.","maximum":200,"minimum":0,"type":["integer","null"]},"year_of_installation":{"description":"Year of installation.","maximum":2200,"minimum":1800,"type":["integer","null"]},"subcomponent_label":{"description":"The sub-component's own label; null on the canonical component of the code.","type":["string","null"]},"is_subcomponent":{"description":"True for a sub-component added under a code (it can be deleted).","type":"boolean"},"tasks":{"description":"Works and maintenance tasks of the component.","items":{"additionalProperties":false,"description":"A work or maintenance task, in short.","properties":{"component_id":{"description":"The component it is tied to, if any.","minimum":1,"type":["integer","null"]},"display_code":{"description":"The code as the report prints it (B2020-1 for a sub-component).","type":["string","null"]},"estimated_cost":{"description":"Estimated cost. In CAD.","minimum":0,"type":["number","null"]},"estimated_year":{"description":"Year the work is planned (travaux).","type":["integer","null"]},"frequency":{"description":"Maintenance frequency (entretien), e.g. annuelle.","type":["string","null"]},"id":{"description":"The task's id (task_id in the other tools).","minimum":1,"type":"integer"},"intervention_type":{"description":"What a travaux does to its component: major_repair, replacement, or a provision for either. Null for an entretien.","enum":["major_repair","replacement","major_repair_provision","replacement_provision",null],"type":["string","null"]},"task_type":{"description":"travaux (a work: repair or replacement) or entretien (maintenance).","enum":["travaux","entretien"],"type":"string"},"title":{"description":"Title of the task.","type":"string"},"uniformat_code":{"description":"UNIFORMAT II code of its component.","type":["string","null"]}},"required":["component_id","display_code","estimated_cost","estimated_year","frequency","id","intervention_type","task_type","title","uniformat_code"],"type":"object"},"type":"array"},"restricted_group_id":{"description":"The restricted-use group the component belongs to, if any.","minimum":1,"type":["integer","null"]},"deficiencies":{"description":"The component's constats.","items":{"additionalProperties":false,"description":"A constat (deficiency) on a component.","properties":{"component_display_code":{"description":"The component's code as printed, e.g. B2020-1.","type":"string"},"component_id":{"description":"The component it is on.","minimum":1,"type":"integer"},"component_name":{"description":"The component's label or element name.","type":["string","null"]},"copropriete_horizontale":{"description":"True when the constat concerns a horizontal co-ownership (copropriété horizontale).","type":"boolean"},"created_at":{"description":"When it was recorded. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"description":{"description":"The constat's text, HTML; null when it has none.","type":["string","null"]},"id":{"description":"The constat's id (deficiency_id in the other tools).","minimum":1,"type":"integer"},"include_in_report":{"description":"False when the constat is kept out of the report.","type":"boolean"},"photos":{"description":"Photos illustrating the constat.","items":{"additionalProperties":false,"description":"A photo of a component.","properties":{"component_id":{"description":"The component it belongs to.","minimum":1,"type":"integer"},"content_type":{"description":"MIME type, e.g. image/jpeg.","type":["string","null"]},"deficiency_id":{"description":"The constat it illustrates; null for a photo of the component itself.","minimum":1,"type":["integer","null"]},"file_name":{"description":"Original file name.","type":["string","null"]},"file_size":{"description":"Size in bytes.","type":["integer","null"]},"id":{"description":"The photo's id (photo_id in set_photo_title and delete_photo).","minimum":1,"type":"integer"},"tab":{"description":"The editor tab it was added on (general for the reference photos).","type":["string","null"]},"title":{"description":"Legend printed under the photo in the report.","type":["string","null"]},"url":{"description":"A signed link to the image, valid for about one hour; call again for a fresh one.","type":["string","null"]}},"required":["component_id","content_type","deficiency_id","file_name","file_size","id","tab","title","url"],"type":"object"},"type":"array"},"state":{"description":"Its état, one of the account's constat states (see get_account_context).","type":"string"},"state_label":{"description":"The état's label as the report prints it.","type":"string"},"title":{"description":"The constat's title (its first line).","type":"string"}},"required":["component_display_code","component_id","component_name","copropriete_horizontale","created_at","description","id","include_in_report","photos","state","state_label","title"],"type":"object"},"type":"array"},"condition":{"description":"General condition. One of the account's condition_states values (get_account_context); by default bon, passable, mauvais, non_visible when it could not be seen, na when outside the study's scope.","type":["string","null"]},"id":{"description":"The component's id (component_id in the other tools).","minimum":1,"type":"integer"},"method":{"description":"Inspection method used for this component (HTML or plain text).","maxLength":20000,"type":["string","null"]},"measurements":{"description":"The measurement takeoff (métré) rows.","items":{"additionalProperties":false,"description":"A measurement takeoff (métré) row.","properties":{"component_id":{"description":"The component it belongs to.","minimum":1,"type":"integer"},"height":{"description":"Height (or length) of one element, in unit.","minimum":0,"type":["number","null"]},"id":{"description":"The measurement's id.","minimum":1,"type":"integer"},"label":{"description":"What is measured, e.g. « Fenêtre type A ».","maxLength":255,"type":["string","null"]},"position":{"description":"Order among the component's rows.","type":"integer"},"quantity":{"description":"How many identical elements.","type":"integer"},"unit":{"description":"Unit of width and height: m (metres) or ft (feet).","enum":["m","ft"],"type":"string"},"width":{"description":"Width of one element, in unit.","minimum":0,"type":["number","null"]}},"required":["component_id","height","id","label","position","quantity","unit","width"],"type":"object"},"type":"array"},"photos":{"description":"The component's photos, constat photos included.","items":{"additionalProperties":false,"description":"A photo of a component.","properties":{"component_id":{"description":"The component it belongs to.","minimum":1,"type":"integer"},"content_type":{"description":"MIME type, e.g. image/jpeg.","type":["string","null"]},"deficiency_id":{"description":"The constat it illustrates; null for a photo of the component itself.","minimum":1,"type":["integer","null"]},"file_name":{"description":"Original file name.","type":["string","null"]},"file_size":{"description":"Size in bytes.","type":["integer","null"]},"id":{"description":"The photo's id (photo_id in set_photo_title and delete_photo).","minimum":1,"type":"integer"},"tab":{"description":"The editor tab it was added on (general for the reference photos).","type":["string","null"]},"title":{"description":"Legend printed under the photo in the report.","type":["string","null"]},"url":{"description":"A signed link to the image, valid for about one hour; call again for a fresh one.","type":["string","null"]}},"required":["component_id","content_type","deficiency_id","file_name","file_size","id","tab","title","url"],"type":"object"},"type":"array"},"maintenance_priority":{"description":"Maintenance priority.","maxLength":255,"type":["string","null"]},"goal":{"description":"Objective of the inspection of this component.","maxLength":20000,"type":["string","null"]},"lifespan_years":{"description":"Retained useful life, in years.","maximum":200,"minimum":0,"type":["integer","null"]},"travaux_note":{"description":"The Travaux tab's notepad: the firm's own note, in no report.","maxLength":20000,"type":["string","null"]},"no_intervention_reason":{"description":"Why no intervention is planned in the horizon, when none is.","maxLength":255,"type":["string","null"]},"private_note":{"description":"The firm's private note on the component: shown in the app only, never printed in a report.","maxLength":20000,"type":["string","null"]},"completed_at":{"description":"When all four tabs were marked complete; null until then. ISO 8601 date-time, UTC.","format":"date-time","type":["string","null"]},"no_intervention_note":{"description":"Explanation printed with that reason.","maxLength":5000,"type":["string","null"]},"subcomponent_number":{"description":"The sub-component's number under its code; null on the canonical component.","type":["integer","null"]},"lifespan_min_years":{"description":"Low end of the typical useful life, in years.","maximum":200,"minimum":0,"type":["integer","null"]},"element_name":{"description":"The UNIFORMAT element's name.","type":["string","null"]},"completed_tabs":{"description":"Editor tabs marked complete: general (Description), specific (Constats), travaux, entretien. A complete tab no longer changes until reopened.","items":{"description":"An editor tab.","enum":["general","specific","travaux","entretien"],"type":"string"},"type":"array"},"maintenance_estimated_cost":{"description":"Estimated maintenance cost. In CAD.","minimum":0,"type":["number","null"]},"notes":{"description":"Description of the component, printed in the report (HTML or plain text).","maxLength":50000,"type":["string","null"]},"uniformat_code":{"description":"Its UNIFORMAT II code, e.g. B2020.","type":"string"},"maintenance_frequency":{"description":"Maintenance frequency.","maxLength":255,"type":["string","null"]}},"required":["install_year_estimated","measurement_totals","specific_conditions","selected_in_report","display_code","next_cycle_year","maintenance_description","lifespan_max_years","year_of_installation","subcomponent_label","is_subcomponent","tasks","restricted_group_id","deficiencies","condition","id","method","measurements","photos","maintenance_priority","goal","lifespan_years","travaux_note","no_intervention_reason","private_note","completed_at","no_intervention_note","subcomponent_number","lifespan_min_years","element_name","completed_tabs","maintenance_estimated_cost","notes","uniformat_code","maintenance_frequency"],"type":"object"}},"required":["component"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"validation_failed"}},"security":[{"bearer":[]},{"oauth2":["etudes:write"]}],"summary":"Update a component","tags":["components"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Update a component"},"x-roles":"every member"}},"/uniformat":{"get":{"description":"Searches the UNIFORMAT II classification (ASTM E1557, names in French) the études are organised by: categories (level 1, e.g. B), group elements (level 2, e.g. B20) and individual elements (level 3, e.g. B2020, the components inspected). Filter by text in the name or code, and/or by code prefix; with neither, returns the whole tree in order. Use the codes to filter list_prices or list_text_templates. Does not list an étude's own components or sub-components (list_components). Read-only.","operationId":"search_uniformat_elements","parameters":[{"description":"Only elements whose code starts with this, e.g. B or B20.","in":"query","name":"code","required":false,"schema":{"description":"Only elements whose code starts with this, e.g. B or B20.","maxLength":10,"type":"string"}},{"description":"Text to look for in the element's name or code, accents and case ignored.","in":"query","name":"query","required":false,"schema":{"description":"Text to look for in the element's name or code, accents and case ignored.","maxLength":100,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"elements":[{"code":"B2020","level":3,"name":"Fenêtres et vitrages extérieurs","parent_code":"B20","parent_name":"Façades extérieures"}]},"schema":{"additionalProperties":false,"properties":{"elements":{"description":"The matching elements, in tree order.","items":{"additionalProperties":false,"description":"An element of the classification.","properties":{"code":{"description":"The UNIFORMAT II code.","type":"string"},"level":{"description":"1 for a category, 2 for a group element, 3 for an individual element.","maximum":3,"minimum":1,"type":"integer"},"name":{"description":"The element's name, in French.","type":"string"},"parent_code":{"description":"Code of the element one level up; null for a category.","type":["string","null"]},"parent_name":{"description":"Name of the element one level up.","type":["string","null"]}},"required":["code","name","level","parent_code","parent_name"],"type":"object"},"type":"array"}},"required":["elements"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"Search Uniformat II elements","tags":["context"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Search Uniformat II elements"},"x-roles":"every member"}},"/users":{"get":{"description":"Lists the members of the firm's account with their id, name, email and role (owner, admin, technician or inspector), sorted by name. Use it to find the id to pass as an étude's inspector_id (create_etude, update_etude) or in set_etude_access. Does not list signatories, who need not be members (list_signatories), nor invite or remove anyone. Read-only; takes no arguments.","operationId":"list_account_users","parameters":[],"responses":{"200":{"content":{"application/json":{"example":{"users":[{"email":"marie@exemple.ca","id":12,"name":"Marie Tremblay","role":"admin"},{"email":"luc@exemple.ca","id":15,"name":"Luc Gagnon","role":"technician"}]},"schema":{"additionalProperties":false,"properties":{"users":{"description":"The members, by name.","items":{"additionalProperties":false,"description":"A member of the account.","properties":{"email":{"description":"Email address.","type":"string"},"id":{"description":"The member's id.","minimum":1,"type":"integer"},"name":{"description":"Full name, or the email when no name is set.","type":"string"},"role":{"description":"Role in the account: owner, admin, technician or inspector.","examples":["owner","admin","technician","inspector"],"type":"string"}},"required":["id","name","email","role"],"type":"object"},"type":"array"}},"required":["users"],"type":"object"}}},"description":"Success"},"401":{"description":"Missing, invalid or revoked token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"insufficient_scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid_arguments"}},"security":[{"bearer":[]},{"oauth2":["etudes:read"]}],"summary":"List account members","tags":["context"],"x-admin-only":false,"x-mcp-annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List account members"},"x-roles":"every member"}}},"security":[{"bearer":[]},{"oauth2":["etudes:read","etudes:write","etudes:delete"]}],"servers":[{"url":"https://carnetcopro.ca/api/v1"}],"tags":[{"description":"Account and reference","name":"context"},{"description":"Buildings","name":"buildings"},{"description":"Études","name":"etudes"},{"description":"Components","name":"components"},{"description":"Constats (deficiencies)","name":"deficiencies"},{"description":"Works and maintenance","name":"tasks"},{"description":"Restricted-use groups","name":"groups"},{"description":"Financing scenarios","name":"financing"},{"description":"Documents and report","name":"documents"}]}