{"openapi":"3.1.0","info":{"title":"Router.law API","description":"Fills and checks Ontario legal forms from a client profile. Returns files for human review. Does not give legal advice and does not file anything.","version":"0.0.1"},"paths":{"/v1/forms":{"get":{"summary":"List supported forms","description":"Every form Router.law can fill, with what it is for and who uses it.","operationId":"list_forms_v1_forms_get","parameters":[{"name":"family","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"\"scc\" or \"ab\"","title":"Family"},"description":"\"scc\" or \"ab\""}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/forms/find":{"post":{"summary":"Suggest forms for a situation","description":"Suggests candidate forms with reasons. Never chooses: confirm with the person.","operationId":"find_form_v1_forms_find_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/forms/updates":{"get":{"summary":"Versions of the official forms in use","description":"The official form version and SHA-256 Router.law Forms fills now, to detect changes.","operationId":"check_form_updates_v1_forms_updates_get","parameters":[{"name":"form_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Repeat to list several","title":"Form Id"},"description":"Repeat to list several"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/forms/{form_id}":{"get":{"summary":"One form: questions, input schema, notes","description":"What the form needs: the questions to ask, the JSON Schema of the input, the parts\na person must complete, and filing and deadline notes printed on the form.","operationId":"get_form_spec_v1_forms__form_id__get","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","title":"Form Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/forms/{form_id}/validate":{"post":{"summary":"Check a profile for one form (no PDF)","description":"Errors, warnings and missing fields, each with the question to ask the person.","operationId":"validate_v1_forms__form_id__validate_post","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","title":"Form Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/forms/{form_id}/fill":{"post":{"summary":"Fill one official form","description":"The checked report plus the filled official PDF (base64). For human review.","operationId":"fill_form_v1_forms__form_id__fill_post","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","title":"Form Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FillRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/fill-many":{"post":{"summary":"Fill several forms from one profile","description":"One result per form, each with its own report and PDF.","operationId":"fill_many_v1_fill_many_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FillManyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools":{"get":{"summary":"Every tool, from every provider","description":"The tools this service offers, which provider serves each, the scope each needs and\nwhere it applies. Router.law Forms is the only provider for now.","operationId":"list_tools_v1_tools_get","parameters":[{"name":"jurisdiction","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}(-[A-Z0-9]{1,3})?$"},{"type":"null"}],"description":"ISO 3166-2 code, e.g. \"CA-ON\"","title":"Jurisdiction"},"description":"ISO 3166-2 code, e.g. \"CA-ON\""}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/usage":{"get":{"summary":"This account's metered calls","description":"Calls and units for the key's account, per day, tool and outcome. Free during early\naccess; counted from day one. Totals since the service last restarted.","operationId":"usage_v1_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/health":{"get":{"summary":"Service health and version","description":"Use to confirm the service is up and to read the engine and API versions.","operationId":"health_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health V1 Health Get"}}}}}}}},"components":{"schemas":{"FillManyRequest":{"properties":{"profile":{"additionalProperties":true,"type":"object","title":"Profile","description":"The client profile (see get_form_spec input_schema). Never stored."},"flatten":{"type":"boolean","title":"Flatten","description":"Return a non-editable PDF.","default":false},"password":{"anyOf":[{"type":"string","maxLength":128,"minLength":12},{"type":"null"}],"title":"Password","description":"Encrypt the PDF (AES-256)."},"form_ids":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"Form Ids"}},"additionalProperties":false,"type":"object","required":["profile","form_ids"],"title":"FillManyRequest"},"FillRequest":{"properties":{"profile":{"additionalProperties":true,"type":"object","title":"Profile","description":"The client profile (see get_form_spec input_schema). Never stored."},"flatten":{"type":"boolean","title":"Flatten","description":"Return a non-editable PDF.","default":false},"password":{"anyOf":[{"type":"string","maxLength":128,"minLength":12},{"type":"null"}],"title":"Password","description":"Encrypt the PDF (AES-256)."}},"additionalProperties":false,"type":"object","required":["profile"],"title":"FillRequest"},"FindRequest":{"properties":{"situation":{"type":"string","maxLength":2000,"title":"Situation","description":"The person's situation in plain words. Not stored and not echoed back.","examples":["I was rear-ended last week and need to apply for accident benefits"]},"family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Family","description":"Limit to one family: \"scc\" or \"ab\"."}},"additionalProperties":false,"type":"object","required":["situation"],"title":"FindRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ProfileRequest":{"properties":{"profile":{"additionalProperties":true,"type":"object","title":"Profile","description":"The client profile (see get_form_spec input_schema). Never stored."}},"additionalProperties":false,"type":"object","required":["profile"],"title":"ProfileRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}