{
  "openapi": "3.1.0",
  "info": {
    "title": "Plenda API",
    "version": "1.0.0",
    "summary": "Impartial EHCP deadlines and plan checks",
    "description": "Plenda gives impartial, cited information about education, health and care (EHC) needs assessments and EHC plans in England, for families, young people and professionals. Use ehcp_next_steps to explain a stage and what happens next, ehcp_calculate_deadlines to work out statutory deadlines from dates the user gives, ehcp_check_plan to check a draft or final EHC plan section by section, ehcp_check_wording to check one piece of provision or a report recommendation for specificity, ehcp_challenge_options for the ways to challenge a decision and their time limits, ehcp_check_letter to check a council letter or notice for the content the law requires, and for good practice, and ehcp_explain for a term or rule. Before sending any text, remove the child's name, date of birth, address, school name if the user prefers, NHS number and other identifiers; refer to \"the child\" or \"the young person\". Use the dates and citations Plenda returns rather than answering from memory, and give the source when you state a deadline or rule. Set audience (role in ehcp_next_steps) to who is asking: the wording fits a parent, a young person, a school, a professional or the council, and staff are told what the parent or young person can do. Give year_group (the school year now) when you know it, for a young person asking too: the rights are the parent's until the end of compulsory school age, which is the last Friday in June of the school year in which the child turns 16 (usually the end of Year 11), and the young person's after it. Plenda is impartial: it explains what the law and the SEND Code of Practice say and the options that exist, and never says who is right. It is not legal advice. England only: for Wales, Scotland or Northern Ireland, say that the systems differ and point to the local information service. No authentication is needed. Nothing sent is stored or logged.",
    "contact": {
      "name": "Eshmere Ltd",
      "email": "hello@plenda.co.uk",
      "url": "https://plenda.co.uk"
    },
    "termsOfService": "https://plenda.co.uk/terms"
  },
  "servers": [
    {
      "url": "https://plenda.co.uk"
    }
  ],
  "paths": {
    "/api/v1/tools": {
      "get": {
        "operationId": "list_tools",
        "summary": "List the tools",
        "description": "Every tool with its name, title, description and JSON Schemas.",
        "responses": {
          "200": {
            "description": "The tools",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "required": [
                    "tools"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools/next_steps": {
      "post": {
        "operationId": "ehcp_next_steps",
        "summary": "EHCP next steps",
        "description": "Use this when someone in England asks where they are with an EHCP (EHC plan) or what happens next: asking the council or LA for an EHC needs assessment, waiting for a decision, the 20 weeks, a draft plan and the 15 days to comment, naming a school, a final plan, the annual review, moving school (phase transfer), turning 16, a plan not being delivered, SEN support, or after the SEND Tribunal (SENDIST). Call it first when the situation is vague. Give the stage if the user knows it. Otherwise give events_so_far (event types, with dates if known; rough dates are fine): Plenda works out the stage, or the stages that overlap, from the latest event and says which event it used. With no input it returns a short map of the process and three questions that place the user on it. Returns what happens now, who decides, who holds the rights (the parent, or the young person after the last Friday in June of the school year in which they turn 16, usually the end of Year 11, not the 16th birthday), the next date for the family and for the council (counted by the deadline engine with bank holidays, and the Tribunal's August and Christmas rules), up to 3 next actions, what to prepare (for a request: the legal test in s 36(8) and a checklist), the phase transfer dates (before 15 February between school phases, before 31 March from secondary school to post-16, or at least 5 months before a move between post-16 institutions), static support lines, which tool to call next, free help, and a case_summary of ids and dates the user can save and paste back. Answers follow the law in force on 30 September 2026; SEND reform proposals are not law. Inputs are ids, dates and numbers only: never put names or the family's story in them. Before the user pastes a plan or letter into another tool, offer to replace names with [CHILD], [SCHOOL] and [PARENT] and say what you removed. Do not use for a full list of dates (use ehcp_calculate_deadlines), the ways to challenge a decision (use ehcp_challenge_options), checking a plan (use ehcp_check_plan) or a letter (use ehcp_check_letter), or what a term means (use ehcp_explain). Not for Wales, Scotland or Northern Ireland.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stage": {
                    "type": "string",
                    "enum": [
                      "sen_support",
                      "requesting",
                      "deciding_to_assess",
                      "assessing",
                      "deciding_to_issue",
                      "draft_plan",
                      "naming_a_school",
                      "final_plan",
                      "plan_not_delivered",
                      "annual_review",
                      "amendment",
                      "phase_transfer",
                      "reassessment",
                      "ceasing",
                      "moving_area",
                      "becoming_a_young_person",
                      "personal_budgets",
                      "eotas_and_home_education",
                      "after_tribunal",
                      "getting_records"
                    ],
                    "description": "The stage, if the user has said where they are. Leave out to have Plenda work it out from events_so_far. sen_support: A child or young person gets, or may need, extra help at school or college without an EHC plan.. requesting: You want the council to assess whether a child or young person needs an EHC plan.. deciding_to_assess: The council is deciding, or has decided, whether to carry out an EHC needs assessment.. assessing: The council has agreed to assess and is gathering advice.. deciding_to_issue: The assessment is finished, or nearly, and the council is deciding whether a plan is needed.. draft_plan: The council has sent a draft plan for comments.. naming_a_school: You want a particular school or college named in section I.. final_plan: The council has issued the final plan.. plan_not_delivered: The plan is final, but the help in it is not happening.. annual_review: The plan is due for its review, or a review meeting has been held.. amendment: The council has proposed changes to the plan, or you want it changed.. phase_transfer: A move between phases of education is coming, such as primary to secondary.. reassessment: You want a full new assessment for a child or young person who already has a plan.. ceasing: The council is considering ending the plan, or has decided to.. moving_area: The family is moving, or has moved, to another council area in England.. becoming_a_young_person: The rights pass to the young person after the last Friday in June of the school year in which they turn 16.. personal_budgets: You want to know about, or ask for, a personal budget.. eotas_and_home_education: You want the plan's help outside school, or you are home educating.. after_tribunal: The Tribunal has decided, or the council has conceded the appeal.. getting_records: You want copies of reports, notes or council policies.."
                  },
                  "events_so_far": {
                    "type": "array",
                    "maxItems": 40,
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "request_received",
                            "brought_to_attention",
                            "council_became_responsible",
                            "decision_to_assess_notified",
                            "decision_not_to_assess_notified",
                            "advice_requested",
                            "advice_received",
                            "decision_not_to_issue_notified",
                            "draft_plan_sent",
                            "final_plan_issued",
                            "previous_review",
                            "review_meeting",
                            "review_invitations_sent",
                            "review_advice_sent",
                            "review_report_sent",
                            "review_decision_notified",
                            "amendment_proposal_sent",
                            "amended_plan_issued",
                            "reassessment_requested",
                            "reassessment_decision_notified",
                            "reassessment_decided",
                            "reassessed_plan_issued",
                            "cease_decision_notified",
                            "transfer_between_phases",
                            "moved_to_new_council",
                            "new_council_informed_family",
                            "appealable_decision_sent",
                            "mediation_adviser_told_no_mediation",
                            "council_told_wants_mediation",
                            "mediation_ended",
                            "mediation_certificate_issued",
                            "appeal_registered",
                            "appeal_response_sent",
                            "appeal_not_opposed",
                            "tribunal_order_made",
                            "recommendation_made",
                            "recommendation_response_sent",
                            "recommendation_response_copied",
                            "subject_access_request_made",
                            "foi_request_made"
                          ],
                          "description": "What happened. request_received: The council received the request for an EHC needs assessment. brought_to_attention: The child or young person was brought to the council's attention as someone who may have special educational needs. council_became_responsible: The council became responsible for the child or young person (for example after moving into the area). decision_to_assess_notified: The council told the family it will carry out an assessment. decision_not_to_assess_notified: The council told the family it will not carry out an assessment. advice_requested: The council asked a professional or service for advice. advice_received: The advice was received. decision_not_to_issue_notified: The council told the family it will not issue an EHC plan. draft_plan_sent: The council sent the draft EHC plan. final_plan_issued: The council sent the final EHC plan. previous_review: The last annual review meeting for the plan. review_meeting: The annual review meeting (held or planned). review_invitations_sent: Invitations to the review meeting were sent. review_advice_sent: The advice and information for the review meeting was sent to everyone invited. review_report_sent: The review report was sent after the meeting. review_decision_notified: The council told the family its decision after the review (keep, amend or stop the plan). amendment_proposal_sent: The council sent proposed amendments to the plan. amended_plan_issued: The council sent the final amended plan, or its decision not to amend. reassessment_requested: The council received a request for a re-assessment. reassessment_decision_notified: The council told the family whether it will re-assess. reassessment_decided: The council decided to re-assess on its own initiative. reassessed_plan_issued: The council sent the plan after re-assessment, or its decision not to amend. cease_decision_notified: The council told the family it has decided to stop maintaining the plan. transfer_between_phases: The date the child or young person moves to the next phase of education. moved_to_new_council: The plan transferred to a new council after a move. new_council_informed_family: The new council told the family about the transferred plan. appealable_decision_sent: The council sent written notice of a decision that can be appealed. mediation_adviser_told_no_mediation: The family told the mediation adviser they do not want mediation. council_told_wants_mediation: The council was told the family wants mediation. mediation_ended: Mediation ended. mediation_certificate_issued: The mediation certificate was issued. appeal_registered: The council received the appeal from the SEND Tribunal. appeal_response_sent: The council sent its response to the appeal to the Tribunal. appeal_not_opposed: The council told the Tribunal, before sending its response, that it will not oppose the appeal. tribunal_order_made: The SEND Tribunal made its order. recommendation_made: The SEND Tribunal made a health or social care recommendation. recommendation_response_sent: The council or the health body sent its written reply to a Tribunal health or social care recommendation. recommendation_response_copied: The council sent the Secretary of State a copy of the written reply to a Tribunal health or social care recommendation. subject_access_request_made: A request for personal information (subject access request) was received. foi_request_made: A freedom of information request was received."
                        },
                        "date": {
                          "type": "string",
                          "format": "date",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "description": "The date (YYYY-MM-DD), if known. Leave it out if the user does not know it; never guess. For a rough date or a range (\"mid-March\", \"early March\"), the first possible day, with approximate true (and date_latest if the user knows the last possible day). Only a planned event (transfer_between_phases, review_meeting, or date_basis planned) can be after today."
                        },
                        "date_latest": {
                          "type": "string",
                          "format": "date",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "description": "Only when the user knows a range: the last possible day (YYYY-MM-DD). Leave out for a single date."
                        },
                        "date_basis": {
                          "type": "string",
                          "enum": [
                            "sent",
                            "emailed",
                            "posted",
                            "received",
                            "on_letter",
                            "approximate",
                            "held",
                            "planned"
                          ],
                          "description": "What the date is, if not the usual for this event. sent: the day it was sent (by an unknown method). emailed: the day it was sent by email. posted: the day it was posted. received: the day it was received. on_letter: the date printed on the letter or email. approximate: a rough date. held: the day it took place. planned: the day it is planned for."
                        },
                        "approximate": {
                          "type": "boolean",
                          "description": "True if the user only knows the date roughly: date is then the earliest day it could have been."
                        },
                        "outcome": {
                          "type": "string",
                          "enum": [
                            "keep",
                            "amend",
                            "cease",
                            "reassess",
                            "refuse",
                            "amended",
                            "not_amended"
                          ],
                          "description": "For review_decision_notified: keep (no change), amend (change the plan) or cease (stop the plan). For reassessment_decision_notified: reassess or refuse. For reassessed_plan_issued: amended (an amended or replacement plan was sent) or not_amended (a decision not to amend or replace it)."
                        },
                        "transfer_kind": {
                          "type": "string",
                          "enum": [
                            "school_phase",
                            "secondary_to_post16",
                            "post16_other_time"
                          ],
                          "description": "For transfer_between_phases. school_phase: Between school phases (for example early years to school, infant to junior, primary to secondary). secondary_to_post16: From secondary school to a post-16 institution (such as a college). post16_other_time: From one post-16 institution to another (at any time of year, including the start of an academic year)."
                        },
                        "order_kind": {
                          "type": "string",
                          "enum": [
                            "assess",
                            "make_plan",
                            "remit",
                            "amend_needs_or_provision",
                            "amend_placement",
                            "continue_and_amend",
                            "continue",
                            "cease"
                          ],
                          "description": "For tribunal_order_made or appeal_not_opposed. assess: Carry out an assessment or re-assessment. make_plan: Make and maintain an EHC plan. remit: Reconsider the decision (the case is referred back to the council). amend_needs_or_provision: Amend the special educational needs or provision in the plan. amend_placement: Change the school or institution (or type) named in the plan. continue_and_amend: Continue to maintain the plan and amend it; if the order also changes the school or institution (or type), give amend_placement as well, as its own event with the same date. continue: Continue to maintain the plan. cease: Allow the council to stop maintaining the plan."
                        },
                        "advice_type": {
                          "type": "string",
                          "enum": [
                            "educational",
                            "health",
                            "psychological",
                            "social_care",
                            "preparing_for_adulthood",
                            "other"
                          ],
                          "description": "For advice_requested and advice_received: which advice, to pair a request with its advice. educational: Educational advice, usually from the school or setting (reg 6(1)(b)); health: Medical or health advice, such as from a paediatrician or therapist (reg 6(1)(c)); psychological: Psychological advice from an educational psychologist (reg 6(1)(d)); social_care: Social care advice (reg 6(1)(e)); preparing_for_adulthood: Advice on preparing for adulthood, from Year 9 (reg 6(1)(g)); other: Advice from anyone else the council asks, including someone the family asked it to consult (reg 6(1)(f) and (h))."
                        },
                        "date_on_letter": {
                          "type": "string",
                          "format": "date",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "description": "Only for a decision that can be appealed (one that starts the mediation and appeal dates), when the date printed on the letter is not the date given (for example a letter dated before it was posted): that printed date (YYYY-MM-DD). The last day to contact the mediation adviser is then counted from it when it is earlier, because SEND Regulations 2014 reg 34(2) counts the 2 months from the date of the notice. The time to appeal runs from the day it was sent: when date is that day, it is counted from date; when date is the day it arrived, a rough date or a range (the day it was sent is not known), it is counted from the printed date when that is earlier, because a letter is not usually sent before the date on it. If only the date on the letter is known, give it here and leave date out: the dates are then counted from it, as the earliest the letter is likely to have been sent, and the result says so."
                        },
                        "date_received": {
                          "type": "string",
                          "format": "date",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "description": "Only for draft_plan_sent, amendment_proposal_sent or review_decision_notified (a decision to amend), when the date given is the day it was sent or posted and the day it arrived is known too: the day it arrived (YYYY-MM-DD). The at least 15 days for comments begin with the day the document was served, so the last day counted from the day it arrived is the latest it can be; the family's date to act by stays the one counted from the date given. Not used for any other date (the time to appeal runs from the day the decision was sent)."
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "additionalProperties": false
                    },
                    "description": "What has happened so far, in any order: the same event types as ehcp_calculate_deadlines. Dates are optional; give them when the user knows them, so the next dates can be worked out."
                  },
                  "year_group": {
                    "type": "integer",
                    "minimum": -1,
                    "maximum": 14,
                    "description": "School year group now: -1 nursery, 0 Reception, 1 to 11 for Years 1 to 11, 12 and 13 for the two years after Year 11, by age (the school years in which they turn 17 and 18), 14 for a young person who turned 18 before the school year began, whatever course they are on. Used to work out who holds the rights (the parent, or the young person after the last Friday in June of the school year in which they turn 16, which is Year 11 unless usual_year_group says otherwise) and whether a move between phases is near."
                  },
                  "usual_year_group": {
                    "type": "integer",
                    "minimum": -1,
                    "maximum": 14,
                    "description": "Only for a pupil taught in a different year group from the usual one for their age (for example a summer-born child who started Reception a year late, or a pupil held back or moved up a year): the year group usual for their age, with the same values as year_group. Used instead of year_group to work out who holds the rights, because that turns on age: the end of compulsory school age is the last Friday in June of the school year in which they turn 16. year_group is still used for phase transfers."
                  },
                  "rights_holder": {
                    "type": "string",
                    "enum": [
                      "parent",
                      "young_person",
                      "representative"
                    ],
                    "description": "Who holds the rights, if the user has said. parent: the parent, while the child is of compulsory school age or younger. young_person: the young person, once over compulsory school age (after the last Friday in June of the school year in which they turn 16, usually the end of Year 11). representative: someone acting for a young person who lacks the mental capacity to make the decision. Leave out to have Plenda work it out from year_group; if both are given they must agree, so for a pupil taught outside the usual year group for their age give usual_year_group too."
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "parent",
                      "young_person",
                      "school",
                      "professional",
                      "local_authority"
                    ],
                    "description": "Who is asking. parent: a parent or carer of the child or young person (the default). young_person: the young person themselves (over compulsory school age). school: staff at a school, college or early years setting, such as a SENCO. professional: a health, social care, psychology or other professional, or an adviser or advocate. local_authority: a council officer or caseworker."
                  },
                  "audience": {
                    "type": "string",
                    "enum": [
                      "parent",
                      "young_person",
                      "school",
                      "professional",
                      "local_authority"
                    ],
                    "description": "Same as role, with the same values as role (see that field): the other Plenda tools call it audience. Give one or the other."
                  },
                  "as_of": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "Optional date to work out the stage and dates on (YYYY-MM-DD). Defaults to today in the UK."
                  },
                  "warn_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 90,
                    "description": "How many days before a date it counts as \"due soon\" or \"closing soon\". Defaults to the deadline tool's own setting for each date."
                  },
                  "topic": {
                    "type": "string",
                    "enum": [
                      "school_transport",
                      "exclusion",
                      "elective_home_education",
                      "health_needs_education",
                      "sen_support_without_plan",
                      "school_attendance_difficulties",
                      "disability_discrimination",
                      "school_admissions_without_plan",
                      "youth_custody",
                      "benefits",
                      "diagnosis",
                      "wales_scotland_ni"
                    ],
                    "description": "A topic next to EHC plans that the user asked about; returns who decides and where to go. school_transport: Home to school and college transport. exclusion: Suspensions and exclusions. elective_home_education: Elective home education. health_needs_education: Education when a child cannot attend school because of health (Education Act 1996, s 19). sen_support_without_plan: SEN support at school without a plan. school_attendance_difficulties: When a child finds it hard to attend school. disability_discrimination: Disability discrimination at school. school_admissions_without_plan: School admissions without a plan. youth_custody: Young people in youth custody. benefits: Benefits for disabled children and young people. diagnosis: Getting a diagnosis, such as autism or ADHD. wales_scotland_ni: Wales, Scotland and Northern Ireland."
                  },
                  "case_summary": {
                    "type": "object",
                    "description": "A case_summary returned earlier by this tool or ehcp_calculate_deadlines, pasted back as it was. It holds only stage ids, event types, dates and deadline ids.",
                    "properties": {
                      "stage": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "sen_support",
                          "requesting",
                          "deciding_to_assess",
                          "assessing",
                          "deciding_to_issue",
                          "draft_plan",
                          "naming_a_school",
                          "final_plan",
                          "plan_not_delivered",
                          "annual_review",
                          "amendment",
                          "phase_transfer",
                          "reassessment",
                          "ceasing",
                          "moving_area",
                          "becoming_a_young_person",
                          "personal_budgets",
                          "eotas_and_home_education",
                          "after_tribunal",
                          "getting_records",
                          "disagreement",
                          null
                        ],
                        "description": "The main stage id: the same values as stage (see that field). A summary may hold disagreement (the mediation and appeal side track), which is left out."
                      },
                      "events": {
                        "type": "array",
                        "maxItems": 40,
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "request_received",
                                "brought_to_attention",
                                "council_became_responsible",
                                "decision_to_assess_notified",
                                "decision_not_to_assess_notified",
                                "advice_requested",
                                "advice_received",
                                "decision_not_to_issue_notified",
                                "draft_plan_sent",
                                "final_plan_issued",
                                "previous_review",
                                "review_meeting",
                                "review_invitations_sent",
                                "review_advice_sent",
                                "review_report_sent",
                                "review_decision_notified",
                                "amendment_proposal_sent",
                                "amended_plan_issued",
                                "reassessment_requested",
                                "reassessment_decision_notified",
                                "reassessment_decided",
                                "reassessed_plan_issued",
                                "cease_decision_notified",
                                "transfer_between_phases",
                                "moved_to_new_council",
                                "new_council_informed_family",
                                "appealable_decision_sent",
                                "mediation_adviser_told_no_mediation",
                                "council_told_wants_mediation",
                                "mediation_ended",
                                "mediation_certificate_issued",
                                "appeal_registered",
                                "appeal_response_sent",
                                "appeal_not_opposed",
                                "tribunal_order_made",
                                "recommendation_made",
                                "recommendation_response_sent",
                                "recommendation_response_copied",
                                "subject_access_request_made",
                                "foi_request_made"
                              ],
                              "description": "The event type: the same values as events_so_far[].type (see that field)."
                            },
                            "date": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                              "description": "The date (YYYY-MM-DD). Not there for an event given as having happened with no date."
                            },
                            "date_latest": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                              "description": "The last possible day, when only a range was known (YYYY-MM-DD)."
                            },
                            "date_basis": {
                              "type": "string",
                              "enum": [
                                "sent",
                                "emailed",
                                "posted",
                                "received",
                                "on_letter",
                                "approximate",
                                "held",
                                "planned"
                              ],
                              "description": "What the date is: the same values as events_so_far[].date_basis (see that field)."
                            },
                            "approximate": {
                              "type": "boolean",
                              "description": "True if the date was only known roughly."
                            },
                            "outcome": {
                              "type": "string",
                              "enum": [
                                "keep",
                                "amend",
                                "cease",
                                "reassess",
                                "refuse",
                                "amended",
                                "not_amended"
                              ],
                              "description": "The outcome: the same values as events_so_far[].outcome (see that field)."
                            },
                            "transfer_kind": {
                              "type": "string",
                              "enum": [
                                "school_phase",
                                "secondary_to_post16",
                                "post16_other_time"
                              ],
                              "description": "The kind of move: the same values as events_so_far[].transfer_kind (see that field)."
                            },
                            "order_kind": {
                              "type": "string",
                              "enum": [
                                "assess",
                                "make_plan",
                                "remit",
                                "amend_needs_or_provision",
                                "amend_placement",
                                "continue_and_amend",
                                "continue",
                                "cease"
                              ],
                              "description": "What was ordered or conceded: the same values as events_so_far[].order_kind (see that field)."
                            },
                            "advice_type": {
                              "type": "string",
                              "enum": [
                                "educational",
                                "health",
                                "psychological",
                                "social_care",
                                "preparing_for_adulthood",
                                "other"
                              ],
                              "description": "Which advice: the same values as the advice_type field of ehcp_calculate_deadlines events."
                            },
                            "date_on_letter": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                              "description": "The date printed on the decision letter, when it is not the date given (YYYY-MM-DD): see events_so_far[].date_on_letter."
                            },
                            "date_received": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                              "description": "The day a draft plan or proposed amendments arrived, when the date given is the day it was sent or posted (YYYY-MM-DD): see events_so_far[].date_received."
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        "description": "The events so far: each with its date, or with no date when it was given as having happened without one."
                      },
                      "open_deadlines": {
                        "type": "array",
                        "maxItems": 40,
                        "description": "Deadlines that were still open, or had passed with no record of being done, on the as_of date (for reference; they are worked out again).",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "^[a-z0-9_]{1,80}$",
                              "description": "The deadline id, as ehcp_calculate_deadlines gives it."
                            },
                            "rule_id": {
                              "type": "string",
                              "enum": [
                                "assessment_decision",
                                "advice_6_weeks",
                                "decision_not_to_issue",
                                "draft_latest_for_20_weeks",
                                "draft_plan_comments",
                                "final_plan_20_weeks",
                                "first_annual_review",
                                "next_annual_review",
                                "review_invitations",
                                "review_advice_circulated",
                                "review_report",
                                "review_decision",
                                "amendment_comments",
                                "amended_plan_8_weeks",
                                "reassessment_decision",
                                "reassessment_plan_14_weeks",
                                "review_after_reassessment",
                                "phase_transfer_school",
                                "phase_transfer_post16",
                                "phase_transfer_post16_other",
                                "phase_transfer_school_latest_proposals",
                                "phase_transfer_school_latest_meeting",
                                "phase_transfer_school_latest_invitations",
                                "phase_transfer_post16_latest_proposals",
                                "phase_transfer_post16_latest_meeting",
                                "phase_transfer_post16_latest_invitations",
                                "phase_transfer_post16_other_latest_proposals",
                                "phase_transfer_post16_other_latest_meeting",
                                "phase_transfer_post16_other_latest_invitations",
                                "new_council_informs_family",
                                "review_after_transfer",
                                "contact_mediation_adviser",
                                "mediation_certificate_no_mediation",
                                "mediation_within_30_days",
                                "mediation_certificate_after_mediation",
                                "appeal_deadline",
                                "council_appeal_response",
                                "order_assess_notify",
                                "order_assess_no_plan",
                                "order_assess_plan",
                                "order_make_plan_draft",
                                "order_make_plan_final",
                                "order_remit",
                                "order_amend_provision",
                                "order_amend_placement",
                                "order_continue_and_amend",
                                "unopposed_assess",
                                "unopposed_assess_no_plan",
                                "unopposed_assess_plan",
                                "unopposed_amend_provision",
                                "unopposed_amend_placement",
                                "unopposed_make_plan",
                                "unopposed_make_plan_final",
                                "unopposed_continue_and_amend",
                                "recommendation_response",
                                "recommendation_response_copy",
                                "subject_access_response",
                                "foi_response"
                              ],
                              "description": "A deadline id: the same rule ids ehcp_calculate_deadlines uses."
                            },
                            "due_date": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                              "description": "The due date."
                            },
                            "group": {
                              "type": "string",
                              "enum": [
                                "you",
                                "council",
                                "other"
                              ],
                              "description": "you: the family's date; council: the council's; other: someone else's."
                            }
                          },
                          "required": [
                            "due_date"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "as_of": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "description": "The date the summary was made."
                      },
                      "rules_version": {
                        "type": "string",
                        "pattern": "^england-\\d{4}\\.\\d{2}$",
                        "description": "The rules version it was made with."
                      },
                      "stages": {
                        "type": "array",
                        "maxItems": 3,
                        "items": {
                          "type": "string",
                          "enum": [
                            "sen_support",
                            "requesting",
                            "deciding_to_assess",
                            "assessing",
                            "deciding_to_issue",
                            "draft_plan",
                            "naming_a_school",
                            "final_plan",
                            "plan_not_delivered",
                            "annual_review",
                            "amendment",
                            "phase_transfer",
                            "reassessment",
                            "ceasing",
                            "moving_area",
                            "becoming_a_young_person",
                            "personal_budgets",
                            "eotas_and_home_education",
                            "after_tribunal",
                            "getting_records",
                            "disagreement"
                          ],
                          "description": "A stage id: the same values as stage (see that field)."
                        },
                        "description": "Stage ids, the main one first: the same values as stage (see that field). A summary may hold disagreement (the mediation and appeal side track), which is left out."
                      },
                      "role": {
                        "type": "string",
                        "enum": [
                          "parent",
                          "young_person",
                          "school",
                          "professional",
                          "local_authority"
                        ],
                        "description": "Who was asking: the same values as role (see that field)."
                      },
                      "year_group": {
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 14,
                        "description": "School year group on the as_of date (moved on automatically when the school year changes)."
                      },
                      "usual_year_group": {
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 14,
                        "description": "The year group usual for their age on the as_of date, if different (moved on automatically when the school year changes)."
                      },
                      "rights_holder": {
                        "type": "string",
                        "enum": [
                          "parent",
                          "young_person",
                          "representative"
                        ],
                        "description": "Who held the rights on the as_of date. parent: the parent, while the child is of compulsory school age or younger. young_person: the young person, once over compulsory school age (after the last Friday in June of the school year in which they turn 16, usually the end of Year 11). representative: someone acting for a young person who lacks the mental capacity to make the decision."
                      },
                      "format": {
                        "type": "string",
                        "enum": [
                          "plenda-case-1"
                        ],
                        "description": "The format of an older summary: plenda-case-1."
                      },
                      "key_dates": {
                        "type": "object",
                        "description": "An older summary's latest date (YYYY-MM-DD) of each event type, keyed by the event types of events_so_far.",
                        "properties": {
                          "request_received": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "brought_to_attention": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "council_became_responsible": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "decision_to_assess_notified": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "decision_not_to_assess_notified": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "advice_requested": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "advice_received": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "decision_not_to_issue_notified": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "draft_plan_sent": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "final_plan_issued": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "previous_review": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "review_meeting": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "review_invitations_sent": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "review_advice_sent": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "review_report_sent": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "review_decision_notified": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "amendment_proposal_sent": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "amended_plan_issued": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "reassessment_requested": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "reassessment_decision_notified": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "reassessment_decided": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "reassessed_plan_issued": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "cease_decision_notified": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "transfer_between_phases": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "moved_to_new_council": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "new_council_informed_family": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "appealable_decision_sent": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "mediation_adviser_told_no_mediation": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "council_told_wants_mediation": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "mediation_ended": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "mediation_certificate_issued": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "appeal_registered": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "appeal_response_sent": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "appeal_not_opposed": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "tribunal_order_made": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "recommendation_made": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "recommendation_response_sent": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "recommendation_response_copied": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "subject_access_request_made": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "foi_request_made": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "view": {
                          "type": "string",
                          "const": "guide"
                        },
                        "summary_for_user": {
                          "type": "string"
                        },
                        "next_actions": {
                          "type": "array",
                          "maxItems": 3,
                          "items": {
                            "type": "object",
                            "properties": {
                              "text": {
                                "type": "string"
                              },
                              "date": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "owner": {
                                "type": "string",
                                "enum": [
                                  "you",
                                  "council",
                                  "school",
                                  "health",
                                  "tribunal",
                                  "mediation",
                                  "other"
                                ]
                              }
                            },
                            "required": [
                              "text",
                              "date",
                              "owner"
                            ]
                          }
                        },
                        "keep_wording": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "rules_version": {
                          "type": "string"
                        },
                        "law_as_at": {
                          "type": "string"
                        },
                        "schema_version": {
                          "type": "string"
                        },
                        "engine_version": {
                          "type": "string"
                        },
                        "disclaimer": {
                          "type": "string"
                        },
                        "privacy": {
                          "type": "object",
                          "properties": {
                            "identifiers_found": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "note": {
                              "type": "string"
                            }
                          }
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "stage",
                            "inferred",
                            "topic",
                            "map"
                          ]
                        },
                        "as_of": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "parent",
                            "young_person",
                            "school",
                            "professional",
                            "local_authority"
                          ]
                        },
                        "placement": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "line": {
                              "type": "string"
                            },
                            "based_on": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "type": {
                                  "type": "string"
                                },
                                "date": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "label": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "required": [
                            "line"
                          ]
                        },
                        "stage": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "enum": [
                                "sen_support",
                                "requesting",
                                "deciding_to_assess",
                                "assessing",
                                "deciding_to_issue",
                                "draft_plan",
                                "naming_a_school",
                                "final_plan",
                                "plan_not_delivered",
                                "annual_review",
                                "amendment",
                                "phase_transfer",
                                "reassessment",
                                "ceasing",
                                "moving_area",
                                "becoming_a_young_person",
                                "personal_budgets",
                                "eotas_and_home_education",
                                "after_tribunal",
                                "getting_records"
                              ]
                            },
                            "title": {
                              "type": "string"
                            },
                            "group": {
                              "type": "string"
                            },
                            "summary": {
                              "type": "string"
                            },
                            "who_decides": {
                              "type": "string"
                            },
                            "steps": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "rights": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "text": {
                                    "type": "string"
                                  },
                                  "cite": {
                                    "type": "string",
                                    "description": "Short cites joined with \"; \". A source that is not an Act or Regulations has its kind in brackets: (Code: must), (Code: should), (guidance), (good practice) or (case law), with \"to verify\" where a point is still open."
                                  }
                                },
                                "required": [
                                  "text"
                                ]
                              }
                            },
                            "prepare": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "myths": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "myth": {
                                    "type": "string"
                                  },
                                  "fact": {
                                    "type": "string"
                                  },
                                  "cite": {
                                    "type": "string",
                                    "description": "Short cites joined with \"; \". A source that is not an Act or Regulations has its kind in brackets: (Code: must), (Code: should), (guidance), (good practice) or (case law), with \"to verify\" where a point is still open."
                                  }
                                },
                                "required": [
                                  "myth",
                                  "fact"
                                ]
                              }
                            },
                            "role_note": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "title",
                            "summary",
                            "who_decides",
                            "steps",
                            "rights",
                            "prepare",
                            "myths",
                            "role_note"
                          ]
                        },
                        "stages": {
                          "type": "array",
                          "maxItems": 3,
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "enum": [
                                  "sen_support",
                                  "requesting",
                                  "deciding_to_assess",
                                  "assessing",
                                  "deciding_to_issue",
                                  "draft_plan",
                                  "naming_a_school",
                                  "final_plan",
                                  "plan_not_delivered",
                                  "annual_review",
                                  "amendment",
                                  "phase_transfer",
                                  "reassessment",
                                  "ceasing",
                                  "moving_area",
                                  "becoming_a_young_person",
                                  "personal_budgets",
                                  "eotas_and_home_education",
                                  "after_tribunal",
                                  "getting_records"
                                ]
                              },
                              "title": {
                                "type": "string"
                              },
                              "short": {
                                "type": "string"
                              },
                              "summary": {
                                "type": "string"
                              },
                              "main": {
                                "type": "boolean"
                              },
                              "why": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "main"
                            ]
                          }
                        },
                        "rights_holder": {
                          "type": "object",
                          "properties": {
                            "holder": {
                              "type": "string",
                              "enum": [
                                "parent",
                                "young_person",
                                "representative",
                                "unknown"
                              ]
                            },
                            "reason": {
                              "type": "string"
                            },
                            "note": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "sources": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "cite": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "statute",
                                      "code_must",
                                      "code_should",
                                      "case_law",
                                      "good_practice",
                                      "guidance"
                                    ]
                                  },
                                  "status_label": {
                                    "type": "string"
                                  },
                                  "verify": {
                                    "type": "string",
                                    "description": "What is still to be confirmed about this source. Given on case law (status case_law), which keeps a note until a SEND solicitor has confirmed it; an open point on another source is stated in the result where a statement relies on it."
                                  }
                                },
                                "required": [
                                  "cite",
                                  "url",
                                  "status"
                                ]
                              }
                            }
                          },
                          "required": [
                            "holder",
                            "reason",
                            "note"
                          ]
                        },
                        "legal_test": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "limbs": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "text": {
                                    "type": "string"
                                  },
                                  "cite": {
                                    "type": "string",
                                    "description": "Short cites joined with \"; \". A source that is not an Act or Regulations has its kind in brackets: (Code: must), (Code: should), (guidance), (good practice) or (case law), with \"to verify\" where a point is still open."
                                  }
                                },
                                "required": [
                                  "text"
                                ]
                              }
                            },
                            "not_required": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "text": {
                                    "type": "string"
                                  },
                                  "cite": {
                                    "type": "string",
                                    "description": "Short cites joined with \"; \". A source that is not an Act or Regulations has its kind in brackets: (Code: must), (Code: should), (guidance), (good practice) or (case law), with \"to verify\" where a point is still open."
                                  }
                                },
                                "required": [
                                  "text"
                                ]
                              }
                            },
                            "not_enough_on_its_own": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "text": {
                                    "type": "string"
                                  },
                                  "cite": {
                                    "type": "string",
                                    "description": "Short cites joined with \"; \". A source that is not an Act or Regulations has its kind in brackets: (Code: must), (Code: should), (guidance), (good practice) or (case law), with \"to verify\" where a point is still open."
                                  }
                                },
                                "required": [
                                  "text"
                                ]
                              }
                            }
                          },
                          "required": [
                            "title",
                            "limbs",
                            "not_required",
                            "not_enough_on_its_own"
                          ]
                        },
                        "request_checklist": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {
                            "type": "string"
                          },
                          "description": "At the stage of asking for an assessment, what a request usually covers. Only for someone who can make the request (CFA s 36(1)): a parent while the rights are the parent's (or when acting for a young person who lacks the mental capacity to decide), a young person once the rights are theirs, or a person acting for a school or college. Early years staff outside a school are not named in s 36(1); the Code lists early years practitioners among those who can bring a child to the council's attention (para 9.9). Null otherwise."
                        },
                        "time_limits": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              },
                              "counting": {
                                "type": "string"
                              },
                              "owner": {
                                "type": "string"
                              },
                              "group": {
                                "type": "string",
                                "enum": [
                                  "you",
                                  "council",
                                  "other"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "counting",
                              "owner",
                              "group"
                            ]
                          }
                        },
                        "next_dates": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "for_family": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "due_date": {
                                  "type": "string"
                                },
                                "due_time": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "message": {
                                  "type": "string"
                                },
                                "later_date": {
                                  "type": "string",
                                  "description": "The latest the date could be, set only once due_date (the earliest reading) has passed while the date is still to come: a date worked out two ways (a review counted from the review meeting or from the council's decision after it, which is not settled, or the family's 15 days for comments read by someone else, when the letter may have been served later than the date given). It is not over until this date: give it, not due_date, as the date still to come, with how it was counted."
                                }
                              },
                              "required": [
                                "id",
                                "title",
                                "due_date"
                              ]
                            },
                            "for_council": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "due_date": {
                                  "type": "string"
                                },
                                "due_time": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "message": {
                                  "type": "string"
                                },
                                "later_date": {
                                  "type": "string",
                                  "description": "The latest the date could be, set only once due_date (the earliest reading) has passed while the date is still to come: a date worked out two ways (a review counted from the review meeting or from the council's decision after it, which is not settled, or the family's 15 days for comments read by someone else, when the letter may have been served later than the date given). It is not over until this date: give it, not due_date, as the date still to come, with how it was counted."
                                }
                              },
                              "required": [
                                "id",
                                "title",
                                "due_date"
                              ]
                            }
                          },
                          "required": [
                            "for_family",
                            "for_council"
                          ]
                        },
                        "dates": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "as_of": {
                              "type": "string"
                            },
                            "summary": {
                              "type": "string"
                            },
                            "rights_holder": {
                              "type": "string"
                            },
                            "counts": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "integer"
                              }
                            },
                            "items": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "rule_id": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "group": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "type": "string"
                                  },
                                  "status_label": {
                                    "type": "string"
                                  },
                                  "due_date": {
                                    "type": "string"
                                  },
                                  "due_time": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "later_date": {
                                    "type": "string",
                                    "description": "The latest the date could be, set only once due_date (the earliest reading) has passed while the date is still to come: a date worked out two ways (a review counted from the review meeting or from the council's decision after it, which is not settled, or the family's 15 days for comments read by someone else, when the letter may have been served later than the date given). It is not over until this date: give it, not due_date, as the date still to come, with how it was counted."
                                  },
                                  "likely_done": {
                                    "type": "boolean"
                                  },
                                  "law_status": {
                                    "type": "string",
                                    "enum": [
                                      "unsettled"
                                    ],
                                    "description": "Set when the law on how this date is counted is not settled (see dates.unsettled)."
                                  },
                                  "law_status_label": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "rule_id",
                                  "title",
                                  "group",
                                  "status",
                                  "due_date"
                                ]
                              }
                            },
                            "truncated": {
                              "type": "boolean"
                            },
                            "needs_info": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "conditional": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "if": {
                                    "type": "string"
                                  },
                                  "then": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "if",
                                  "then"
                                ]
                              }
                            },
                            "unsettled": {
                              "type": "array",
                              "description": "Dates whose counting the law has not settled, with each reading worked out and its source.",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "rule_id": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "type": "string",
                                    "const": "unsettled"
                                  },
                                  "status_label": {
                                    "type": "string"
                                  },
                                  "text": {
                                    "type": "string"
                                  },
                                  "line": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "readings": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "from": {
                                          "type": "string"
                                        },
                                        "due_date": {
                                          "type": "string"
                                        },
                                        "cite": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "from",
                                        "due_date"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "rule_id",
                                  "status",
                                  "status_label",
                                  "text",
                                  "readings"
                                ]
                              }
                            }
                          },
                          "required": [
                            "as_of",
                            "items",
                            "truncated",
                            "needs_info",
                            "conditional",
                            "unsettled"
                          ]
                        },
                        "dates_problem": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Set when the dates given do not fit together, so no deadlines were worked out."
                        },
                        "undated_events": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "conditional": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "if": {
                                "type": "string"
                              },
                              "then": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "if",
                              "then"
                            ]
                          }
                        },
                        "process_map": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              },
                              "stages": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "title": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "title"
                                  ]
                                }
                              },
                              "time_limit": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "counting": {
                                    "type": "string"
                                  }
                                }
                              },
                              "tool": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "stages"
                            ]
                          }
                        },
                        "questions": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "maxItems": 3,
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "text": {
                                "type": "string"
                              },
                              "field": {
                                "type": "string",
                                "enum": [
                                  "stage",
                                  "events_so_far",
                                  "year_group"
                                ]
                              },
                              "options": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "label": {
                                      "type": "string"
                                    },
                                    "value": {
                                      "type": [
                                        "string",
                                        "integer"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "label",
                                    "value"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "text",
                              "field"
                            ]
                          }
                        },
                        "topic": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "enum": [
                                "school_transport",
                                "exclusion",
                                "elective_home_education",
                                "health_needs_education",
                                "sen_support_without_plan",
                                "school_attendance_difficulties",
                                "disability_discrimination",
                                "school_admissions_without_plan",
                                "youth_custody",
                                "benefits",
                                "diagnosis",
                                "wales_scotland_ni"
                              ]
                            },
                            "title": {
                              "type": "string"
                            },
                            "summary": {
                              "type": "string"
                            },
                            "route": {
                              "type": "string"
                            },
                            "not_tribunal": {
                              "type": "boolean"
                            },
                            "time_limits": {
                              "type": "string"
                            },
                            "signposts": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "what": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "url"
                                ]
                              }
                            },
                            "sources": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "cite": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "statute",
                                      "code_must",
                                      "code_should",
                                      "case_law",
                                      "good_practice",
                                      "guidance"
                                    ]
                                  },
                                  "status_label": {
                                    "type": "string"
                                  },
                                  "verify": {
                                    "type": "string",
                                    "description": "What is still to be confirmed about this source. Given on case law (status case_law), which keeps a note until a SEND solicitor has confirmed it; an open point on another source is stated in the result where a statement relies on it."
                                  }
                                },
                                "required": [
                                  "cite",
                                  "url",
                                  "status"
                                ]
                              }
                            }
                          },
                          "required": [
                            "id",
                            "title",
                            "summary",
                            "route"
                          ]
                        },
                        "related_topics": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              },
                              "summary": {
                                "type": "string"
                              },
                              "route": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "title"
                            ]
                          }
                        },
                        "next_stages": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              },
                              "short": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "title"
                            ]
                          }
                        },
                        "issues": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "label"
                            ]
                          }
                        },
                        "see_also": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "term": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "term"
                            ]
                          }
                        },
                        "support": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "text": {
                                "type": "string"
                              },
                              "signposts": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "what": {
                                      "type": "string"
                                    },
                                    "url": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name",
                                    "url"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "text",
                              "signposts"
                            ]
                          }
                        },
                        "support_note": {
                          "type": "string"
                        },
                        "signposts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "what": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "url"
                            ]
                          }
                        },
                        "signpost_notes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "next_tool": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "ehcp_next_steps",
                                "ehcp_calculate_deadlines",
                                "ehcp_check_plan",
                                "ehcp_check_wording",
                                "ehcp_challenge_options",
                                "ehcp_check_letter",
                                "ehcp_explain"
                              ]
                            },
                            "why": {
                              "type": "string"
                            },
                            "hint": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "additionalProperties": {
                                "type": "string"
                              }
                            },
                            "also": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "name",
                            "why"
                          ]
                        },
                        "before_you_paste": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "items": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "sources": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "cite": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "statute",
                                      "code_must",
                                      "code_should",
                                      "case_law",
                                      "good_practice",
                                      "guidance"
                                    ]
                                  },
                                  "status_label": {
                                    "type": "string"
                                  },
                                  "verify": {
                                    "type": "string",
                                    "description": "What is still to be confirmed about this source. Given on case law (status case_law), which keeps a note until a SEND solicitor has confirmed it; an open point on another source is stated in the result where a statement relies on it."
                                  }
                                },
                                "required": [
                                  "cite",
                                  "url",
                                  "status"
                                ]
                              }
                            }
                          },
                          "required": [
                            "items"
                          ]
                        },
                        "privacy_line": {
                          "type": "string"
                        },
                        "privacy_url": {
                          "type": "string"
                        },
                        "law_in_force": {
                          "type": "object",
                          "properties": {
                            "as_at": {
                              "type": "string"
                            },
                            "note": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "as_at",
                            "note"
                          ]
                        },
                        "case_summary": {
                          "type": "object",
                          "description": "A case_summary returned earlier by this tool or ehcp_calculate_deadlines, pasted back as it was. It holds only stage ids, event types, dates and deadline ids.",
                          "properties": {
                            "stage": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "enum": [
                                "sen_support",
                                "requesting",
                                "deciding_to_assess",
                                "assessing",
                                "deciding_to_issue",
                                "draft_plan",
                                "naming_a_school",
                                "final_plan",
                                "plan_not_delivered",
                                "annual_review",
                                "amendment",
                                "phase_transfer",
                                "reassessment",
                                "ceasing",
                                "moving_area",
                                "becoming_a_young_person",
                                "personal_budgets",
                                "eotas_and_home_education",
                                "after_tribunal",
                                "getting_records",
                                null
                              ],
                              "description": "The main stage id, or null when no stage fits (mediation or an appeal with no decision event)."
                            },
                            "events": {
                              "type": "array",
                              "maxItems": 40,
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "request_received",
                                      "brought_to_attention",
                                      "council_became_responsible",
                                      "decision_to_assess_notified",
                                      "decision_not_to_assess_notified",
                                      "advice_requested",
                                      "advice_received",
                                      "decision_not_to_issue_notified",
                                      "draft_plan_sent",
                                      "final_plan_issued",
                                      "previous_review",
                                      "review_meeting",
                                      "review_invitations_sent",
                                      "review_advice_sent",
                                      "review_report_sent",
                                      "review_decision_notified",
                                      "amendment_proposal_sent",
                                      "amended_plan_issued",
                                      "reassessment_requested",
                                      "reassessment_decision_notified",
                                      "reassessment_decided",
                                      "reassessed_plan_issued",
                                      "cease_decision_notified",
                                      "transfer_between_phases",
                                      "moved_to_new_council",
                                      "new_council_informed_family",
                                      "appealable_decision_sent",
                                      "mediation_adviser_told_no_mediation",
                                      "council_told_wants_mediation",
                                      "mediation_ended",
                                      "mediation_certificate_issued",
                                      "appeal_registered",
                                      "appeal_response_sent",
                                      "appeal_not_opposed",
                                      "tribunal_order_made",
                                      "recommendation_made",
                                      "recommendation_response_sent",
                                      "recommendation_response_copied",
                                      "subject_access_request_made",
                                      "foi_request_made"
                                    ],
                                    "description": "The event type: the same values as events_so_far[].type (see that field)."
                                  },
                                  "date": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                    "description": "The date (YYYY-MM-DD). Not there for an event given as having happened with no date."
                                  },
                                  "date_latest": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                    "description": "The last possible day, when only a range was known (YYYY-MM-DD)."
                                  },
                                  "date_basis": {
                                    "type": "string",
                                    "enum": [
                                      "sent",
                                      "emailed",
                                      "posted",
                                      "received",
                                      "on_letter",
                                      "approximate",
                                      "held",
                                      "planned"
                                    ],
                                    "description": "What the date is: the same values as events_so_far[].date_basis (see that field)."
                                  },
                                  "approximate": {
                                    "type": "boolean",
                                    "description": "True if the date was only known roughly."
                                  },
                                  "outcome": {
                                    "type": "string",
                                    "enum": [
                                      "keep",
                                      "amend",
                                      "cease",
                                      "reassess",
                                      "refuse",
                                      "amended",
                                      "not_amended"
                                    ],
                                    "description": "The outcome: the same values as events_so_far[].outcome (see that field)."
                                  },
                                  "transfer_kind": {
                                    "type": "string",
                                    "enum": [
                                      "school_phase",
                                      "secondary_to_post16",
                                      "post16_other_time"
                                    ],
                                    "description": "The kind of move: the same values as events_so_far[].transfer_kind (see that field)."
                                  },
                                  "order_kind": {
                                    "type": "string",
                                    "enum": [
                                      "assess",
                                      "make_plan",
                                      "remit",
                                      "amend_needs_or_provision",
                                      "amend_placement",
                                      "continue_and_amend",
                                      "continue",
                                      "cease"
                                    ],
                                    "description": "What was ordered or conceded: the same values as events_so_far[].order_kind (see that field)."
                                  },
                                  "advice_type": {
                                    "type": "string",
                                    "enum": [
                                      "educational",
                                      "health",
                                      "psychological",
                                      "social_care",
                                      "preparing_for_adulthood",
                                      "other"
                                    ],
                                    "description": "Which advice: the same values as the advice_type field of ehcp_calculate_deadlines events."
                                  },
                                  "date_on_letter": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                    "description": "The date printed on the decision letter, when it is not the date given (YYYY-MM-DD): see events_so_far[].date_on_letter."
                                  },
                                  "date_received": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                    "description": "The day a draft plan or proposed amendments arrived, when the date given is the day it was sent or posted (YYYY-MM-DD): see events_so_far[].date_received."
                                  }
                                },
                                "required": [
                                  "type"
                                ],
                                "additionalProperties": false
                              },
                              "description": "The events so far: each with its date, or with no date when it was given as having happened without one."
                            },
                            "open_deadlines": {
                              "type": "array",
                              "maxItems": 40,
                              "description": "Deadlines that were still open, or had passed with no record of being done, on the as_of date (for reference; they are worked out again).",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "pattern": "^[a-z0-9_]{1,80}$",
                                    "description": "The deadline id, as ehcp_calculate_deadlines gives it."
                                  },
                                  "rule_id": {
                                    "type": "string",
                                    "enum": [
                                      "assessment_decision",
                                      "advice_6_weeks",
                                      "decision_not_to_issue",
                                      "draft_latest_for_20_weeks",
                                      "draft_plan_comments",
                                      "final_plan_20_weeks",
                                      "first_annual_review",
                                      "next_annual_review",
                                      "review_invitations",
                                      "review_advice_circulated",
                                      "review_report",
                                      "review_decision",
                                      "amendment_comments",
                                      "amended_plan_8_weeks",
                                      "reassessment_decision",
                                      "reassessment_plan_14_weeks",
                                      "review_after_reassessment",
                                      "phase_transfer_school",
                                      "phase_transfer_post16",
                                      "phase_transfer_post16_other",
                                      "phase_transfer_school_latest_proposals",
                                      "phase_transfer_school_latest_meeting",
                                      "phase_transfer_school_latest_invitations",
                                      "phase_transfer_post16_latest_proposals",
                                      "phase_transfer_post16_latest_meeting",
                                      "phase_transfer_post16_latest_invitations",
                                      "phase_transfer_post16_other_latest_proposals",
                                      "phase_transfer_post16_other_latest_meeting",
                                      "phase_transfer_post16_other_latest_invitations",
                                      "new_council_informs_family",
                                      "review_after_transfer",
                                      "contact_mediation_adviser",
                                      "mediation_certificate_no_mediation",
                                      "mediation_within_30_days",
                                      "mediation_certificate_after_mediation",
                                      "appeal_deadline",
                                      "council_appeal_response",
                                      "order_assess_notify",
                                      "order_assess_no_plan",
                                      "order_assess_plan",
                                      "order_make_plan_draft",
                                      "order_make_plan_final",
                                      "order_remit",
                                      "order_amend_provision",
                                      "order_amend_placement",
                                      "order_continue_and_amend",
                                      "unopposed_assess",
                                      "unopposed_assess_no_plan",
                                      "unopposed_assess_plan",
                                      "unopposed_amend_provision",
                                      "unopposed_amend_placement",
                                      "unopposed_make_plan",
                                      "unopposed_make_plan_final",
                                      "unopposed_continue_and_amend",
                                      "recommendation_response",
                                      "recommendation_response_copy",
                                      "subject_access_response",
                                      "foi_response"
                                    ],
                                    "description": "A deadline id: the same rule ids ehcp_calculate_deadlines uses."
                                  },
                                  "due_date": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                    "description": "The due date."
                                  },
                                  "group": {
                                    "type": "string",
                                    "enum": [
                                      "you",
                                      "council",
                                      "other"
                                    ],
                                    "description": "you: the family's date; council: the council's; other: someone else's."
                                  }
                                },
                                "required": [
                                  "due_date"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "as_of": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                              "description": "The date the summary was made."
                            },
                            "rules_version": {
                              "type": "string",
                              "pattern": "^england-\\d{4}\\.\\d{2}$",
                              "description": "The rules version it was made with."
                            },
                            "stages": {
                              "type": "array",
                              "maxItems": 3,
                              "items": {
                                "type": "string",
                                "enum": [
                                  "sen_support",
                                  "requesting",
                                  "deciding_to_assess",
                                  "assessing",
                                  "deciding_to_issue",
                                  "draft_plan",
                                  "naming_a_school",
                                  "final_plan",
                                  "plan_not_delivered",
                                  "annual_review",
                                  "amendment",
                                  "phase_transfer",
                                  "reassessment",
                                  "ceasing",
                                  "moving_area",
                                  "becoming_a_young_person",
                                  "personal_budgets",
                                  "eotas_and_home_education",
                                  "after_tribunal",
                                  "getting_records"
                                ],
                                "description": "A stage id: the same values as stage (see that field)."
                              },
                              "description": "Stage ids, the main one first."
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "parent",
                                "young_person",
                                "school",
                                "professional",
                                "local_authority"
                              ],
                              "description": "Who was asking: the same values as role (see that field)."
                            },
                            "year_group": {
                              "type": "integer",
                              "minimum": -1,
                              "maximum": 14,
                              "description": "School year group on the as_of date (moved on automatically when the school year changes)."
                            },
                            "usual_year_group": {
                              "type": "integer",
                              "minimum": -1,
                              "maximum": 14,
                              "description": "The year group usual for their age on the as_of date, if different (moved on automatically when the school year changes)."
                            },
                            "rights_holder": {
                              "type": "string",
                              "enum": [
                                "parent",
                                "young_person",
                                "representative"
                              ],
                              "description": "Who held the rights on the as_of date. parent: the parent, while the child is of compulsory school age or younger. young_person: the young person, once over compulsory school age (after the last Friday in June of the school year in which they turn 16, usually the end of Year 11). representative: someone acting for a young person who lacks the mental capacity to make the decision."
                            },
                            "format": {
                              "type": "string",
                              "enum": [
                                "plenda-case-1"
                              ],
                              "description": "The format of an older summary: plenda-case-1."
                            },
                            "key_dates": {
                              "type": "object",
                              "description": "An older summary's latest date (YYYY-MM-DD) of each event type, keyed by the event types of events_so_far.",
                              "properties": {
                                "request_received": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "brought_to_attention": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "council_became_responsible": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "decision_to_assess_notified": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "decision_not_to_assess_notified": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "advice_requested": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "advice_received": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "decision_not_to_issue_notified": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "draft_plan_sent": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "final_plan_issued": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "previous_review": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "review_meeting": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "review_invitations_sent": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "review_advice_sent": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "review_report_sent": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "review_decision_notified": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "amendment_proposal_sent": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "amended_plan_issued": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "reassessment_requested": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "reassessment_decision_notified": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "reassessment_decided": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "reassessed_plan_issued": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "cease_decision_notified": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "transfer_between_phases": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "moved_to_new_council": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "new_council_informed_family": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "appealable_decision_sent": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "mediation_adviser_told_no_mediation": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "council_told_wants_mediation": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "mediation_ended": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "mediation_certificate_issued": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "appeal_registered": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "appeal_response_sent": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "appeal_not_opposed": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "tribunal_order_made": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "recommendation_made": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "recommendation_response_sent": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "recommendation_response_copied": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "subject_access_request_made": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "foi_request_made": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "stage",
                            "events",
                            "open_deadlines",
                            "as_of",
                            "rules_version",
                            "stages"
                          ]
                        },
                        "sources": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "cite": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "statute",
                                  "code_must",
                                  "code_should",
                                  "case_law",
                                  "good_practice",
                                  "guidance"
                                ]
                              },
                              "status_label": {
                                "type": "string"
                              },
                              "verify": {
                                "type": "string",
                                "description": "What is still to be confirmed about this source. Given on case law (status case_law), which keeps a note until a SEND solicitor has confirmed it; an open point on another source is stated in the result where a statement relies on it."
                              }
                            },
                            "required": [
                              "cite",
                              "url",
                              "status"
                            ]
                          }
                        },
                        "presentation": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "view",
                        "summary_for_user",
                        "next_actions",
                        "keep_wording",
                        "rules_version",
                        "law_as_at",
                        "schema_version",
                        "engine_version",
                        "disclaimer",
                        "mode",
                        "as_of",
                        "role",
                        "placement",
                        "stage",
                        "stages",
                        "rights_holder",
                        "legal_test",
                        "request_checklist",
                        "time_limits",
                        "next_dates",
                        "dates",
                        "dates_problem",
                        "conditional",
                        "process_map",
                        "questions",
                        "topic",
                        "related_topics",
                        "next_stages",
                        "issues",
                        "see_also",
                        "support",
                        "signposts",
                        "next_tool",
                        "before_you_paste",
                        "privacy_line",
                        "law_in_force",
                        "case_summary",
                        "sources",
                        "presentation"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "description": "Plain-language summary of the result for the assistant."
                    },
                    "detail": {
                      "type": "object",
                      "description": "Extra detail for displaying the result (for example full findings). Optional."
                    }
                  },
                  "required": [
                    "result",
                    "text"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The input was not usable. The error explains what to change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools/calculate_deadlines": {
      "post": {
        "operationId": "ehcp_calculate_deadlines",
        "summary": "EHCP deadlines",
        "description": "Use this when someone in England asks about EHCP or EHC plan deadlines: \"is the council late?\", \"when are the 20 weeks up?\", the 6-week decision on assessing, the 15 days to comment on a draft plan, when the final plan is due, when the annual review is due, phase transfer dates, or the last day to contact a mediation adviser or appeal to the SEND Tribunal (SENDIST). Give every dated event the user mentions, and set date_basis when a date is the day a letter arrived or a request was posted, or \"planned\" for a date still to come. It counts with bank holidays in England (anywhere in the UK for FOI requests), the Tribunal's 5pm deadline and its August and Christmas rules, the later of 2 months after the decision and 1 month after the mediation certificate (so the appeal date is not passed while a certificate is still to come), the phase transfer dates (before 15 February between school phases, before 31 March from secondary school to post-16, or at least 5 months before a move between post-16 institutions), and the law in force on 30 September 2026: memory often gets these wrong. The family's dates are counted from the earliest plausible date; other dates are only called passed against the latest plausible date. Returns the family's, the council's and other dates, each with whose date it is, how it was counted and its source, plus a case_summary to save. Do not use for what a stage means or what happens next (use ehcp_next_steps), for the ways to challenge a decision (use ehcp_challenge_options), or for Wales, Scotland or Northern Ireland.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "events": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 40,
                    "description": "Dated events in the case, in any order. Give every dated event the user mentions. Required unless case_summary is given.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "request_received",
                            "brought_to_attention",
                            "council_became_responsible",
                            "decision_to_assess_notified",
                            "decision_not_to_assess_notified",
                            "advice_requested",
                            "advice_received",
                            "decision_not_to_issue_notified",
                            "draft_plan_sent",
                            "final_plan_issued",
                            "previous_review",
                            "review_meeting",
                            "review_invitations_sent",
                            "review_advice_sent",
                            "review_report_sent",
                            "review_decision_notified",
                            "amendment_proposal_sent",
                            "amended_plan_issued",
                            "reassessment_requested",
                            "reassessment_decision_notified",
                            "reassessment_decided",
                            "reassessed_plan_issued",
                            "cease_decision_notified",
                            "transfer_between_phases",
                            "moved_to_new_council",
                            "new_council_informed_family",
                            "appealable_decision_sent",
                            "mediation_adviser_told_no_mediation",
                            "council_told_wants_mediation",
                            "mediation_ended",
                            "mediation_certificate_issued",
                            "appeal_registered",
                            "appeal_response_sent",
                            "appeal_not_opposed",
                            "tribunal_order_made",
                            "recommendation_made",
                            "recommendation_response_sent",
                            "recommendation_response_copied",
                            "subject_access_request_made",
                            "foi_request_made"
                          ],
                          "description": "What happened. request_received: The council received the request for an EHC needs assessment; brought_to_attention: The child or young person was brought to the council's attention as someone who may have special educational needs; council_became_responsible: The council became responsible for the child or young person (for example after moving into the area); decision_to_assess_notified: The council told the family it will carry out an assessment; decision_not_to_assess_notified: The council told the family it will not carry out an assessment; advice_requested: The council asked a professional or service for advice; advice_received: The advice was received; decision_not_to_issue_notified: The council told the family it will not issue an EHC plan; draft_plan_sent: The council sent the draft EHC plan; final_plan_issued: The council sent the final EHC plan; previous_review: The last annual review meeting for the plan; review_meeting: The annual review meeting (held or planned); review_invitations_sent: Invitations to the review meeting were sent; review_advice_sent: The advice and information for the review meeting was sent to everyone invited; review_report_sent: The review report was sent after the meeting; review_decision_notified: The council told the family its decision after the review (keep, amend or stop the plan); amendment_proposal_sent: The council sent proposed amendments to the plan; amended_plan_issued: The council sent the final amended plan, or its decision not to amend; reassessment_requested: The council received a request for a re-assessment; reassessment_decision_notified: The council told the family whether it will re-assess; reassessment_decided: The council decided to re-assess on its own initiative; reassessed_plan_issued: The council sent the plan after re-assessment, or its decision not to amend; cease_decision_notified: The council told the family it has decided to stop maintaining the plan; transfer_between_phases: The date the child or young person moves to the next phase of education; moved_to_new_council: The plan transferred to a new council after a move; new_council_informed_family: The new council told the family about the transferred plan; appealable_decision_sent: The council sent written notice of a decision that can be appealed; mediation_adviser_told_no_mediation: The family told the mediation adviser they do not want mediation; council_told_wants_mediation: The council was told the family wants mediation; mediation_ended: Mediation ended; mediation_certificate_issued: The mediation certificate was issued; appeal_registered: The council received the appeal from the SEND Tribunal; appeal_response_sent: The council sent its response to the appeal to the Tribunal; appeal_not_opposed: The council told the Tribunal, before sending its response, that it will not oppose the appeal; tribunal_order_made: The SEND Tribunal made its order; recommendation_made: The SEND Tribunal made a health or social care recommendation; recommendation_response_sent: The council or the health body sent its written reply to a Tribunal health or social care recommendation; recommendation_response_copied: The council sent the Secretary of State a copy of the written reply to a Tribunal health or social care recommendation; subject_access_request_made: A request for personal information (subject access request) was received; foi_request_made: A freedom of information request was received."
                        },
                        "date": {
                          "type": "string",
                          "format": "date",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "description": "The date (YYYY-MM-DD) the user gave. Use only dates the user gives; never guess. For a rough date or a range (\"about 10 March\", \"early March\"), the first possible day, with approximate true (and date_latest if the user knows the last possible day). A date after as_of (or today) needs date_basis \"planned\", except review_meeting and transfer_between_phases."
                        },
                        "date_latest": {
                          "type": "string",
                          "format": "date",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "description": "Only when the user knows a range: the last possible day (YYYY-MM-DD). Leave out for a single date."
                        },
                        "date_basis": {
                          "type": "string",
                          "enum": [
                            "sent",
                            "emailed",
                            "posted",
                            "received",
                            "on_letter",
                            "approximate",
                            "held",
                            "planned"
                          ],
                          "description": "What the date is, if not the usual for that event. sent: the day it was sent (by an unknown method); emailed: the day it was sent by email; posted: the day it was posted; received: the day it was received; on_letter: the date printed on the letter or email; approximate: a rough date; held: the day it took place; planned: the day it is planned for. Leave out when the date is what the event name says (for request_received, the day the council received it; for a decision or plan, the day the council sent it). \"received\" is common for letters: the family's own dates are then counted from 2 working days earlier."
                        },
                        "approximate": {
                          "type": "boolean",
                          "description": "True if the user only knows the date roughly: date is then the earliest day it could have been."
                        },
                        "date_on_letter": {
                          "type": "string",
                          "format": "date",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "description": "Only for a decision that can be appealed (one that starts the mediation and appeal dates), when the date printed on the letter is not the date given (for example a letter dated before it was posted): that printed date (YYYY-MM-DD). The last day to contact the mediation adviser is then counted from it when it is earlier, because SEND Regulations 2014 reg 34(2) counts the 2 months from the date of the notice. The time to appeal runs from the day it was sent: when date is that day, it is counted from date; when date is the day it arrived, a rough date or a range (the day it was sent is not known), it is counted from the printed date when that is earlier, because a letter is not usually sent before the date on it."
                        },
                        "date_received": {
                          "type": "string",
                          "format": "date",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "description": "Only for draft_plan_sent, amendment_proposal_sent or review_decision_notified (a decision to amend), when the date given is the day it was sent or posted and the day it arrived is known too: the day it arrived (YYYY-MM-DD). The at least 15 days for comments begin with the day the document was served, so the last day counted from the day it arrived is the latest it can be; the family's date to act by stays the one counted from the date given. Not used for any other date (the time to appeal runs from the day the decision was sent)."
                        },
                        "advice_type": {
                          "type": "string",
                          "enum": [
                            "educational",
                            "health",
                            "psychological",
                            "social_care",
                            "preparing_for_adulthood",
                            "other"
                          ],
                          "description": "For advice_requested and advice_received: which advice, to pair a request with its advice. educational: Educational advice, usually from the school or setting (reg 6(1)(b)); health: Medical or health advice, such as from a paediatrician or therapist (reg 6(1)(c)); psychological: Psychological advice from an educational psychologist (reg 6(1)(d)); social_care: Social care advice (reg 6(1)(e)); preparing_for_adulthood: Advice on preparing for adulthood, from Year 9 (reg 6(1)(g)); other: Advice from anyone else the council asks, including someone the family asked it to consult (reg 6(1)(f) and (h))."
                        },
                        "transfer_kind": {
                          "type": "string",
                          "enum": [
                            "school_phase",
                            "secondary_to_post16",
                            "post16_other_time"
                          ],
                          "description": "For transfer_between_phases: the kind of move. school_phase: Between school phases (for example early years to school, infant to junior, primary to secondary); secondary_to_post16: From secondary school to a post-16 institution (such as a college); post16_other_time: From one post-16 institution to another (at any time of year, including the start of an academic year). If left out, worked out from year_group where possible, otherwise school_phase. For a move from Year 12 or above, which is a young person's move (secondary_to_post16 or post16_other_time, never school_phase), the dates for both are given as \"if\" answers and the kind is asked for."
                        },
                        "order_kind": {
                          "type": "string",
                          "enum": [
                            "assess",
                            "make_plan",
                            "remit",
                            "amend_needs_or_provision",
                            "amend_placement",
                            "continue_and_amend",
                            "continue",
                            "cease"
                          ],
                          "description": "For tribunal_order_made or appeal_not_opposed: what was ordered or conceded. assess: Carry out an assessment or re-assessment; make_plan: Make and maintain an EHC plan; remit: Reconsider the decision (the case is referred back to the council); amend_needs_or_provision: Amend the special educational needs or provision in the plan; amend_placement: Change the school or institution (or type) named in the plan; continue_and_amend: Continue to maintain the plan and amend it; if the order also changes the school or institution (or type), give amend_placement as well, as its own event with the same date; continue: Continue to maintain the plan; cease: Allow the council to stop maintaining the plan. For appeal_not_opposed only assess, make_plan, amend_needs_or_provision, amend_placement, continue_and_amend, continue: SEND Regulations 2014 reg 45 sets no time limit for any other."
                        },
                        "outcome": {
                          "type": "string",
                          "enum": [
                            "keep",
                            "amend",
                            "cease",
                            "reassess",
                            "refuse",
                            "amended",
                            "not_amended"
                          ],
                          "description": "For review_decision_notified: keep (no change), amend or cease (stop the plan). For reassessment_decision_notified: reassess or refuse. For reassessed_plan_issued: amended (an amended or replacement plan was sent) or not_amended (a decision not to amend or replace it). Leave out if not known."
                        }
                      },
                      "required": [
                        "type",
                        "date"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "case_summary": {
                    "type": "object",
                    "description": "A case_summary returned earlier by this tool or ehcp_next_steps, pasted back as it was. It holds only stage ids, event types, dates and deadline ids. Its events are added to events.",
                    "properties": {
                      "stage": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "sen_support",
                          "requesting",
                          "deciding_to_assess",
                          "assessing",
                          "deciding_to_issue",
                          "draft_plan",
                          "naming_a_school",
                          "final_plan",
                          "plan_not_delivered",
                          "annual_review",
                          "amendment",
                          "phase_transfer",
                          "reassessment",
                          "ceasing",
                          "moving_area",
                          "becoming_a_young_person",
                          "personal_budgets",
                          "eotas_and_home_education",
                          "after_tribunal",
                          "getting_records",
                          "disagreement",
                          null
                        ],
                        "description": "The stage id at the time. A stage id of ehcp_next_steps, or \"disagreement\" for the mediation and appeal steps, which can follow a decision at any stage."
                      },
                      "events": {
                        "type": "array",
                        "maxItems": 40,
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "request_received",
                                "brought_to_attention",
                                "council_became_responsible",
                                "decision_to_assess_notified",
                                "decision_not_to_assess_notified",
                                "advice_requested",
                                "advice_received",
                                "decision_not_to_issue_notified",
                                "draft_plan_sent",
                                "final_plan_issued",
                                "previous_review",
                                "review_meeting",
                                "review_invitations_sent",
                                "review_advice_sent",
                                "review_report_sent",
                                "review_decision_notified",
                                "amendment_proposal_sent",
                                "amended_plan_issued",
                                "reassessment_requested",
                                "reassessment_decision_notified",
                                "reassessment_decided",
                                "reassessed_plan_issued",
                                "cease_decision_notified",
                                "transfer_between_phases",
                                "moved_to_new_council",
                                "new_council_informed_family",
                                "appealable_decision_sent",
                                "mediation_adviser_told_no_mediation",
                                "council_told_wants_mediation",
                                "mediation_ended",
                                "mediation_certificate_issued",
                                "appeal_registered",
                                "appeal_response_sent",
                                "appeal_not_opposed",
                                "tribunal_order_made",
                                "recommendation_made",
                                "recommendation_response_sent",
                                "recommendation_response_copied",
                                "subject_access_request_made",
                                "foi_request_made"
                              ],
                              "description": "What happened. request_received: The council received the request for an EHC needs assessment; brought_to_attention: The child or young person was brought to the council's attention as someone who may have special educational needs; council_became_responsible: The council became responsible for the child or young person (for example after moving into the area); decision_to_assess_notified: The council told the family it will carry out an assessment; decision_not_to_assess_notified: The council told the family it will not carry out an assessment; advice_requested: The council asked a professional or service for advice; advice_received: The advice was received; decision_not_to_issue_notified: The council told the family it will not issue an EHC plan; draft_plan_sent: The council sent the draft EHC plan; final_plan_issued: The council sent the final EHC plan; previous_review: The last annual review meeting for the plan; review_meeting: The annual review meeting (held or planned); review_invitations_sent: Invitations to the review meeting were sent; review_advice_sent: The advice and information for the review meeting was sent to everyone invited; review_report_sent: The review report was sent after the meeting; review_decision_notified: The council told the family its decision after the review (keep, amend or stop the plan); amendment_proposal_sent: The council sent proposed amendments to the plan; amended_plan_issued: The council sent the final amended plan, or its decision not to amend; reassessment_requested: The council received a request for a re-assessment; reassessment_decision_notified: The council told the family whether it will re-assess; reassessment_decided: The council decided to re-assess on its own initiative; reassessed_plan_issued: The council sent the plan after re-assessment, or its decision not to amend; cease_decision_notified: The council told the family it has decided to stop maintaining the plan; transfer_between_phases: The date the child or young person moves to the next phase of education; moved_to_new_council: The plan transferred to a new council after a move; new_council_informed_family: The new council told the family about the transferred plan; appealable_decision_sent: The council sent written notice of a decision that can be appealed; mediation_adviser_told_no_mediation: The family told the mediation adviser they do not want mediation; council_told_wants_mediation: The council was told the family wants mediation; mediation_ended: Mediation ended; mediation_certificate_issued: The mediation certificate was issued; appeal_registered: The council received the appeal from the SEND Tribunal; appeal_response_sent: The council sent its response to the appeal to the Tribunal; appeal_not_opposed: The council told the Tribunal, before sending its response, that it will not oppose the appeal; tribunal_order_made: The SEND Tribunal made its order; recommendation_made: The SEND Tribunal made a health or social care recommendation; recommendation_response_sent: The council or the health body sent its written reply to a Tribunal health or social care recommendation; recommendation_response_copied: The council sent the Secretary of State a copy of the written reply to a Tribunal health or social care recommendation; subject_access_request_made: A request for personal information (subject access request) was received; foi_request_made: A freedom of information request was received."
                            },
                            "date": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                              "description": "The date (YYYY-MM-DD) the user gave. Use only dates the user gives; never guess. For a rough date or a range (\"about 10 March\", \"early March\"), the first possible day, with approximate true (and date_latest if the user knows the last possible day). A date after as_of (or today) needs date_basis \"planned\", except review_meeting and transfer_between_phases."
                            },
                            "date_latest": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                              "description": "Only when the user knows a range: the last possible day (YYYY-MM-DD). Leave out for a single date."
                            },
                            "date_basis": {
                              "type": "string",
                              "enum": [
                                "sent",
                                "emailed",
                                "posted",
                                "received",
                                "on_letter",
                                "approximate",
                                "held",
                                "planned"
                              ],
                              "description": "What the date is, if not the usual for that event. sent: the day it was sent (by an unknown method); emailed: the day it was sent by email; posted: the day it was posted; received: the day it was received; on_letter: the date printed on the letter or email; approximate: a rough date; held: the day it took place; planned: the day it is planned for. Leave out when the date is what the event name says (for request_received, the day the council received it; for a decision or plan, the day the council sent it). \"received\" is common for letters: the family's own dates are then counted from 2 working days earlier."
                            },
                            "approximate": {
                              "type": "boolean",
                              "description": "True if the user only knows the date roughly: date is then the earliest day it could have been."
                            },
                            "date_on_letter": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                              "description": "Only for a decision that can be appealed (one that starts the mediation and appeal dates), when the date printed on the letter is not the date given (for example a letter dated before it was posted): that printed date (YYYY-MM-DD). The last day to contact the mediation adviser is then counted from it when it is earlier, because SEND Regulations 2014 reg 34(2) counts the 2 months from the date of the notice. The time to appeal runs from the day it was sent: when date is that day, it is counted from date; when date is the day it arrived, a rough date or a range (the day it was sent is not known), it is counted from the printed date when that is earlier, because a letter is not usually sent before the date on it."
                            },
                            "date_received": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                              "description": "Only for draft_plan_sent, amendment_proposal_sent or review_decision_notified (a decision to amend), when the date given is the day it was sent or posted and the day it arrived is known too: the day it arrived (YYYY-MM-DD). The at least 15 days for comments begin with the day the document was served, so the last day counted from the day it arrived is the latest it can be; the family's date to act by stays the one counted from the date given. Not used for any other date (the time to appeal runs from the day the decision was sent)."
                            },
                            "advice_type": {
                              "type": "string",
                              "enum": [
                                "educational",
                                "health",
                                "psychological",
                                "social_care",
                                "preparing_for_adulthood",
                                "other"
                              ],
                              "description": "For advice_requested and advice_received: which advice, to pair a request with its advice. educational: Educational advice, usually from the school or setting (reg 6(1)(b)); health: Medical or health advice, such as from a paediatrician or therapist (reg 6(1)(c)); psychological: Psychological advice from an educational psychologist (reg 6(1)(d)); social_care: Social care advice (reg 6(1)(e)); preparing_for_adulthood: Advice on preparing for adulthood, from Year 9 (reg 6(1)(g)); other: Advice from anyone else the council asks, including someone the family asked it to consult (reg 6(1)(f) and (h))."
                            },
                            "transfer_kind": {
                              "type": "string",
                              "enum": [
                                "school_phase",
                                "secondary_to_post16",
                                "post16_other_time"
                              ],
                              "description": "For transfer_between_phases: the kind of move. school_phase: Between school phases (for example early years to school, infant to junior, primary to secondary); secondary_to_post16: From secondary school to a post-16 institution (such as a college); post16_other_time: From one post-16 institution to another (at any time of year, including the start of an academic year). If left out, worked out from year_group where possible, otherwise school_phase. For a move from Year 12 or above, which is a young person's move (secondary_to_post16 or post16_other_time, never school_phase), the dates for both are given as \"if\" answers and the kind is asked for."
                            },
                            "order_kind": {
                              "type": "string",
                              "enum": [
                                "assess",
                                "make_plan",
                                "remit",
                                "amend_needs_or_provision",
                                "amend_placement",
                                "continue_and_amend",
                                "continue",
                                "cease"
                              ],
                              "description": "For tribunal_order_made or appeal_not_opposed: what was ordered or conceded. assess: Carry out an assessment or re-assessment; make_plan: Make and maintain an EHC plan; remit: Reconsider the decision (the case is referred back to the council); amend_needs_or_provision: Amend the special educational needs or provision in the plan; amend_placement: Change the school or institution (or type) named in the plan; continue_and_amend: Continue to maintain the plan and amend it; if the order also changes the school or institution (or type), give amend_placement as well, as its own event with the same date; continue: Continue to maintain the plan; cease: Allow the council to stop maintaining the plan. For appeal_not_opposed only assess, make_plan, amend_needs_or_provision, amend_placement, continue_and_amend, continue: SEND Regulations 2014 reg 45 sets no time limit for any other."
                            },
                            "outcome": {
                              "type": "string",
                              "enum": [
                                "keep",
                                "amend",
                                "cease",
                                "reassess",
                                "refuse",
                                "amended",
                                "not_amended"
                              ],
                              "description": "For review_decision_notified: keep (no change), amend or cease (stop the plan). For reassessment_decision_notified: reassess or refuse. For reassessed_plan_issued: amended (an amended or replacement plan was sent) or not_amended (a decision not to amend or replace it). Leave out if not known."
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        "description": "The events so far, as saved. An event saved with no date is taken as having happened, with its timing not known."
                      },
                      "open_deadlines": {
                        "type": "array",
                        "maxItems": 40,
                        "description": "Deadlines open or passed on the as_of date (for reference; they are worked out again).",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "^[a-z0-9_]{1,80}$",
                              "description": "Deadline id."
                            },
                            "rule_id": {
                              "type": "string",
                              "enum": [
                                "assessment_decision",
                                "advice_6_weeks",
                                "decision_not_to_issue",
                                "draft_latest_for_20_weeks",
                                "draft_plan_comments",
                                "final_plan_20_weeks",
                                "first_annual_review",
                                "next_annual_review",
                                "review_invitations",
                                "review_advice_circulated",
                                "review_report",
                                "review_decision",
                                "amendment_comments",
                                "amended_plan_8_weeks",
                                "reassessment_decision",
                                "reassessment_plan_14_weeks",
                                "review_after_reassessment",
                                "phase_transfer_school",
                                "phase_transfer_post16",
                                "phase_transfer_post16_other",
                                "phase_transfer_school_latest_proposals",
                                "phase_transfer_school_latest_meeting",
                                "phase_transfer_school_latest_invitations",
                                "phase_transfer_post16_latest_proposals",
                                "phase_transfer_post16_latest_meeting",
                                "phase_transfer_post16_latest_invitations",
                                "phase_transfer_post16_other_latest_proposals",
                                "phase_transfer_post16_other_latest_meeting",
                                "phase_transfer_post16_other_latest_invitations",
                                "new_council_informs_family",
                                "review_after_transfer",
                                "contact_mediation_adviser",
                                "mediation_certificate_no_mediation",
                                "mediation_within_30_days",
                                "mediation_certificate_after_mediation",
                                "appeal_deadline",
                                "council_appeal_response",
                                "order_assess_notify",
                                "order_assess_no_plan",
                                "order_assess_plan",
                                "order_make_plan_draft",
                                "order_make_plan_final",
                                "order_remit",
                                "order_amend_provision",
                                "order_amend_placement",
                                "order_continue_and_amend",
                                "unopposed_assess",
                                "unopposed_assess_no_plan",
                                "unopposed_assess_plan",
                                "unopposed_amend_provision",
                                "unopposed_amend_placement",
                                "unopposed_make_plan",
                                "unopposed_make_plan_final",
                                "unopposed_continue_and_amend",
                                "recommendation_response",
                                "recommendation_response_copy",
                                "subject_access_response",
                                "foi_response"
                              ],
                              "description": "Deadline rule id."
                            },
                            "due_date": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                              "description": "The due date."
                            },
                            "group": {
                              "type": "string",
                              "enum": [
                                "you",
                                "council",
                                "other"
                              ],
                              "description": "you: the family's date; council: the council's; other: someone else's."
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "as_of": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "description": "The date the summary was made."
                      },
                      "format": {
                        "type": "string",
                        "enum": [
                          "plenda-case-1"
                        ],
                        "description": "The format of an older summary."
                      },
                      "rules_version": {
                        "type": "string",
                        "pattern": "^england-\\d{4}\\.\\d{2}$",
                        "description": "The rules version it was made with."
                      },
                      "stages": {
                        "type": "array",
                        "maxItems": 3,
                        "items": {
                          "type": "string",
                          "enum": [
                            "sen_support",
                            "requesting",
                            "deciding_to_assess",
                            "assessing",
                            "deciding_to_issue",
                            "draft_plan",
                            "naming_a_school",
                            "final_plan",
                            "plan_not_delivered",
                            "annual_review",
                            "amendment",
                            "phase_transfer",
                            "reassessment",
                            "ceasing",
                            "moving_area",
                            "becoming_a_young_person",
                            "personal_budgets",
                            "eotas_and_home_education",
                            "after_tribunal",
                            "getting_records",
                            "disagreement"
                          ]
                        },
                        "description": "Stage ids in an older summary."
                      },
                      "role": {
                        "type": "string",
                        "enum": [
                          "parent",
                          "young_person",
                          "school",
                          "professional",
                          "local_authority"
                        ],
                        "description": "Who was asking. Used when audience is not given."
                      },
                      "year_group": {
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 14,
                        "description": "School year group on the as_of date (moved on automatically when the school year changes). Used when year_group is not given."
                      },
                      "usual_year_group": {
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 14,
                        "description": "The year group usual for their age on the as_of date, if different (moved on automatically when the school year changes). Used when usual_year_group is not given."
                      },
                      "rights_holder": {
                        "type": "string",
                        "enum": [
                          "parent",
                          "young_person",
                          "representative"
                        ],
                        "description": "Who held the rights on the as_of date. Used when neither rights_holder nor a year group gives it."
                      },
                      "key_dates": {
                        "type": "object",
                        "description": "An older summary's latest date for each event type.",
                        "properties": {
                          "request_received": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "brought_to_attention": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "council_became_responsible": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "decision_to_assess_notified": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "decision_not_to_assess_notified": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "advice_requested": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "advice_received": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "decision_not_to_issue_notified": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "draft_plan_sent": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "final_plan_issued": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "previous_review": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "review_meeting": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "review_invitations_sent": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "review_advice_sent": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "review_report_sent": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "review_decision_notified": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "amendment_proposal_sent": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "amended_plan_issued": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "reassessment_requested": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "reassessment_decision_notified": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "reassessment_decided": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "reassessed_plan_issued": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "cease_decision_notified": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "transfer_between_phases": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "moved_to_new_council": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "new_council_informed_family": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "appealable_decision_sent": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "mediation_adviser_told_no_mediation": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "council_told_wants_mediation": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "mediation_ended": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "mediation_certificate_issued": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "appeal_registered": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "appeal_response_sent": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "appeal_not_opposed": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "tribunal_order_made": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "recommendation_made": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "recommendation_response_sent": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "recommendation_response_copied": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "subject_access_request_made": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          },
                          "foi_request_made": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "Date (YYYY-MM-DD)."
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  },
                  "council_relies_on_exception": {
                    "type": "array",
                    "maxItems": 10,
                    "description": "Only if the council (or an adviser) has said in writing that it is relying on an exception to a time limit. Never assume one: school holidays alone are not an exception. The date shown never moves; the result says what the exception would mean.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "deadline": {
                          "type": "string",
                          "enum": [
                            "assessment_decision",
                            "advice_6_weeks",
                            "decision_not_to_issue",
                            "final_plan_20_weeks",
                            "reassessment_plan_14_weeks",
                            "order_assess_notify",
                            "order_assess_no_plan",
                            "order_assess_plan",
                            "order_make_plan_draft",
                            "order_make_plan_final",
                            "unopposed_assess",
                            "unopposed_make_plan",
                            "unopposed_make_plan_final",
                            "all"
                          ],
                          "description": "The deadline rule_id the council says the exception applies to, or \"all\"."
                        },
                        "regulation": {
                          "type": "string",
                          "enum": [
                            "reg 5(4)",
                            "reg 8(2)",
                            "reg 10(4)",
                            "reg 13(3)",
                            "reg 27(3)",
                            "reg 44(3)",
                            "reg 45(7)"
                          ],
                          "description": "Or the regulation the council names: reg 5(4) (decision to assess), reg 8(2) (advice), reg 10(4) (decision not to issue), reg 13(3) (final plan), reg 27(3) (plan after re-assessment), reg 44(3) (after a Tribunal order), reg 45(7) (after an unopposed appeal)."
                        },
                        "reason": {
                          "type": "string",
                          "enum": [
                            "school_closure",
                            "personal_circumstances",
                            "absence_from_area",
                            "missed_appointment",
                            "unknown"
                          ],
                          "description": "The reason the council gives: school_closure (advice asked during a closure of 4 weeks or more), personal_circumstances (exceptional personal circumstances, or for advice under reg 8(2) exceptional circumstances, affecting the child, parent or young person), absence_from_area (away from the area for a set time), missed_appointment (a missed appointment for an examination or test), unknown (not said)."
                        },
                        "reason_given": {
                          "type": "string",
                          "enum": [
                            "school_closure",
                            "personal_circumstances",
                            "absence_from_area",
                            "missed_appointment",
                            "unknown"
                          ],
                          "description": "Same as reason."
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "audience": {
                    "type": "string",
                    "enum": [
                      "parent",
                      "young_person",
                      "school",
                      "professional",
                      "local_authority"
                    ],
                    "description": "Who is asking: parent, young_person (over compulsory school age: past the last Friday in June of the school year in which they turn 16, usually the end of Year 11), school (a school or college, such as a SENCO), professional (someone helping a family), local_authority (council staff). Changes the wording, not the dates. Defaults to parent."
                  },
                  "rights_holder": {
                    "type": "string",
                    "enum": [
                      "parent",
                      "young_person",
                      "representative"
                    ],
                    "description": "Who holds the rights: parent (child of compulsory school age or younger), young_person (over compulsory school age: after the last Friday in June of the school year in which they turn 16, usually the end of Year 11; not the 16th birthday), representative (acting for a young person who lacks the mental capacity to make the decision). Leave out if year_group is given; if both are given they must agree, so for a pupil taught outside the usual year group for their age give usual_year_group too."
                  },
                  "year_group": {
                    "type": "integer",
                    "minimum": -1,
                    "maximum": 14,
                    "description": "School year group now: -1 nursery, 0 Reception, 1 to 11 for Years 1 to 11, 12 and 13 for the two years after Year 11, by age (the school years in which they turn 17 and 18), 14 for a young person who turned 18 before the school year began, whatever course they are on. Used to work out who holds the rights and the kind of phase transfer."
                  },
                  "usual_year_group": {
                    "type": "integer",
                    "minimum": -1,
                    "maximum": 14,
                    "description": "Only for a pupil taught in a different year group from the usual one for their age (for example a summer-born child who started Reception a year late, or a pupil held back or moved up a year): the year group usual for their age, with the same values as year_group. Used instead of year_group to work out who holds the rights, because that turns on age: the end of compulsory school age is the last Friday in June of the school year in which they turn 16. year_group is still used for the kind of phase transfer."
                  },
                  "as_of": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "Optional date to work out status on (YYYY-MM-DD). Defaults to today in the UK."
                  },
                  "warn_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 90,
                    "description": "How many days before a date it counts as \"due soon\" or \"closing soon\". Defaults to 14, or longer for dates that need planning (annual reviews and phase transfers)."
                  },
                  "detail": {
                    "type": "string",
                    "enum": [
                      "summary",
                      "full"
                    ],
                    "description": "summary (default): open and passed dates, up to 15. full: every date, including ones done on time."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "view": {
                          "type": "string",
                          "const": "timeline"
                        },
                        "summary_for_user": {
                          "type": "string"
                        },
                        "next_actions": {
                          "type": "array",
                          "maxItems": 3,
                          "items": {
                            "type": "object",
                            "properties": {
                              "text": {
                                "type": "string"
                              },
                              "date": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "owner": {
                                "type": "string",
                                "enum": [
                                  "you",
                                  "council",
                                  "school",
                                  "health",
                                  "tribunal",
                                  "mediation",
                                  "other"
                                ]
                              }
                            },
                            "required": [
                              "text",
                              "date",
                              "owner"
                            ]
                          }
                        },
                        "keep_wording": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "rules_version": {
                          "type": "string"
                        },
                        "law_as_at": {
                          "type": "string"
                        },
                        "schema_version": {
                          "type": "string"
                        },
                        "engine_version": {
                          "type": "string"
                        },
                        "disclaimer": {
                          "type": "string"
                        },
                        "privacy": {
                          "type": "object",
                          "properties": {
                            "identifiers_found": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "note": {
                              "type": "string"
                            }
                          }
                        },
                        "as_of": {
                          "type": "string"
                        },
                        "audience": {
                          "type": "string",
                          "enum": [
                            "parent",
                            "young_person",
                            "school",
                            "professional",
                            "local_authority"
                          ]
                        },
                        "rights_holder": {
                          "type": "string",
                          "enum": [
                            "parent",
                            "young_person",
                            "representative"
                          ]
                        },
                        "rights_holder_basis": {
                          "type": "string",
                          "enum": [
                            "given",
                            "year_group",
                            "audience",
                            "assumed"
                          ]
                        },
                        "rights_holder_reason": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "rights_holder_note": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "next_for_you": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "title": {
                              "type": "string"
                            },
                            "due_date": {
                              "type": "string"
                            },
                            "due_time": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "message": {
                              "type": "string"
                            },
                            "later_date": {
                              "type": "string",
                              "description": "Only once due_date (the earliest reading) has passed while the date is still to come: the later last day (YYYY-MM-DD), the one to act by. For a date counted two ways (the review counted from the meeting or from the council's decision after it), or for the family's at least 15 days for comments once the safe date (due_date) has passed, judged on the latest reading of the dates given (a letter that may have been served later than the date given). The message gives both."
                            }
                          },
                          "required": [
                            "id",
                            "title",
                            "due_date",
                            "due_time",
                            "message"
                          ]
                        },
                        "next_for_council": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "title": {
                              "type": "string"
                            },
                            "due_date": {
                              "type": "string"
                            },
                            "due_time": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "message": {
                              "type": "string"
                            },
                            "later_date": {
                              "type": "string",
                              "description": "Only once due_date (the earliest reading) has passed while the date is still to come: the later last day (YYYY-MM-DD), the one to act by. For a date counted two ways (the review counted from the meeting or from the council's decision after it), or for the family's at least 15 days for comments once the safe date (due_date) has passed, judged on the latest reading of the dates given (a letter that may have been served later than the date given). The message gives both."
                            }
                          },
                          "required": [
                            "id",
                            "title",
                            "due_date",
                            "due_time",
                            "message"
                          ]
                        },
                        "groups": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "group": {
                                "type": "string",
                                "enum": [
                                  "you",
                                  "council",
                                  "other"
                                ],
                                "description": "you: the family's date; council: the council's (or the school's for review steps); other: someone else's."
                              },
                              "title": {
                                "type": "string"
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "rule_id": {
                                      "type": "string"
                                    },
                                    "title": {
                                      "type": "string"
                                    },
                                    "status": {
                                      "type": "string"
                                    },
                                    "status_label": {
                                      "type": "string"
                                    },
                                    "due_date": {
                                      "type": "string"
                                    },
                                    "due_time": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "message": {
                                      "type": "string"
                                    },
                                    "sources": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "cite": {
                                            "type": "string"
                                          },
                                          "url": {
                                            "type": "string"
                                          },
                                          "status": {
                                            "type": "string",
                                            "enum": [
                                              "statute",
                                              "code_must",
                                              "code_should",
                                              "case_law",
                                              "good_practice",
                                              "guidance"
                                            ]
                                          },
                                          "status_label": {
                                            "type": "string"
                                          },
                                          "verify": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "cite",
                                          "url",
                                          "status",
                                          "status_label"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "rule_id",
                                    "title",
                                    "status",
                                    "status_label",
                                    "due_date",
                                    "due_time",
                                    "message",
                                    "sources"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "group",
                              "title",
                              "items"
                            ]
                          }
                        },
                        "deadlines": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "instance_key": {
                                "type": "string",
                                "description": "Stable key for this deadline (rule, trigger event and date, pack version). Use it to update a stored deadline in place."
                              },
                              "rule_id": {
                                "type": "string",
                                "enum": [
                                  "assessment_decision",
                                  "advice_6_weeks",
                                  "decision_not_to_issue",
                                  "draft_latest_for_20_weeks",
                                  "draft_plan_comments",
                                  "final_plan_20_weeks",
                                  "first_annual_review",
                                  "next_annual_review",
                                  "review_invitations",
                                  "review_advice_circulated",
                                  "review_report",
                                  "review_decision",
                                  "amendment_comments",
                                  "amended_plan_8_weeks",
                                  "reassessment_decision",
                                  "reassessment_plan_14_weeks",
                                  "review_after_reassessment",
                                  "phase_transfer_school",
                                  "phase_transfer_post16",
                                  "phase_transfer_post16_other",
                                  "phase_transfer_school_latest_proposals",
                                  "phase_transfer_school_latest_meeting",
                                  "phase_transfer_school_latest_invitations",
                                  "phase_transfer_post16_latest_proposals",
                                  "phase_transfer_post16_latest_meeting",
                                  "phase_transfer_post16_latest_invitations",
                                  "phase_transfer_post16_other_latest_proposals",
                                  "phase_transfer_post16_other_latest_meeting",
                                  "phase_transfer_post16_other_latest_invitations",
                                  "new_council_informs_family",
                                  "review_after_transfer",
                                  "contact_mediation_adviser",
                                  "mediation_certificate_no_mediation",
                                  "mediation_within_30_days",
                                  "mediation_certificate_after_mediation",
                                  "appeal_deadline",
                                  "council_appeal_response",
                                  "order_assess_notify",
                                  "order_assess_no_plan",
                                  "order_assess_plan",
                                  "order_make_plan_draft",
                                  "order_make_plan_final",
                                  "order_remit",
                                  "order_amend_provision",
                                  "order_amend_placement",
                                  "order_continue_and_amend",
                                  "unopposed_assess",
                                  "unopposed_assess_no_plan",
                                  "unopposed_assess_plan",
                                  "unopposed_amend_provision",
                                  "unopposed_amend_placement",
                                  "unopposed_make_plan",
                                  "unopposed_make_plan_final",
                                  "unopposed_continue_and_amend",
                                  "recommendation_response",
                                  "recommendation_response_copy",
                                  "subject_access_response",
                                  "foi_response"
                                ]
                              },
                              "title": {
                                "type": "string"
                              },
                              "stage": {
                                "type": "string",
                                "description": "The stage this date belongs to. A stage id of ehcp_next_steps, or \"disagreement\" for the mediation and appeal steps, which can follow a decision at any stage."
                              },
                              "owner": {
                                "type": "string",
                                "enum": [
                                  "family",
                                  "council",
                                  "school_or_council",
                                  "council_or_health",
                                  "advisers",
                                  "school_or_adviser",
                                  "mediation_adviser",
                                  "mediator",
                                  "organisation"
                                ],
                                "description": "Whose date it is. family: You (the parent or young person); council: The council; school_or_council: The school or college, if the council has asked it (otherwise the council); council_or_health: The council (social care) or the integrated care board (health); advisers: The professional or service asked for advice; school_or_adviser: The school or college asked for the educational advice (or another adviser if there is none); mediation_adviser: The mediation adviser; mediator: The mediation service; organisation: The organisation that received the request."
                              },
                              "group": {
                                "type": "string",
                                "enum": [
                                  "you",
                                  "council",
                                  "other"
                                ],
                                "description": "you: the family's date; council: the council's (or the school's for review steps); other: someone else's."
                              },
                              "who": {
                                "type": "string"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "duty",
                                  "window",
                                  "derived"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "done",
                                  "done_late",
                                  "no_record_by_due_date",
                                  "exception_relied_on",
                                  "due_today",
                                  "due_soon",
                                  "upcoming",
                                  "open",
                                  "closing_soon",
                                  "closes_today",
                                  "closed",
                                  "depends_on_certificate",
                                  "planning_date_passed",
                                  "passed_if_duty_applies",
                                  "depends_on_review_date",
                                  "depends_on_step"
                                ]
                              },
                              "status_class": {
                                "type": "string",
                                "enum": [
                                  "done",
                                  "pending",
                                  "past_time_limit",
                                  "unknown",
                                  "not_applicable"
                                ]
                              },
                              "status_label": {
                                "type": "string"
                              },
                              "due_date": {
                                "type": "string"
                              },
                              "due_time": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "days_remaining": {
                                "type": "integer",
                                "description": "Days from as_of to the day the status is judged on: due_date, or due_range.latest when due_range.judged_on is \"latest\" (negative once passed). The text counts the days to due_date while that is still to come."
                              },
                              "due_range": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "description": "When the dates given leave a range for the last day. due_date is the earliest for the family's dates (the safe date to act by) and the latest for anyone else's.",
                                "properties": {
                                  "earliest": {
                                    "type": "string",
                                    "description": "The earliest the last day can be (YYYY-MM-DD)."
                                  },
                                  "latest": {
                                    "type": "string",
                                    "description": "The latest the last day can be (YYYY-MM-DD)."
                                  },
                                  "used": {
                                    "type": "string",
                                    "enum": [
                                      "earliest",
                                      "latest"
                                    ],
                                    "description": "Which end due_date is."
                                  },
                                  "judged_on": {
                                    "type": "string",
                                    "enum": [
                                      "latest"
                                    ],
                                    "description": "Present when the status and days_remaining are judged on the latest end: the family's 15 days for comments (which begin with the day the document was served) read by a council, school or professional, or read by the family once the earliest end (the safe date) has passed; and a review counted from the meeting or from the council's decision after it. Such a date is not called closed or passed until the latest end has passed."
                                  },
                                  "latest_words": {
                                    "type": "string",
                                    "description": "Where the latest end comes from, in words that follow a date: for the family's 15 days for comments, \"counted from the day it arrived\" or \"on the latest reading of the dates given\"; for a review counted two ways, \"counted from the council's decision\" (or \"taking it as the council's decision\" after a move)."
                                  },
                                  "earliest_words": {
                                    "type": "string",
                                    "description": "For a review counted two ways: where the earliest end (due_date) comes from, in words that follow a date (\"counted from the meeting\", or \"taking the previous review as the meeting\" after a move). Which reading applies is not settled."
                                  }
                                }
                              },
                              "started_by": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "date": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "date_basis": {
                                    "type": "string"
                                  },
                                  "outcome": {
                                    "type": "string",
                                    "enum": [
                                      "keep",
                                      "amend",
                                      "cease",
                                      "reassess",
                                      "refuse",
                                      "amended",
                                      "not_amended"
                                    ],
                                    "description": "The outcome given with the event that started this date, as given in events (keep, amend or cease after a review; reassess or refuse; amended or not_amended after a re-assessment). Left out when none was given."
                                  }
                                },
                                "required": [
                                  "type",
                                  "date",
                                  "label",
                                  "date_basis"
                                ]
                              },
                              "counted_from": {
                                "type": "string"
                              },
                              "done_date": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "days_late": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "message": {
                                "type": "string"
                              },
                              "what": {
                                "type": "string"
                              },
                              "counting": {
                                "type": "string"
                              },
                              "if_missed": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "means": {
                                    "type": "string"
                                  },
                                  "common_steps": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  },
                                  "unchanged": {
                                    "type": "string"
                                  }
                                }
                              },
                              "after_closed": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "due_from_sent": {
                                "type": "string",
                                "description": "Only for the last day to contact a mediation adviser counted from the date printed on the letter (SEND Regulations 2014 reg 34(2), \"the date of the notice\"), once that day has passed: the last day counted from the day the letter was sent (reg 33), still to come (YYYY-MM-DD). Which applies is not settled: give both, never due_date alone as the day the adviser can no longer be contacted."
                              },
                              "exceptions": {
                                "type": "array",
                                "description": "The exceptions the law allows for this time limit.",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "regulation": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "label",
                                    "regulation"
                                  ]
                                }
                              },
                              "exception_relied_on": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The exception the council says it relies on, when it is one the law allows here."
                              },
                              "exception_note": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "conditional_duty": {
                                "type": "boolean",
                                "description": "True when the duty arises only on one answer: for example, a decision not to issue a plan must be notified by this date (a draft plan shows the other answer), and a plan amended or replaced after a re-assessment must be sent by it (a decision not to amend has no time limit)."
                              },
                              "appeal_depends_on_certificate": {
                                "type": "boolean",
                                "description": "True when mediation is under way and no certificate date has been given: the last day is the later of 2 months after the decision and 1 month after the certificate."
                              },
                              "appeal_certificate_open": {
                                "type": "boolean",
                                "description": "True when no mediation certificate or mediation step has been given: the date is 2 months after the decision. An appeal by then is in time; where a certificate is needed, the last day is 1 month after the certificate is issued, if that is later."
                              },
                              "shown_by": {
                                "type": "object",
                                "description": "Only for a step with no date given that a later dated event shows has happened (status done, done_date null): that later event. Whether the step was on time is not known, unless its date is still to come (it was then done by its date, as its message says). A step a later event given with no date shows has happened (in a pasted case_summary) is done the same way, with no shown_by: its message names that event.",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "date": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "date",
                                  "label"
                                ]
                              },
                              "given_no_date": {
                                "type": "object",
                                "description": "Only for a step given as having happened with no date (an event a pasted case_summary holds with no date): that event (status done, done_date null). Whether the step was on time is not known, unless its date is still to come (it was then done by its date, as its message says).",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "label"
                                ]
                              },
                              "superseded": {
                                "type": "object",
                                "description": "Only for a request for advice with no advice date given, listed with detail \"full\": the later step (a draft or final plan, or a decision not to issue one) that ended the advice stage. Whether the advice was on time is not known; nothing is due from anyone on it now.",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "date": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "date",
                                  "label"
                                ]
                              },
                              "confidence": {
                                "type": "string",
                                "enum": [
                                  "high",
                                  "medium",
                                  "low"
                                ]
                              },
                              "short": {
                                "type": "string",
                                "description": "A short label for the date, as used in calendars."
                              },
                              "action": {
                                "type": "string",
                                "description": "For the family's windows: what the family can do by the date."
                              },
                              "approximate": {
                                "type": "boolean"
                              },
                              "quiet": {
                                "type": "boolean"
                              },
                              "applies_if": {
                                "type": "string",
                                "description": "The condition the date applies on, read after \"if\": for a mediation or appeal date worked out from a decision given with no outcome, the decision it applies to (\"the decision is to keep or stop the plan\"); for a family date worked out from a step given as planned whose date has come (status depends_on_step), that it happened on that date (\"the draft plan was sent on 25 September 2026, as planned\"), or both."
                              },
                              "as_planned_status": {
                                "type": "string",
                                "enum": [
                                  "done",
                                  "done_late",
                                  "no_record_by_due_date",
                                  "exception_relied_on",
                                  "due_today",
                                  "due_soon",
                                  "upcoming",
                                  "open",
                                  "closing_soon",
                                  "closes_today",
                                  "closed",
                                  "depends_on_certificate",
                                  "planning_date_passed",
                                  "passed_if_duty_applies",
                                  "depends_on_review_date"
                                ],
                                "description": "Only for a family date worked out from a step given as planned (date_basis planned) whose date has come (status depends_on_step): the status the date has if the step happened on its planned date, the earliest it can have, as due_date and days_remaining are worked out. The step may have happened later, or not yet: give the date with its condition (applies_if), never as open or closed, and ask for the day it happened."
                              },
                              "cautions": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "sources": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "cite": {
                                      "type": "string"
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "statute",
                                        "code_must",
                                        "code_should",
                                        "case_law",
                                        "good_practice",
                                        "guidance"
                                      ]
                                    },
                                    "status_label": {
                                      "type": "string"
                                    },
                                    "verify": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "cite",
                                    "url",
                                    "status",
                                    "status_label"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "instance_key",
                              "rule_id",
                              "title",
                              "stage",
                              "owner",
                              "group",
                              "who",
                              "kind",
                              "status",
                              "status_class",
                              "status_label",
                              "due_date",
                              "due_time",
                              "days_remaining",
                              "started_by",
                              "counted_from",
                              "done_date",
                              "days_late",
                              "message",
                              "what",
                              "counting",
                              "if_missed",
                              "exceptions",
                              "exception_relied_on",
                              "approximate",
                              "cautions",
                              "sources",
                              "confidence",
                              "short"
                            ]
                          }
                        },
                        "counts": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "integer"
                          }
                        },
                        "status_classes": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "integer"
                          }
                        },
                        "hidden": {
                          "type": "object",
                          "description": "Dates not listed in deadlines (ask with detail \"full\" to list them): done on time (steps done but not clearly on time stay listed), the family's windows that closed more than 3 months ago, review steps before or after a meeting that has been held with no date given for them, and (superseded) requests for advice with no advice date given that the draft or final plan, or a decision not to issue one, has overtaken.",
                          "properties": {
                            "done": {
                              "type": "integer"
                            },
                            "closed": {
                              "type": "integer"
                            },
                            "steps": {
                              "type": "integer"
                            },
                            "superseded": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "done",
                            "closed",
                            "steps",
                            "superseded"
                          ]
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "True when more than 15 open or passed dates were found and only the first 15 are listed."
                        },
                        "needs_info": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "conditional": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "if": {
                                "type": "string"
                              },
                              "then": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "if",
                              "then"
                            ]
                          }
                        },
                        "notes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "calendar": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "uid": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              },
                              "date": {
                                "type": "string"
                              },
                              "time": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "law_in_force": {
                          "type": "object",
                          "properties": {
                            "as_at": {
                              "type": "string"
                            },
                            "note": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "as_at",
                            "note"
                          ]
                        },
                        "case_summary": {
                          "type": "object",
                          "properties": {
                            "stage": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The stage of the latest event given. A stage id of ehcp_next_steps, or \"disagreement\" for the mediation and appeal steps, which can follow a decision at any stage."
                            },
                            "events": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "date": {
                                    "type": "string"
                                  },
                                  "date_basis": {
                                    "type": "string"
                                  },
                                  "date_latest": {
                                    "type": "string"
                                  },
                                  "date_on_letter": {
                                    "type": "string"
                                  },
                                  "date_received": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              }
                            },
                            "open_deadlines": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "due_date": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "due_date"
                                ]
                              }
                            },
                            "as_of": {
                              "type": "string"
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "parent",
                                "young_person",
                                "school",
                                "professional",
                                "local_authority"
                              ],
                              "description": "Who was asking (the audience)."
                            },
                            "year_group": {
                              "type": "integer",
                              "description": "School year group on the as_of date, when known."
                            },
                            "usual_year_group": {
                              "type": "integer",
                              "description": "The year group usual for their age on the as_of date, when given (a pupil taught outside it)."
                            },
                            "rights_holder": {
                              "type": "string",
                              "enum": [
                                "parent",
                                "young_person",
                                "representative"
                              ],
                              "description": "Who held the rights on the as_of date, when given or worked out (left out when only assumed)."
                            }
                          },
                          "required": [
                            "stage",
                            "events",
                            "open_deadlines",
                            "as_of",
                            "role"
                          ]
                        },
                        "presentation": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "view",
                        "summary_for_user",
                        "next_actions",
                        "keep_wording",
                        "rules_version",
                        "law_as_at",
                        "schema_version",
                        "engine_version",
                        "disclaimer",
                        "as_of",
                        "audience",
                        "rights_holder",
                        "rights_holder_basis",
                        "rights_holder_reason",
                        "rights_holder_note",
                        "next_for_you",
                        "next_for_council",
                        "groups",
                        "deadlines",
                        "counts",
                        "status_classes",
                        "hidden",
                        "truncated",
                        "needs_info",
                        "conditional",
                        "notes",
                        "calendar",
                        "law_in_force",
                        "case_summary",
                        "presentation"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "description": "Plain-language summary of the result for the assistant."
                    },
                    "detail": {
                      "type": "object",
                      "description": "Extra detail for displaying the result (for example full findings). Optional."
                    }
                  },
                  "required": [
                    "result",
                    "text"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The input was not usable. The error explains what to change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools/check_plan": {
      "post": {
        "operationId": "ehcp_check_plan",
        "summary": "Check an EHC plan",
        "description": "Use this when someone wants an EHCP (education, health and care plan) in England checked: a draft plan, a final plan, proposed amendments after an annual review, or just Section F. It checks each section against the SEND Regulations and the SEND Code of Practice: missing or combined sections; a school named in a draft; provision in Section F that does not say what, how often, how long, by whom or with what expertise; wording like \"access to\", \"up to\", \"as required\", \"small group\" or \"subject to funding\"; provision left to be decided later or set out only in a report; therapy in Section G that may belong in F; outcomes without a timeframe; preparing for adulthood from Year 9; Section K advice (no educational psychology advice, for example); and whether every need has an outcome and provision. Copy each section exactly (do not correct wording) as text; Plenda splits it into items and reads tables and lead-in lines. Send short facts, not text, for Sections A, C, D, I, J and K. Replace names with [CHILD] and [SCHOOL]. If the plan is long, send Section F first, then the rest. Results are points to check with sources, never a verdict: it does not say whether the help is enough or whether the plan is lawful. Do not use for one sentence or a list of report recommendations (use ehcp_check_wording), for deadlines (use ehcp_calculate_deadlines), or for council letters (use ehcp_check_letter).",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plan_stage": {
                    "type": "string",
                    "enum": [
                      "initial_draft",
                      "initial_final",
                      "proposed_amendments",
                      "final_amended",
                      "reassessment_draft",
                      "reassessment_final",
                      "post_tribunal",
                      "unknown"
                    ],
                    "description": "Which kind of plan this is. initial_draft: A draft of a new plan, sent for comment before the plan is first finalised. initial_final: A new plan, issued in final form. proposed_amendments: Proposed changes to an existing plan, sent for comment (usually after an annual review). final_amended: An existing plan, issued in final form after amendment. reassessment_draft: A draft plan after a re-assessment. reassessment_final: A plan issued in final form after a re-assessment. post_tribunal: A plan issued or amended to follow a SEND Tribunal order or a conceded appeal. unknown: Not known."
                  },
                  "sections_present": {
                    "type": "array",
                    "maxItems": 14,
                    "items": {
                      "type": "string",
                      "pattern": "^(?:A|B|C|D|E|F|G|H1|H2|I|J|K)(?:\\s*[+&/]\\s*(?:A|B|C|D|E|F|G|H1|H2|I|J|K))*$"
                    },
                    "description": "Every section heading the plan has, including ones you are not sending, e.g. [\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H1\",\"H2\",\"I\",\"J\",\"K\"]. Write headings that combine sections as \"H1+H2\". Leave out if you cannot see the whole plan: sections not sent are then reported as not checked, never as missing."
                  },
                  "context": {
                    "type": "object",
                    "description": "Facts about the plan that some checks depend on. Leave out anything not known.",
                    "properties": {
                      "year_group": {
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 14,
                        "description": "School year group now (Reception 0, nursery -1, 12 and 13 for the two years after Year 11, by age (the school years in which they turn 17 and 18), 14 for a young person who turned 18 before the school year began, whatever course they are on). Turns on the preparing-for-adulthood checks from Year 9, and says whether the parent or the young person holds the rights to comment and appeal (for a pupil taught outside the usual year group for their age, give usual_year_group too)."
                      },
                      "usual_year_group": {
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 14,
                        "description": "Only for a pupil taught in a different year group from the usual one for their age (for example a summer-born child who started Reception a year late, or a pupil held back or moved up a year): the year group usual for their age, with the same values as year_group. Used instead of year_group to work out who holds the rights, because that turns on age: the end of compulsory school age is the last Friday in June of the school year in which they turn 16."
                      },
                      "plan_date": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "description": "The date on the plan (YYYY-MM-DD), for spotting out-of-date content."
                      },
                      "last_review_date": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "description": "The date of the last annual review meeting, if the plan gives it."
                      },
                      "personal_budget": {
                        "type": "string",
                        "enum": [
                          "yes",
                          "requested",
                          "no",
                          "unknown"
                        ],
                        "description": "Whether a personal budget has been agreed or requested."
                      },
                      "direct_payment": {
                        "type": "string",
                        "enum": [
                          "yes",
                          "no",
                          "unknown"
                        ],
                        "description": "Whether any special educational provision is to be paid for by a direct payment."
                      },
                      "transfer_year": {
                        "type": "boolean",
                        "description": "True if the child or young person moves to a new phase of education within the next year."
                      },
                      "sensory_needs": {
                        "type": "array",
                        "maxItems": 3,
                        "items": {
                          "type": "string",
                          "enum": [
                            "hearing",
                            "vision",
                            "multi_sensory"
                          ]
                        },
                        "description": "Hearing or vision impairment mentioned in the plan."
                      }
                    },
                    "additionalProperties": false
                  },
                  "sections": {
                    "type": "object",
                    "description": "The sections you have. Send only what each check needs: exact text for B, E, F, G, H1 and H2; short facts for A, C, D, I, J and K. Remove names, dates of birth and NHS numbers first. All the text in one check, across every section and field, can be up to 30,000 characters; send Section F first and the rest in a second call if it is longer.",
                    "properties": {
                      "A": {
                        "type": "object",
                        "description": "Section A (views, interests and aspirations). Facts only, no text: Plenda checks that each part is there.",
                        "properties": {
                          "status": {
                            "type": "string",
                            "enum": [
                              "content",
                              "none_stated",
                              "blank"
                            ],
                            "description": "content if the section has content; none_stated if it says none apply; blank if it is empty or \"to be confirmed\". Worked out from the text if left out."
                          },
                          "child_views": {
                            "type": "boolean",
                            "description": "The child's or young person's own views are included."
                          },
                          "parent_views": {
                            "type": "boolean",
                            "description": "The parents' views are included (not needed for a young person)."
                          },
                          "interests": {
                            "type": "boolean",
                            "description": "Their interests are included."
                          },
                          "aspirations": {
                            "type": "boolean",
                            "description": "Their aspirations for the future are included."
                          },
                          "found_by": {
                            "type": "string",
                            "enum": [
                              "reading",
                              "keywords"
                            ],
                            "description": "How these facts were found: reading (the default: Section A was read) or keywords (by matching words, as Plenda's website does). Leave out if you read Section A."
                          }
                        },
                        "additionalProperties": false
                      },
                      "B": {
                        "type": "object",
                        "description": "Section B (Special educational needs). Used to check needs are described, provision written outside Section F, and the link to outcomes and provision. Send the section's text exactly as written (text), or its items (items). Replace names with [CHILD] and [SCHOOL].",
                        "properties": {
                          "status": {
                            "type": "string",
                            "enum": [
                              "content",
                              "none_stated",
                              "blank"
                            ],
                            "description": "content if the section has content; none_stated if it says none apply; blank if it is empty or \"to be confirmed\". Worked out from the text if left out."
                          },
                          "text": {
                            "type": "string",
                            "maxLength": 25000,
                            "description": "The whole section copied exactly, with its numbering, bullets and table rows (tabs or | between columns). Plenda splits it into items. All the text in one check, across every section, can be up to 30,000 characters."
                          },
                          "items": {
                            "type": "array",
                            "maxItems": 150,
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "pattern": "^(?:[A-K]|H[12])?-?(?:[0-9]{1,3}(?:\\.[0-9]{1,2})?[a-z]?|[a-z]{1,4})(?:-[0-9]{1,2})?$",
                                  "description": "The plan's own number for the item, e.g. \"F3\" or \"3.1\"."
                                },
                                "text": {
                                  "type": "string",
                                  "maxLength": 3000,
                                  "description": "The item copied exactly. Do not correct or reword it."
                                },
                                "fields": {
                                  "type": "object",
                                  "description": "Table columns for this row, copied exactly.",
                                  "properties": {
                                    "frequency": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "duration": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "staffing": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "delivered_by": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "expertise": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "group_size": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "period": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "review": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "need_ref": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "outcome_ref": {
                                      "type": "string",
                                      "maxLength": 300
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "lead_in": {
                                  "type": "string",
                                  "maxLength": 300,
                                  "description": "The line the item sits under, e.g. \"All staff will, throughout the school day:\"."
                                },
                                "area": {
                                  "type": "string",
                                  "enum": [
                                    "communication_interaction",
                                    "cognition_learning",
                                    "semh",
                                    "sensory_physical",
                                    "preparing_for_adulthood",
                                    "independence_self_care",
                                    "health_wellbeing"
                                  ],
                                  "description": "The area-of-need heading the item sits under, if the plan uses them."
                                }
                              },
                              "required": [
                                "text"
                              ],
                              "additionalProperties": false
                            },
                            "description": "Alternative to text: the items, each copied exactly."
                          }
                        },
                        "additionalProperties": false
                      },
                      "C": {
                        "type": "object",
                        "description": "Section C (Health care needs related to the special educational needs). Used only to link health needs to health provision. Send short neutral labels only: no diagnoses history, family details or names beyond what the need itself is.",
                        "properties": {
                          "status": {
                            "type": "string",
                            "enum": [
                              "content",
                              "none_stated",
                              "blank"
                            ],
                            "description": "content if the section has needs listed; none_stated if it says none apply; blank if it is empty or \"to be confirmed\". Worked out from the text if left out."
                          },
                          "items": {
                            "type": "array",
                            "maxItems": 40,
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "pattern": "^(?:[A-K]|H[12])?-?(?:[0-9]{1,3}(?:\\.[0-9]{1,2})?[a-z]?|[a-z]{1,4})(?:-[0-9]{1,2})?$"
                                },
                                "label": {
                                  "type": "string",
                                  "maxLength": 120,
                                  "description": "A short label for the need, e.g. \"needs help with toileting\"."
                                },
                                "area": {
                                  "type": "string",
                                  "enum": [
                                    "communication_interaction",
                                    "cognition_learning",
                                    "semh",
                                    "sensory_physical",
                                    "preparing_for_adulthood",
                                    "independence_self_care",
                                    "health_wellbeing"
                                  ],
                                  "description": "The area-of-need heading the item sits under, if the plan uses them."
                                }
                              },
                              "required": [
                                "label"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "D": {
                        "type": "object",
                        "description": "Section D (Social care needs related to the special educational needs or to a disability). Used only to link social care needs to social care provision. Send short neutral labels only: no diagnoses history, family details or names beyond what the need itself is.",
                        "properties": {
                          "status": {
                            "type": "string",
                            "enum": [
                              "content",
                              "none_stated",
                              "blank"
                            ],
                            "description": "content if the section has needs listed; none_stated if it says none apply; blank if it is empty or \"to be confirmed\". Worked out from the text if left out."
                          },
                          "items": {
                            "type": "array",
                            "maxItems": 40,
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "pattern": "^(?:[A-K]|H[12])?-?(?:[0-9]{1,3}(?:\\.[0-9]{1,2})?[a-z]?|[a-z]{1,4})(?:-[0-9]{1,2})?$"
                                },
                                "label": {
                                  "type": "string",
                                  "maxLength": 120,
                                  "description": "A short label for the need, e.g. \"needs help with toileting\"."
                                },
                                "area": {
                                  "type": "string",
                                  "enum": [
                                    "communication_interaction",
                                    "cognition_learning",
                                    "semh",
                                    "sensory_physical",
                                    "preparing_for_adulthood",
                                    "independence_self_care",
                                    "health_wellbeing"
                                  ],
                                  "description": "The area-of-need heading the item sits under, if the plan uses them."
                                }
                              },
                              "required": [
                                "label"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "E": {
                        "type": "object",
                        "description": "Section E (Outcomes). Used to check each outcome is a difference for the child, with a timeframe. Send the section's text exactly as written (text), or its items (items). Replace names with [CHILD] and [SCHOOL].",
                        "properties": {
                          "status": {
                            "type": "string",
                            "enum": [
                              "content",
                              "none_stated",
                              "blank"
                            ],
                            "description": "content if the section has content; none_stated if it says none apply; blank if it is empty or \"to be confirmed\". Worked out from the text if left out."
                          },
                          "text": {
                            "type": "string",
                            "maxLength": 25000,
                            "description": "The whole section copied exactly, with its numbering, bullets and table rows (tabs or | between columns). Plenda splits it into items. All the text in one check, across every section, can be up to 30,000 characters."
                          },
                          "items": {
                            "type": "array",
                            "maxItems": 150,
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "pattern": "^(?:[A-K]|H[12])?-?(?:[0-9]{1,3}(?:\\.[0-9]{1,2})?[a-z]?|[a-z]{1,4})(?:-[0-9]{1,2})?$",
                                  "description": "The plan's own number for the item, e.g. \"F3\" or \"3.1\"."
                                },
                                "text": {
                                  "type": "string",
                                  "maxLength": 3000,
                                  "description": "The item copied exactly. Do not correct or reword it."
                                },
                                "fields": {
                                  "type": "object",
                                  "description": "Table columns for this row, copied exactly.",
                                  "properties": {
                                    "frequency": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "duration": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "staffing": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "delivered_by": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "expertise": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "group_size": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "period": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "review": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "need_ref": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "outcome_ref": {
                                      "type": "string",
                                      "maxLength": 300
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "lead_in": {
                                  "type": "string",
                                  "maxLength": 300,
                                  "description": "The line the item sits under, e.g. \"All staff will, throughout the school day:\"."
                                },
                                "area": {
                                  "type": "string",
                                  "enum": [
                                    "communication_interaction",
                                    "cognition_learning",
                                    "semh",
                                    "sensory_physical",
                                    "preparing_for_adulthood",
                                    "independence_self_care",
                                    "health_wellbeing"
                                  ],
                                  "description": "The area-of-need heading the item sits under, if the plan uses them."
                                }
                              },
                              "required": [
                                "text"
                              ],
                              "additionalProperties": false
                            },
                            "description": "Alternative to text: the items, each copied exactly."
                          }
                        },
                        "additionalProperties": false
                      },
                      "F": {
                        "type": "object",
                        "description": "Section F (Special educational provision). Used to check each item says what is provided, how often, for how long, by whom and with what expertise. Send the section's text exactly as written (text), or its items (items). Replace names with [CHILD] and [SCHOOL].",
                        "properties": {
                          "status": {
                            "type": "string",
                            "enum": [
                              "content",
                              "none_stated",
                              "blank"
                            ],
                            "description": "content if the section has content; none_stated if it says none apply; blank if it is empty or \"to be confirmed\". Worked out from the text if left out."
                          },
                          "text": {
                            "type": "string",
                            "maxLength": 25000,
                            "description": "The whole section copied exactly, with its numbering, bullets and table rows (tabs or | between columns). Plenda splits it into items. All the text in one check, across every section, can be up to 30,000 characters."
                          },
                          "items": {
                            "type": "array",
                            "maxItems": 150,
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "pattern": "^(?:[A-K]|H[12])?-?(?:[0-9]{1,3}(?:\\.[0-9]{1,2})?[a-z]?|[a-z]{1,4})(?:-[0-9]{1,2})?$",
                                  "description": "The plan's own number for the item, e.g. \"F3\" or \"3.1\"."
                                },
                                "text": {
                                  "type": "string",
                                  "maxLength": 3000,
                                  "description": "The item copied exactly. Do not correct or reword it."
                                },
                                "fields": {
                                  "type": "object",
                                  "description": "Table columns for this row, copied exactly.",
                                  "properties": {
                                    "frequency": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "duration": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "staffing": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "delivered_by": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "expertise": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "group_size": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "period": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "review": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "need_ref": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "outcome_ref": {
                                      "type": "string",
                                      "maxLength": 300
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "lead_in": {
                                  "type": "string",
                                  "maxLength": 300,
                                  "description": "The line the item sits under, e.g. \"All staff will, throughout the school day:\"."
                                },
                                "area": {
                                  "type": "string",
                                  "enum": [
                                    "communication_interaction",
                                    "cognition_learning",
                                    "semh",
                                    "sensory_physical",
                                    "preparing_for_adulthood",
                                    "independence_self_care",
                                    "health_wellbeing"
                                  ],
                                  "description": "The area-of-need heading the item sits under, if the plan uses them."
                                }
                              },
                              "required": [
                                "text"
                              ],
                              "additionalProperties": false
                            },
                            "description": "Alternative to text: the items, each copied exactly."
                          }
                        },
                        "additionalProperties": false
                      },
                      "G": {
                        "type": "object",
                        "description": "Section G (Health care provision). Used to check health provision is specific and whether any therapy belongs in Section F. Send the section's text exactly as written (text), or its items (items). Replace names with [CHILD] and [SCHOOL].",
                        "properties": {
                          "status": {
                            "type": "string",
                            "enum": [
                              "content",
                              "none_stated",
                              "blank"
                            ],
                            "description": "content if the section has content; none_stated if it says none apply; blank if it is empty or \"to be confirmed\". Worked out from the text if left out."
                          },
                          "text": {
                            "type": "string",
                            "maxLength": 25000,
                            "description": "The whole section copied exactly, with its numbering, bullets and table rows (tabs or | between columns). Plenda splits it into items. All the text in one check, across every section, can be up to 30,000 characters."
                          },
                          "items": {
                            "type": "array",
                            "maxItems": 150,
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "pattern": "^(?:[A-K]|H[12])?-?(?:[0-9]{1,3}(?:\\.[0-9]{1,2})?[a-z]?|[a-z]{1,4})(?:-[0-9]{1,2})?$",
                                  "description": "The plan's own number for the item, e.g. \"F3\" or \"3.1\"."
                                },
                                "text": {
                                  "type": "string",
                                  "maxLength": 3000,
                                  "description": "The item copied exactly. Do not correct or reword it."
                                },
                                "fields": {
                                  "type": "object",
                                  "description": "Table columns for this row, copied exactly.",
                                  "properties": {
                                    "frequency": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "duration": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "staffing": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "delivered_by": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "expertise": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "group_size": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "period": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "review": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "need_ref": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "outcome_ref": {
                                      "type": "string",
                                      "maxLength": 300
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "lead_in": {
                                  "type": "string",
                                  "maxLength": 300,
                                  "description": "The line the item sits under, e.g. \"All staff will, throughout the school day:\"."
                                },
                                "area": {
                                  "type": "string",
                                  "enum": [
                                    "communication_interaction",
                                    "cognition_learning",
                                    "semh",
                                    "sensory_physical",
                                    "preparing_for_adulthood",
                                    "independence_self_care",
                                    "health_wellbeing"
                                  ],
                                  "description": "The area-of-need heading the item sits under, if the plan uses them."
                                }
                              },
                              "required": [
                                "text"
                              ],
                              "additionalProperties": false
                            },
                            "description": "Alternative to text: the items, each copied exactly."
                          }
                        },
                        "additionalProperties": false
                      },
                      "H1": {
                        "type": "object",
                        "description": "Section H1 (Social care provision under section 2 of the Chronically Sick and Disabled Persons Act 1970). Used to check social care provision is specific. Send the section's text exactly as written (text), or its items (items). Replace names with [CHILD] and [SCHOOL].",
                        "properties": {
                          "status": {
                            "type": "string",
                            "enum": [
                              "content",
                              "none_stated",
                              "blank"
                            ],
                            "description": "content if the section has content; none_stated if it says none apply; blank if it is empty or \"to be confirmed\". Worked out from the text if left out."
                          },
                          "text": {
                            "type": "string",
                            "maxLength": 25000,
                            "description": "The whole section copied exactly, with its numbering, bullets and table rows (tabs or | between columns). Plenda splits it into items. All the text in one check, across every section, can be up to 30,000 characters."
                          },
                          "items": {
                            "type": "array",
                            "maxItems": 150,
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "pattern": "^(?:[A-K]|H[12])?-?(?:[0-9]{1,3}(?:\\.[0-9]{1,2})?[a-z]?|[a-z]{1,4})(?:-[0-9]{1,2})?$",
                                  "description": "The plan's own number for the item, e.g. \"F3\" or \"3.1\"."
                                },
                                "text": {
                                  "type": "string",
                                  "maxLength": 3000,
                                  "description": "The item copied exactly. Do not correct or reword it."
                                },
                                "fields": {
                                  "type": "object",
                                  "description": "Table columns for this row, copied exactly.",
                                  "properties": {
                                    "frequency": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "duration": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "staffing": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "delivered_by": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "expertise": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "group_size": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "period": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "review": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "need_ref": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "outcome_ref": {
                                      "type": "string",
                                      "maxLength": 300
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "lead_in": {
                                  "type": "string",
                                  "maxLength": 300,
                                  "description": "The line the item sits under, e.g. \"All staff will, throughout the school day:\"."
                                },
                                "area": {
                                  "type": "string",
                                  "enum": [
                                    "communication_interaction",
                                    "cognition_learning",
                                    "semh",
                                    "sensory_physical",
                                    "preparing_for_adulthood",
                                    "independence_self_care",
                                    "health_wellbeing"
                                  ],
                                  "description": "The area-of-need heading the item sits under, if the plan uses them."
                                }
                              },
                              "required": [
                                "text"
                              ],
                              "additionalProperties": false
                            },
                            "description": "Alternative to text: the items, each copied exactly."
                          }
                        },
                        "additionalProperties": false
                      },
                      "H2": {
                        "type": "object",
                        "description": "Section H2 (Other social care provision). Used to check social care provision is specific. Send the section's text exactly as written (text), or its items (items). Replace names with [CHILD] and [SCHOOL].",
                        "properties": {
                          "status": {
                            "type": "string",
                            "enum": [
                              "content",
                              "none_stated",
                              "blank"
                            ],
                            "description": "content if the section has content; none_stated if it says none apply; blank if it is empty or \"to be confirmed\". Worked out from the text if left out."
                          },
                          "text": {
                            "type": "string",
                            "maxLength": 25000,
                            "description": "The whole section copied exactly, with its numbering, bullets and table rows (tabs or | between columns). Plenda splits it into items. All the text in one check, across every section, can be up to 30,000 characters."
                          },
                          "items": {
                            "type": "array",
                            "maxItems": 150,
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "pattern": "^(?:[A-K]|H[12])?-?(?:[0-9]{1,3}(?:\\.[0-9]{1,2})?[a-z]?|[a-z]{1,4})(?:-[0-9]{1,2})?$",
                                  "description": "The plan's own number for the item, e.g. \"F3\" or \"3.1\"."
                                },
                                "text": {
                                  "type": "string",
                                  "maxLength": 3000,
                                  "description": "The item copied exactly. Do not correct or reword it."
                                },
                                "fields": {
                                  "type": "object",
                                  "description": "Table columns for this row, copied exactly.",
                                  "properties": {
                                    "frequency": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "duration": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "staffing": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "delivered_by": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "expertise": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "group_size": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "period": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "review": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "need_ref": {
                                      "type": "string",
                                      "maxLength": 300
                                    },
                                    "outcome_ref": {
                                      "type": "string",
                                      "maxLength": 300
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "lead_in": {
                                  "type": "string",
                                  "maxLength": 300,
                                  "description": "The line the item sits under, e.g. \"All staff will, throughout the school day:\"."
                                },
                                "area": {
                                  "type": "string",
                                  "enum": [
                                    "communication_interaction",
                                    "cognition_learning",
                                    "semh",
                                    "sensory_physical",
                                    "preparing_for_adulthood",
                                    "independence_self_care",
                                    "health_wellbeing"
                                  ],
                                  "description": "The area-of-need heading the item sits under, if the plan uses them."
                                }
                              },
                              "required": [
                                "text"
                              ],
                              "additionalProperties": false
                            },
                            "description": "Alternative to text: the items, each copied exactly."
                          }
                        },
                        "additionalProperties": false
                      },
                      "I": {
                        "type": "object",
                        "description": "Section I (placement). Facts only: never send the school's name.",
                        "properties": {
                          "status": {
                            "type": "string",
                            "enum": [
                              "content",
                              "none_stated",
                              "blank"
                            ],
                            "description": "content if the section has a school, institution, type or other arrangement; none_stated if it says none apply; blank if it is empty or \"to be confirmed\". Worked out from the text if left out."
                          },
                          "placement": {
                            "type": "string",
                            "enum": [
                              "named_school",
                              "named_post16",
                              "type_only",
                              "eotas_s61",
                              "elective_home_education",
                              "none_stated",
                              "unknown"
                            ],
                            "description": "named_school: A named school. named_post16: A named college or other post-16 institution. type_only: A type of school or institution, not a name. eotas_s61: Education otherwise than at a school or college, arranged by the council (s 61). elective_home_education: Education at home arranged by the parent (elective home education). none_stated: No school, institution or other arrangement stated. unknown: Not known."
                          },
                          "setting_kind": {
                            "type": "string",
                            "enum": [
                              "mainstream",
                              "mainstream_with_resource_base",
                              "special",
                              "independent_special",
                              "post16_college",
                              "other",
                              "unknown"
                            ],
                            "description": "The kind of setting named or described."
                          }
                        },
                        "additionalProperties": false
                      },
                      "J": {
                        "type": "object",
                        "description": "Section J (personal budget). Facts only.",
                        "properties": {
                          "status": {
                            "type": "string",
                            "enum": [
                              "details_given",
                              "content",
                              "none_requested",
                              "not_applicable",
                              "requested_pending",
                              "blank"
                            ],
                            "description": "What Section J says: details_given (an amount, hours or what it pays for); content (mentions a personal budget but gives no details); none_requested; not_applicable; requested_pending (requested, decision awaited); blank."
                          },
                          "describes": {
                            "type": "array",
                            "maxItems": 3,
                            "items": {
                              "type": "string",
                              "enum": [
                                "personal_budget",
                                "direct_payment",
                                "arrangements"
                              ]
                            },
                            "description": "What the details cover: personal_budget, direct_payment, arrangements (notional or third-party arrangements)."
                          },
                          "dp_missing": {
                            "type": "array",
                            "maxItems": 2,
                            "items": {
                              "type": "string",
                              "enum": [
                                "the needs",
                                "the outcomes"
                              ]
                            },
                            "description": "Only when Section J describes a direct payment: which of these it does not mention (the special educational needs and the outcomes the direct payment is to meet)."
                          }
                        },
                        "additionalProperties": false
                      },
                      "K": {
                        "type": "object",
                        "description": "Section K (advice and information). The type and date of each piece of advice listed; never names.",
                        "properties": {
                          "status": {
                            "type": "string",
                            "enum": [
                              "content",
                              "none_stated",
                              "blank"
                            ],
                            "description": "content if the section has advice listed; none_stated if it says none apply; blank if it is empty or \"to be confirmed\". Worked out from the text if left out."
                          },
                          "advice": {
                            "type": "array",
                            "maxItems": 40,
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "parent_or_young_person",
                                    "educational",
                                    "medical",
                                    "psychological",
                                    "social_care",
                                    "preparing_for_adulthood",
                                    "qualified_teacher_sensory",
                                    "speech_and_language",
                                    "occupational_therapy",
                                    "physiotherapy",
                                    "camhs_or_clinical_psychology",
                                    "other_requested",
                                    "other"
                                  ],
                                  "description": "parent_or_young_person: Advice and information from the parent or young person. educational: Educational advice and information. medical: Medical advice and information. psychological: Psychological advice from an educational psychologist. social_care: Social care advice and information. preparing_for_adulthood: Advice on preparing for adulthood and independent living. qualified_teacher_sensory: Advice from a qualified teacher of children with hearing or vision impairment. speech_and_language: Speech and language therapy advice. occupational_therapy: Occupational therapy advice. physiotherapy: Physiotherapy advice. camhs_or_clinical_psychology: Mental health or clinical psychology advice. other_requested: Advice the parent or young person asked the council to seek. other: Other advice."
                                },
                                "date": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                  "description": "The date of the advice, if given."
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  },
                  "links": {
                    "type": "array",
                    "maxItems": 150,
                    "description": "Only if the plan does not number or group its items: for each need in Section B (by id), the outcomes and provision the plan connects to it. Base these only on what the plan says. Findings from these links are marked as based on your links.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "need": {
                          "type": "string",
                          "pattern": "^(?:[A-K]|H[12])?-?(?:[0-9]{1,3}(?:\\.[0-9]{1,2})?[a-z]?|[a-z]{1,4})(?:-[0-9]{1,2})?$"
                        },
                        "outcomes": {
                          "type": "array",
                          "maxItems": 40,
                          "items": {
                            "type": "string",
                            "pattern": "^(?:[A-K]|H[12])?-?(?:[0-9]{1,3}(?:\\.[0-9]{1,2})?[a-z]?|[a-z]{1,4})(?:-[0-9]{1,2})?$"
                          }
                        },
                        "provision": {
                          "type": "array",
                          "maxItems": 40,
                          "items": {
                            "type": "string",
                            "pattern": "^(?:[A-K]|H[12])?-?(?:[0-9]{1,3}(?:\\.[0-9]{1,2})?[a-z]?|[a-z]{1,4})(?:-[0-9]{1,2})?$"
                          }
                        }
                      },
                      "required": [
                        "need"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "recommendations": {
                    "type": "array",
                    "maxItems": 60,
                    "description": "Optional: recommendations from the professional advice (copied exactly, no names), each with the plan items it went into. Plenda compares how often, how long, by whom and whether it is direct work.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^R[0-9]{1,3}$",
                          "description": "R1, R2 …"
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "parent_or_young_person",
                            "educational",
                            "medical",
                            "psychological",
                            "social_care",
                            "preparing_for_adulthood",
                            "qualified_teacher_sensory",
                            "speech_and_language",
                            "occupational_therapy",
                            "physiotherapy",
                            "camhs_or_clinical_psychology",
                            "other_requested",
                            "other"
                          ],
                          "description": "Which advice it comes from."
                        },
                        "text": {
                          "type": "string",
                          "maxLength": 600
                        },
                        "plan_items": {
                          "type": "array",
                          "maxItems": 10,
                          "items": {
                            "type": "string",
                            "pattern": "^(?:[A-K]|H[12])?-?(?:[0-9]{1,3}(?:\\.[0-9]{1,2})?[a-z]?|[a-z]{1,4})(?:-[0-9]{1,2})?$"
                          },
                          "description": "Ids of the plan items that include it. Empty if none."
                        }
                      },
                      "required": [
                        "id",
                        "source",
                        "text",
                        "plan_items"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "audience": {
                    "type": "string",
                    "enum": [
                      "parent",
                      "young_person",
                      "school",
                      "professional",
                      "local_authority"
                    ],
                    "description": "Who is asking: parent, young_person (the child or young person the plan is for; give context.year_group (and context.usual_year_group for a pupil taught outside the usual year group for their age), as until the end of compulsory school age (the last Friday in June of the school year in which they turn 16, usually the end of Year 11) the rights to comment and appeal are the parent's), school, professional, or local_authority. Changes only how the next actions are worded. Defaults to parent."
                  },
                  "detail": {
                    "type": "string",
                    "enum": [
                      "summary",
                      "full"
                    ],
                    "description": "summary (default) returns the 15 most important points; full returns every point."
                  },
                  "only_sections": {
                    "type": "array",
                    "maxItems": 12,
                    "items": {
                      "type": "string",
                      "enum": [
                        "A",
                        "B",
                        "C",
                        "D",
                        "E",
                        "F",
                        "G",
                        "H1",
                        "H2",
                        "I",
                        "J",
                        "K"
                      ]
                    },
                    "description": "Return points for these sections only."
                  },
                  "england_confirmed": {
                    "type": "boolean",
                    "description": "Set true only if the user confirms the plan is from a council in England after Plenda asked."
                  }
                },
                "required": [
                  "plan_stage",
                  "sections"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "view": {
                          "type": "string",
                          "const": "plan_check"
                        },
                        "summary_for_user": {
                          "type": "string"
                        },
                        "next_actions": {
                          "type": "array",
                          "maxItems": 3,
                          "items": {
                            "type": "object",
                            "properties": {
                              "text": {
                                "type": "string"
                              },
                              "date": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "owner": {
                                "type": "string",
                                "enum": [
                                  "you",
                                  "council",
                                  "school",
                                  "health",
                                  "tribunal",
                                  "mediation",
                                  "other"
                                ]
                              }
                            },
                            "required": [
                              "text",
                              "date",
                              "owner"
                            ]
                          }
                        },
                        "keep_wording": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "rules_version": {
                          "type": "string"
                        },
                        "law_as_at": {
                          "type": "string"
                        },
                        "schema_version": {
                          "type": "string"
                        },
                        "engine_version": {
                          "type": "string"
                        },
                        "disclaimer": {
                          "type": "string"
                        },
                        "privacy": {
                          "type": "object",
                          "properties": {
                            "identifiers_found": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "note": {
                              "type": "string"
                            }
                          }
                        },
                        "plan_stage": {
                          "type": "string"
                        },
                        "headline": {
                          "type": "string"
                        },
                        "headline_note": {
                          "type": "string"
                        },
                        "counts": {
                          "type": "object",
                          "properties": {
                            "law": {
                              "type": "integer"
                            },
                            "code_must": {
                              "type": "integer"
                            },
                            "code_should": {
                              "type": "integer"
                            },
                            "check": {
                              "type": "integer"
                            },
                            "clarity": {
                              "type": "integer"
                            }
                          }
                        },
                        "levels": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "checks_run": {
                          "type": "integer"
                        },
                        "checks_with_findings": {
                          "type": "integer"
                        },
                        "findings": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "rule_id": {
                                "type": "string"
                              },
                              "req_id": {
                                "type": "string"
                              },
                              "level": {
                                "type": "string",
                                "enum": [
                                  "law",
                                  "code_must",
                                  "code_should",
                                  "check",
                                  "clarity"
                                ]
                              },
                              "section": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "item_ids": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "title": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "fix": {
                                "type": "string"
                              },
                              "cite": {
                                "type": "string"
                              },
                              "basis": {
                                "type": "string",
                                "enum": [
                                  "structural",
                                  "pattern",
                                  "assistant",
                                  "needs_judgement"
                                ]
                              },
                              "confidence": {
                                "type": "string",
                                "enum": [
                                  "high",
                                  "medium",
                                  "low"
                                ]
                              },
                              "appeal_route": {
                                "type": "string",
                                "enum": [
                                  "appeal",
                                  "recommendation",
                                  "raise"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "rule_id",
                              "level",
                              "section",
                              "item_ids",
                              "title",
                              "message",
                              "cite",
                              "basis",
                              "confidence",
                              "appeal_route"
                            ]
                          }
                        },
                        "truncated": {
                          "type": "boolean"
                        },
                        "raise_first": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "not_checked": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "sections": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        },
                        "golden_thread": {
                          "type": "object"
                        },
                        "advice_trace": {
                          "type": "object"
                        },
                        "events_found": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        },
                        "appeal_routes": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "presentation": {
                          "type": "string"
                        },
                        "injection_suspected": {
                          "type": "boolean"
                        },
                        "needs_info": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "redaction_required": {
                          "type": "object"
                        },
                        "other_nation": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "signposts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "what": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "url"
                            ]
                          }
                        }
                      },
                      "required": [
                        "view",
                        "summary_for_user",
                        "next_actions",
                        "keep_wording",
                        "rules_version",
                        "law_as_at",
                        "schema_version",
                        "engine_version",
                        "disclaimer"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "description": "Plain-language summary of the result for the assistant."
                    },
                    "detail": {
                      "type": "object",
                      "description": "Extra detail for displaying the result (for example full findings). Optional."
                    }
                  },
                  "required": [
                    "result",
                    "text"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The input was not usable. The error explains what to change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools/check_wording": {
      "post": {
        "operationId": "ehcp_check_wording",
        "summary": "Check wording for specificity",
        "description": "Use this when the user wants to know whether EHC plan wording is specific enough: provision (Section F, G or H), outcomes (Section E), or recommendations from a professional report such as an educational psychologist, speech and language therapist or occupational therapist. Checks what is provided, how often, for how long, by whom, with what expertise, and non-committal phrases such as \"access to\", \"opportunities to\", \"up to\" or \"as required\". Send up to 40 items at once, each copied exactly. Returns, per item, what was not found and any non-committal wording. If you redraft the wording, use only facts the user or their reports give, then check it again. Do not use for a whole plan or several sections: use ehcp_check_plan.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 40,
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,11}$",
                          "description": "Your label for the item, such as \"F3\" or \"R2\". Used to report results. Defaults to W1, W2 and so on."
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "provision",
                            "outcome",
                            "recommendation",
                            "health_provision",
                            "social_care_provision"
                          ],
                          "description": "What the text is. Recommendations from a report are checked as if they were going into Section F."
                        },
                        "text": {
                          "type": "string",
                          "minLength": 3,
                          "maxLength": 3000,
                          "description": "The wording copied exactly. Do not correct or reword it. Remove names first."
                        },
                        "lead_in": {
                          "type": "string",
                          "maxLength": 300,
                          "description": "Any heading or lead-in the item sits under, copied exactly (\"All staff will, throughout the day:\")."
                        }
                      },
                      "required": [
                        "text"
                      ],
                      "additionalProperties": false
                    },
                    "description": "Up to 40 items, 12,000 characters in total. One item per provision, outcome or recommendation."
                  },
                  "text": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 4000,
                    "description": "A single item, instead of items."
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "provision",
                      "outcome",
                      "recommendation",
                      "health_provision",
                      "social_care_provision"
                    ],
                    "description": "The kind of the single text, or the default kind for items."
                  },
                  "audience": {
                    "type": "string",
                    "enum": [
                      "parent",
                      "young_person",
                      "school",
                      "professional",
                      "local_authority"
                    ],
                    "description": "Who the results are for. Defaults to parent."
                  },
                  "england_confirmed": {
                    "type": "boolean",
                    "description": "Set true only if the user has confirmed the wording is from a plan in England."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "view": {
                          "type": "string",
                          "const": "wording"
                        },
                        "summary_for_user": {
                          "type": "string"
                        },
                        "next_actions": {
                          "type": "array",
                          "maxItems": 3,
                          "items": {
                            "type": "object",
                            "properties": {
                              "text": {
                                "type": "string"
                              },
                              "date": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "owner": {
                                "type": "string",
                                "enum": [
                                  "you",
                                  "council",
                                  "school",
                                  "health",
                                  "tribunal",
                                  "mediation",
                                  "other"
                                ]
                              }
                            },
                            "required": [
                              "text",
                              "date",
                              "owner"
                            ]
                          }
                        },
                        "keep_wording": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "rules_version": {
                          "type": "string"
                        },
                        "law_as_at": {
                          "type": "string"
                        },
                        "schema_version": {
                          "type": "string"
                        },
                        "engine_version": {
                          "type": "string"
                        },
                        "disclaimer": {
                          "type": "string"
                        },
                        "privacy": {
                          "type": "object",
                          "properties": {
                            "identifiers_found": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "note": {
                              "type": "string"
                            }
                          }
                        },
                        "headline_note": {
                          "type": "string"
                        },
                        "counts": {
                          "type": "object",
                          "properties": {
                            "specific": {
                              "type": "integer"
                            },
                            "partly_specific": {
                              "type": "integer"
                            },
                            "not_specific": {
                              "type": "integer"
                            },
                            "background": {
                              "type": "integer"
                            }
                          }
                        },
                        "results": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "provision",
                                  "outcome",
                                  "recommendation",
                                  "health_provision",
                                  "social_care_provision"
                                ]
                              },
                              "checked_as": {
                                "type": "string",
                                "enum": [
                                  "E",
                                  "F",
                                  "G",
                                  "H2"
                                ],
                                "description": "The plan section whose rules were applied."
                              },
                              "type": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The type of provision Plenda read it as (for provision kinds)."
                              },
                              "verdict": {
                                "type": "string",
                                "enum": [
                                  "specific",
                                  "partly_specific",
                                  "not_specific",
                                  "background"
                                ]
                              },
                              "missing": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Element codes not found; labels are in element_labels."
                              },
                              "generic": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "hedged": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "could_add": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "vague_terms": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "term": {
                                      "type": "string"
                                    },
                                    "firm": {
                                      "type": "boolean",
                                      "description": "true: the phrase leaves the provision open; false: it could only be clearer."
                                    },
                                    "offset": {
                                      "type": "integer"
                                    },
                                    "length": {
                                      "type": "integer"
                                    },
                                    "rule_id": {
                                      "type": "string",
                                      "description": "The plan check rule that found it, as in ehcp_check_plan."
                                    },
                                    "level": {
                                      "type": "string",
                                      "enum": [
                                        "law",
                                        "code_must",
                                        "code_should",
                                        "check",
                                        "clarity"
                                      ],
                                      "description": "The level ehcp_check_plan gives the same wording; labels are in levels."
                                    },
                                    "why": {
                                      "type": "string",
                                      "description": "Why the phrase matters."
                                    },
                                    "needs": {
                                      "type": "string",
                                      "description": "What a precise version needs."
                                    },
                                    "cite": {
                                      "type": "string",
                                      "description": "The source the level rests on."
                                    }
                                  },
                                  "required": [
                                    "term",
                                    "firm",
                                    "offset",
                                    "length",
                                    "rule_id",
                                    "level",
                                    "why",
                                    "needs",
                                    "cite"
                                  ]
                                }
                              },
                              "points": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "rule_id": {
                                      "type": "string"
                                    },
                                    "level": {
                                      "type": "string",
                                      "enum": [
                                        "law",
                                        "code_must",
                                        "code_should",
                                        "check",
                                        "clarity"
                                      ]
                                    },
                                    "title": {
                                      "type": "string"
                                    },
                                    "message": {
                                      "type": "string"
                                    },
                                    "fix": {
                                      "type": "string"
                                    },
                                    "cite": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "rule_id",
                                    "level",
                                    "title",
                                    "message",
                                    "fix",
                                    "cite"
                                  ]
                                }
                              },
                              "section_suggestion": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "section": {
                                    "type": "string",
                                    "enum": [
                                      "F",
                                      "G",
                                      "H"
                                    ]
                                  },
                                  "why": {
                                    "type": "string"
                                  }
                                }
                              }
                            },
                            "required": [
                              "id",
                              "kind",
                              "checked_as",
                              "type",
                              "verdict",
                              "missing",
                              "generic",
                              "hedged",
                              "could_add",
                              "vague_terms",
                              "points",
                              "section_suggestion"
                            ]
                          }
                        },
                        "element_labels": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "levels": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "redraft_rule": {
                          "type": "string"
                        },
                        "presentation": {
                          "type": "string"
                        },
                        "injection_suspected": {
                          "type": "boolean"
                        },
                        "redaction_required": {
                          "type": "object",
                          "properties": {
                            "identifiers": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "item_ids": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "other_nation": {
                          "type": "string"
                        },
                        "signposts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "what": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "url"
                            ]
                          }
                        }
                      },
                      "required": [
                        "view",
                        "summary_for_user",
                        "next_actions",
                        "keep_wording",
                        "rules_version",
                        "law_as_at",
                        "schema_version",
                        "engine_version",
                        "disclaimer"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "description": "Plain-language summary of the result for the assistant."
                    },
                    "detail": {
                      "type": "object",
                      "description": "Extra detail for displaying the result (for example full findings). Optional."
                    }
                  },
                  "required": [
                    "result",
                    "text"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The input was not usable. The error explains what to change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools/challenge_options": {
      "post": {
        "operationId": "ehcp_challenge_options",
        "summary": "Ways to challenge a decision",
        "description": "Use this when the user disagrees with a council decision about an EHC needs assessment or EHC plan (EHCP), or something has not happened, and asks \"what can we do, and by when?\": the council refused to assess, refused to issue a plan, will not change the plan after an annual review, is stopping (ceasing) the plan, refused to re-assess, or the user disagrees with section B, F or I or the school named; or the council is past the 20 weeks or another time limit, the help in the plan is not being given, a SEND Tribunal (SENDIST) order has not been carried out, the health or social care parts are wrong, or a personal budget was refused. Also redirects school transport, exclusions, school admissions without a plan, disability discrimination by a school, and a disagreement with a school or college about SEN support. Returns only the routes that apply (mediation, tribunal appeal, complaints, the Ombudsman, judicial review and others), each with what it can and cannot change, its time limit, whether a mediation certificate is needed (not for an appeal only about section I) and whether it stops the appeal clock (a complaint does not). Give notice_sent to get the last day to appeal: the later of 2 months after the letter was sent and 1 month after the mediation certificate (no certificate, so no later date, for an appeal only about section I), with the Tribunal's August and Christmas rules, bank holidays and the 5pm cut-off. If the mediation adviser or the council has been told whether mediation is wanted, or mediation has ended, and no certificate date is known, give mediation_step and its date, so the appeal date is not shown as passed while the certificate is still to come. Memory often gets these wrong, and this uses the law as at 30 September 2026. England only. Never recommends a route. Do not use for every date in a case (use ehcp_calculate_deadlines), checking what a decision letter must say (use ehcp_check_letter), where the user is in the process (use ehcp_next_steps), or what a term means (use ehcp_explain).",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "issue": {
                    "type": "string",
                    "enum": [
                      "refused_assessment",
                      "refused_plan",
                      "disagree_plan_content",
                      "disagree_school_named",
                      "refused_to_amend",
                      "ceasing",
                      "refused_reassessment",
                      "no_decision_yet",
                      "review_not_acted_on",
                      "provision_not_delivered",
                      "tribunal_order_not_followed",
                      "health_or_social_care_parts",
                      "personal_budget_refused",
                      "sen_support_disagreement",
                      "school_discrimination",
                      "school_transport",
                      "exclusion",
                      "admissions",
                      "how_the_council_handled_it"
                    ],
                    "description": "The situation, in the user's terms. Pick the closest one; call again for a second issue. refused_assessment: The council refused to carry out an EHC needs assessment. refused_plan: After an assessment, the council decided not to issue an EHC plan. disagree_plan_content: We disagree with the needs (section B), provision (section F) or school or placement (section I) in a final or amended plan, or no school is named. disagree_school_named: We disagree only with the school, college or type of placement in section I, or that none is named. refused_to_amend: After a review or re-assessment, the council decided not to change the plan. ceasing: The council decided to stop maintaining the EHC plan. refused_reassessment: The council refused a request to re-assess. no_decision_yet: The council has not made a decision yet, or is past a time limit. review_not_acted_on: An annual review has not happened, or the council has not acted on it. provision_not_delivered: The plan is in place but the help in it is not being given. tribunal_order_not_followed: The Tribunal made an order, or the council conceded the appeal, and it has not been carried out. health_or_social_care_parts: We disagree with the health or social care parts of the plan (sections C, D, G, H1 or H2). personal_budget_refused: The council refused a personal budget or direct payments. sen_support_disagreement: A disagreement with the school or college about SEN support. school_discrimination: We think a school has discriminated against a disabled child or young person. school_transport: Home to school or college transport. exclusion: A child or young person has been suspended or permanently excluded from school. admissions: A school place was refused for a child without an EHC plan. how_the_council_handled_it: How the council has communicated or handled the case."
                  },
                  "notice_sent": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "The date the council sent the decision letter or the final or amended plan (YYYY-MM-DD), not after today. Used to work out the last day to appeal. If the user only has the date printed on the letter, the day it arrived, or a rough date, give that and set notice_date_basis. Leave out if not known: never guess."
                  },
                  "notice_date_basis": {
                    "type": "string",
                    "enum": [
                      "sent",
                      "on_letter",
                      "received",
                      "approximate"
                    ],
                    "description": "What notice_sent is. sent (default): the day the letter or email was sent. on_letter: the date printed on the letter. received: the day it arrived (the time runs from when it was sent, so Plenda counts from 2 working days earlier, to allow for post). approximate: the user only knows roughly; give the earliest date it could have been."
                  },
                  "letter_date": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "The date printed on the letter (YYYY-MM-DD), when notice_sent is a different day (the day it was sent, the day it arrived, or a rough date). The 2 months to contact the mediation adviser are counted from the date of the notice (SEND Regulations 2014, reg 34(2)), so when the letter is dated earlier they are counted from this date. The last day to appeal is counted from the day it was sent: with notice_date_basis sent it runs from notice_sent; with received or approximate (the day it was sent not known), it is counted from this date when that is earlier, because a letter is not normally sent before the date on it. Not after today. On its own (no notice_sent), it is used as notice_sent with notice_date_basis on_letter."
                  },
                  "certificate_date": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "The date on the mediation certificate, if one has been issued (after mediation, or after saying no to mediation). Where a certificate is needed, the appeal time limit is the later of 2 months after the letter and 1 month after the certificate. For an appeal only about section I no certificate is needed, so to be safe one does not move the date given (whether it can is not settled). Must not be after today or before notice_sent."
                  },
                  "mediation_step": {
                    "type": "string",
                    "enum": [
                      "mediation_adviser_told_no_mediation",
                      "council_told_wants_mediation",
                      "mediation_ended"
                    ],
                    "description": "The latest mediation step after the decision letter, when no mediation certificate date is known yet. mediation_adviser_told_no_mediation: the mediation adviser was told mediation is not wanted (used only within the 2 months for contacting the adviser). council_told_wants_mediation: the council was told mediation is wanted. mediation_ended: mediation has ended. Give its date in mediation_step_date. The certificate comes after the step, so the last day to appeal is then not shown as passed while it may run from the certificate. Leave out once certificate_date is known."
                  },
                  "mediation_step_date": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "The date of mediation_step (YYYY-MM-DD). Give both or neither. Must not be after today or before notice_sent."
                  },
                  "sections_disputed": {
                    "type": "array",
                    "maxItems": 12,
                    "items": {
                      "type": "string",
                      "enum": [
                        "A",
                        "B",
                        "C",
                        "D",
                        "E",
                        "F",
                        "G",
                        "H1",
                        "H2",
                        "I",
                        "J",
                        "K"
                      ]
                    },
                    "description": "For a final or amended plan: the plan sections the user disagrees with (A to K, with H1 and H2). Used to say whether the appeal is only about section I (no mediation certificate needed) and which sections cannot be appealed on their own."
                  },
                  "audience": {
                    "type": "string",
                    "enum": [
                      "parent",
                      "young_person",
                      "school",
                      "professional",
                      "local_authority"
                    ],
                    "description": "Who is asking: parent, young_person (over compulsory school age and under 25: holds the rights after the last Friday in June of the school year in which they turn 16, usually the end of Year 11, even if not yet 16), school, professional (an adviser or therapist), or local_authority (council staff). Defaults to parent. Wording is addressed to \"you\" for parent and young_person, and neutral otherwise."
                  },
                  "year_group": {
                    "type": "integer",
                    "minimum": -1,
                    "maximum": 14,
                    "description": "School year group now (Reception is 0, nursery is -1; 12 and 13 for the two years after Year 11, by age (the school years in which they turn 17 and 18), 14 for a young person who turned 18 before the school year began, whatever course they are on). Used to say whether the parent or the young person holds the right to appeal (the young person after the last Friday in June of the school year in which they turn 16, which is Year 11 unless usual_year_group says otherwise)."
                  },
                  "usual_year_group": {
                    "type": "integer",
                    "minimum": -1,
                    "maximum": 14,
                    "description": "Only for a pupil taught in a different year group from the usual one for their age (for example a summer-born child who started Reception a year late, or a pupil held back or moved up a year): the year group usual for their age, with the same values as year_group. Used instead of year_group to work out who holds the rights, because that turns on age: the end of compulsory school age is the last Friday in June of the school year in which they turn 16."
                  },
                  "rights_holder": {
                    "type": "string",
                    "enum": [
                      "parent",
                      "young_person",
                      "representative"
                    ],
                    "description": "Who holds the rights, if the user has said: parent (a child of compulsory school age or younger), young_person (over compulsory school age: after the last Friday in June of the school year in which they turn 16, usually the end of Year 11; not the 16th birthday), representative (acting for a young person who lacks the mental capacity to make the decision: their deputy or attorney or, if none, a parent). Leave out if year_group is given; if both are given they must agree, so for a pupil taught outside the usual year group for their age give usual_year_group too. With audience parent and rights_holder representative, the parent is taken to be the one acting."
                  }
                },
                "required": [
                  "issue"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "view": {
                          "type": "string",
                          "const": "challenge"
                        },
                        "summary_for_user": {
                          "type": "string"
                        },
                        "next_actions": {
                          "type": "array",
                          "maxItems": 3,
                          "items": {
                            "type": "object",
                            "properties": {
                              "text": {
                                "type": "string"
                              },
                              "date": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "owner": {
                                "type": "string",
                                "enum": [
                                  "you",
                                  "council",
                                  "school",
                                  "health",
                                  "tribunal",
                                  "mediation",
                                  "other"
                                ]
                              }
                            },
                            "required": [
                              "text",
                              "date",
                              "owner"
                            ]
                          }
                        },
                        "keep_wording": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "rules_version": {
                          "type": "string"
                        },
                        "law_as_at": {
                          "type": "string"
                        },
                        "schema_version": {
                          "type": "string"
                        },
                        "engine_version": {
                          "type": "string"
                        },
                        "disclaimer": {
                          "type": "string"
                        },
                        "privacy": {
                          "type": "object",
                          "properties": {
                            "identifiers_found": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "note": {
                              "type": "string"
                            }
                          }
                        },
                        "audience": {
                          "type": "string",
                          "enum": [
                            "parent",
                            "young_person",
                            "school",
                            "professional",
                            "local_authority"
                          ]
                        },
                        "rights_holder": {
                          "type": "string",
                          "enum": [
                            "parent",
                            "young_person",
                            "representative"
                          ]
                        },
                        "rights_holder_reason": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "issue": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "enum": [
                                "refused_assessment",
                                "refused_plan",
                                "disagree_plan_content",
                                "disagree_school_named",
                                "refused_to_amend",
                                "ceasing",
                                "refused_reassessment",
                                "no_decision_yet",
                                "review_not_acted_on",
                                "provision_not_delivered",
                                "tribunal_order_not_followed",
                                "health_or_social_care_parts",
                                "personal_budget_refused",
                                "sen_support_disagreement",
                                "school_discrimination",
                                "school_transport",
                                "exclusion",
                                "admissions",
                                "how_the_council_handled_it"
                              ]
                            },
                            "label": {
                              "type": "string"
                            },
                            "appeal_right": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "send_appeal",
                                    "discrimination_claim"
                                  ]
                                },
                                "pin": {
                                  "type": "string"
                                },
                                "cite": {
                                  "type": "string"
                                }
                              }
                            },
                            "needs_certificate": {
                              "type": [
                                "boolean",
                                "string",
                                "null"
                              ],
                              "enum": [
                                true,
                                false,
                                "depends",
                                null
                              ]
                            },
                            "certificate_reason": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "sections_disputed": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "id",
                            "label",
                            "appeal_right",
                            "needs_certificate"
                          ]
                        },
                        "issue_sources": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "cite": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "statute",
                                  "code_must",
                                  "code_should",
                                  "case_law",
                                  "good_practice",
                                  "guidance"
                                ]
                              },
                              "status_label": {
                                "type": "string"
                              },
                              "verify": {
                                "type": "string",
                                "description": "What is still to be confirmed about this source. Given on case law (status case_law), which keeps a note until a SEND solicitor has confirmed it; an open point on another source is stated in the result where a statement relies on it."
                              }
                            },
                            "required": [
                              "cite",
                              "url",
                              "status"
                            ]
                          },
                          "description": "Where the right of appeal (or its absence) and the certificate rule come from."
                        },
                        "dates": {
                          "type": "object",
                          "properties": {
                            "appeal": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "due_date": {
                                  "type": "string"
                                },
                                "due_time": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "open",
                                    "closing_soon",
                                    "closes_today",
                                    "closed",
                                    "depends_on_certificate"
                                  ],
                                  "description": "depends_on_certificate: the date worked out has passed, but a mediation step is used with no certificate date, so the last day is 1 month after the date on the certificate, where that is later. due_date is then a date that has passed, not the last day."
                                },
                                "days_left": {
                                  "type": "integer",
                                  "description": "Days from today to the last day, as days_remaining in ehcp_calculate_deadlines: 0 on the last day, negative once that date has passed. Add 1 for \"days left, counting today\"."
                                },
                                "basis": {
                                  "type": "string",
                                  "description": "notice, certificate, or pending_certificate (a mediation step is used and no certificate date was given)."
                                },
                                "basis_text": {
                                  "type": "string"
                                },
                                "adjustment": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "enum": [
                                    null,
                                    "christmas",
                                    "august",
                                    "non_working_day"
                                  ]
                                },
                                "adjustment_text": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "counted_from": {
                                  "type": "string",
                                  "description": "The date counted from (YYYY-MM-DD), after any allowance for the date basis."
                                },
                                "counting": {
                                  "type": "string"
                                },
                                "cautions": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "sources": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "cite": {
                                        "type": "string"
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "status": {
                                        "type": "string"
                                      },
                                      "status_label": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "cite",
                                      "url",
                                      "status"
                                    ]
                                  }
                                },
                                "depends_on_certificate": {
                                  "type": "boolean",
                                  "description": "True when a mediation step is used with no certificate date. due_date is then the earliest the last day can be."
                                },
                                "certificate_open": {
                                  "type": "boolean",
                                  "description": "True when no certificate date or mediation step is given and the appeal may need a certificate: an appeal by due_date is in time, and the last day is 1 month after the certificate is issued, if that is later."
                                }
                              },
                              "required": [
                                "due_date",
                                "status",
                                "days_left",
                                "counted_from",
                                "counting",
                                "cautions",
                                "sources"
                              ]
                            },
                            "mediation_contact": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "due_date": {
                                  "type": "string"
                                },
                                "due_time": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "open",
                                    "closing_soon",
                                    "closes_today",
                                    "closed"
                                  ]
                                },
                                "days_left": {
                                  "type": "integer",
                                  "description": "Days from today to the last day, as days_remaining in ehcp_calculate_deadlines: 0 on the last day, negative once that date has passed. Add 1 for \"days left, counting today\"."
                                },
                                "basis": {
                                  "type": "string"
                                },
                                "basis_text": {
                                  "type": "string"
                                },
                                "adjustment": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "enum": [
                                    null,
                                    "christmas",
                                    "august",
                                    "non_working_day"
                                  ]
                                },
                                "adjustment_text": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "counted_from": {
                                  "type": "string",
                                  "description": "The date counted from (YYYY-MM-DD), after any allowance for the date basis."
                                },
                                "counting": {
                                  "type": "string"
                                },
                                "cautions": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "sources": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "cite": {
                                        "type": "string"
                                      },
                                      "url": {
                                        "type": "string"
                                      },
                                      "status": {
                                        "type": "string"
                                      },
                                      "status_label": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "cite",
                                      "url",
                                      "status"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "due_date",
                                "status",
                                "days_left",
                                "counted_from",
                                "counting",
                                "cautions",
                                "sources"
                              ]
                            },
                            "applies_to": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "appeal",
                            "mediation_contact"
                          ]
                        },
                        "routes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "enum": [
                                  "mediation_advice",
                                  "mediation",
                                  "health_mediation",
                                  "tribunal_appeal",
                                  "extended_appeal",
                                  "disability_discrimination_claim",
                                  "disagreement_resolution",
                                  "talk_to_council",
                                  "complaint_council",
                                  "complaint_school",
                                  "complaint_nhs",
                                  "complaint_social_care",
                                  "lgsco",
                                  "phso",
                                  "secretary_of_state",
                                  "judicial_review",
                                  "new_request",
                                  "transport_review",
                                  "exclusion_review",
                                  "admission_appeal"
                                ]
                              },
                              "title": {
                                "type": "string"
                              },
                              "what_it_is": {
                                "type": "string"
                              },
                              "can_change": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "The main thing the route can change for this issue: for tribunal_appeal, the power or powers that fit the issue (SEND Regulations 2014 reg 43(2)). The full list is in the widget detail."
                              },
                              "cannot_change": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "The main thing the route cannot change. The full list is in the widget detail."
                              },
                              "who_can_use": {
                                "type": "string"
                              },
                              "time_limit": {
                                "type": "object",
                                "properties": {
                                  "text": {
                                    "type": "string"
                                  },
                                  "due_date": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "due_time": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "text",
                                  "due_date"
                                ]
                              },
                              "needs_certificate": {
                                "type": [
                                  "boolean",
                                  "string"
                                ],
                                "enum": [
                                  true,
                                  false,
                                  "depends"
                                ]
                              },
                              "alongside": {
                                "type": "string"
                              },
                              "cost": {
                                "type": "string"
                              },
                              "affects_appeal_clock": {
                                "type": "boolean",
                                "description": "true only where a mediation certificate can move the appeal date. A complaint, meeting or new request does not, and nor does mediation in an appeal only about section I."
                              },
                              "is_tribunal": {
                                "type": "boolean",
                                "description": "true for routes that go to the SEND Tribunal itself."
                              },
                              "note": {
                                "type": "string",
                                "description": "Where a step is already done on the dates given, or a date the route depends on has passed (for the mediation adviser's 2 months: what that means, and the reg 34(3) route)."
                              },
                              "signposts": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Ids of entries in the top-level signposts list."
                              },
                              "sources": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "cite": {
                                      "type": "string"
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "statute",
                                        "code_must",
                                        "code_should",
                                        "case_law",
                                        "good_practice",
                                        "guidance"
                                      ]
                                    },
                                    "status_label": {
                                      "type": "string"
                                    },
                                    "verify": {
                                      "type": "string",
                                      "description": "What is still to be confirmed about this source. Given on case law (status case_law), which keeps a note until a SEND solicitor has confirmed it; an open point on another source is stated in the result where a statement relies on it."
                                    }
                                  },
                                  "required": [
                                    "cite",
                                    "url",
                                    "status"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "what_it_is",
                              "can_change",
                              "cannot_change",
                              "who_can_use",
                              "time_limit",
                              "needs_certificate",
                              "alongside",
                              "cost",
                              "affects_appeal_clock",
                              "signposts",
                              "sources"
                            ]
                          }
                        },
                        "not_appealable": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "text": {
                                "type": "string"
                              },
                              "where_instead": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "id",
                              "text"
                            ]
                          }
                        },
                        "fixed_lines": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "notes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "needs_info": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "signposts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "what": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "url"
                            ]
                          }
                        },
                        "status_labels": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Plain meaning of each source status (the status field of every source)."
                        },
                        "presentation": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "view",
                        "summary_for_user",
                        "next_actions",
                        "keep_wording",
                        "rules_version",
                        "law_as_at",
                        "schema_version",
                        "engine_version",
                        "disclaimer",
                        "audience",
                        "rights_holder",
                        "issue",
                        "issue_sources",
                        "dates",
                        "routes",
                        "not_appealable",
                        "fixed_lines",
                        "notes",
                        "needs_info",
                        "signposts",
                        "presentation"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "description": "Plain-language summary of the result for the assistant."
                    },
                    "detail": {
                      "type": "object",
                      "description": "Extra detail for displaying the result (for example full findings). Optional."
                    }
                  },
                  "required": [
                    "result",
                    "text"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The input was not usable. The error explains what to change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools/check_letter": {
      "post": {
        "operationId": "ehcp_check_letter",
        "summary": "Check a council letter",
        "description": "Use this when someone in England has a letter or notice from the council about an EHC needs assessment or EHC plan (EHCP) and wants to know if it says everything it should: a refusal to assess, a decision to assess, a decision not to issue a plan, the letter with a draft or final plan, a decision after a review (annual or early), proposed amendments, a final amended plan or a decision not to amend, a refusal to re-assess, a decision to cease (stop) a plan, a new council's letter after a move, a refusal of the school or college asked for, or a reply from the council or the health body to a Tribunal health or social care recommendation. It lists what the Children and Families Act 2014 and the SEND Regulations 2014 (for a reply to a recommendation, the SEND (First-tier Tribunal Recommendations Power) Regulations 2017) say that kind of letter must include (the reasons, the right to appeal to the SEND Tribunal (SENDIST) and the time limit, mediation and the mediation certificate, disagreement resolution, information and advice such as SENDIASS, the Tribunal's recommendations power), plus good practice, each marked found, referred to an enclosure, or not found in the text supplied, with its source. Councils often put appeal and mediation details in a leaflet, so list enclosures. For a refusal to assess, to issue a plan or to re-assess it says whether each reason it recognises in the letter is part of the legal test (s 36(8), s 37(1), or SEND Regulations 2014 reg 24 for a re-assessment); for example, needing a diagnosis or \"two cycles of SEN support\" is not part of it. It never says whether the test is met. It works out the dates the letter starts (bank holidays in England, the Tribunal's 5pm deadline and its August and Christmas rules, the law as at 30 September 2026), counting from the day the letter was sent, not the date printed on it (except the 2 months to contact a mediation adviser, which reg 34(2) counts from the date of the notice, so from an earlier printed date): memory often gets these wrong. Give the date printed on the letter, the day it was sent and the day it arrived separately. If the date printed on the letter is not given, a date on a line of its own at the top of the letter or under the signature is used as it (beside the day it was sent or arrived, only when it is earlier than them); a review meeting date or the date of a Tribunal recommendation that the text states is used in the same way, and the result names each date read from the text. For a decision after a review (annual or early), also give the decision (outcome) if the user knows it, and the review meeting date. A reply to a recommendation is due within 5 weeks of the recommendation, not of the letter, so its dates need the date of the recommendation. Send the body of the letter copied exactly. Leave out the address block, names and reference numbers; offer to use [CHILD], [PARENT] and [SCHOOL] and say what you removed. Never send NHS numbers or pupil numbers. Do not use for the plan itself (use ehcp_check_plan), for one piece of plan wording (use ehcp_check_wording), for dates without a letter (use ehcp_calculate_deadlines), for the ways to challenge a decision (use ehcp_challenge_options), for a letter saying the council will not oppose an appeal or a letter after a Tribunal order (their dates come from ehcp_calculate_deadlines, events appeal_not_opposed and tribunal_order_made), for the council's consultation with a school or college about naming it, or for Wales, Scotland or Northern Ireland.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "notice_type": {
                    "type": "string",
                    "enum": [
                      "decision_not_to_assess",
                      "decision_to_assess",
                      "decision_not_to_issue",
                      "draft_plan_notice",
                      "final_plan_notice",
                      "review_decision",
                      "amendment_proposal",
                      "final_amended_plan_or_no_amendment",
                      "reassessment_refusal",
                      "cease_decision",
                      "transfer_to_new_council",
                      "refusal_of_requested_school",
                      "tribunal_recommendation_response",
                      "unknown"
                    ],
                    "description": "The kind of letter. decision_not_to_assess: Decision not to carry out an EHC needs assessment. decision_to_assess: Decision to carry out an EHC needs assessment. decision_not_to_issue: Decision not to issue an EHC plan after an assessment. draft_plan_notice: Draft EHC plan and the notice sent with it. final_plan_notice: Final EHC plan and the notice sent with it. review_decision: Council's decision after a review. amendment_proposal: Proposed amendments to an EHC plan. final_amended_plan_or_no_amendment: Final amended plan, or decision not to amend. reassessment_refusal: Decision not to re-assess. cease_decision: Decision to stop maintaining (cease) an EHC plan. transfer_to_new_council: New council's letter after a plan transfers on a move. refusal_of_requested_school: Refusal to name the school or college requested. tribunal_recommendation_response: Reply to a Tribunal recommendation about health or social care. unknown: not sure; Plenda works it out from the text and says which type it assumed."
                  },
                  "letter_text": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 12000,
                    "description": "The body of the council's letter, copied exactly (do not correct, reword or summarise it), at most 12,000 characters. Leave out the address block, names and reference numbers: use [CHILD], [PARENT] and [SCHOOL] for names, and tell the user what you removed. Keep any \"cc\" lines and the council's contact lines. Do not paste the plan or the enclosures here; list the enclosures in enclosures."
                  },
                  "enclosures": {
                    "type": "array",
                    "maxItems": 15,
                    "items": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 80
                    },
                    "description": "What came with the letter, up to 15: each either a topic id or the enclosure's title (at most 80 characters, no names). Topic ids: appeals (Appeals to the SEND Tribunal), mediation (Mediation and the mediation certificate), disagreement_resolution (Disagreement resolution), information_and_advice (Information, advice and support (SENDIASS)), schools_information (Information about schools and colleges), plan (The EHC plan), draft_plan (The draft EHC plan), amendments (The proposed amendments), evidence (Reports, advice and other evidence), response_form (A response form for comments or views), personal_budget (Personal budgets and direct payments), reasons (The reasons for the decision). An item the letter leaves to an enclosure is marked referred_to_enclosure; the enclosure itself is not checked."
                  },
                  "letter_date": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "The date printed on the letter (YYYY-MM-DD). Used for time limits when the day the letter was sent is not known. If it is earlier than the day the letter was sent, the 2 months to contact the mediation adviser are counted from it, because reg 34(2) counts them from the date of the notice, which may be that earlier date."
                  },
                  "date_sent": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "The day the letter was sent, posted or emailed (YYYY-MM-DD), if known, for example from an email. The time to appeal runs from the day written notice of the decision was sent. Some other time limits also count from the day a letter was sent, such as the 8 weeks for the final amended plan."
                  },
                  "date_received": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "The day the letter arrived (YYYY-MM-DD), if known. Used for time limits that count from the day a letter was sent, such as the time to appeal, only when neither the day it was sent nor the date printed on it is given: the dates for the parent or young person are then counted from 2 working days before it arrived, to allow for post. It can matter for the 15-day periods for comments on a draft plan or proposed amendments, which begin with the day the document was served. The Regulations do not say when a posted or emailed document counts as served."
                  },
                  "date_basis": {
                    "type": "string",
                    "enum": [
                      "sent",
                      "emailed",
                      "posted",
                      "approximate"
                    ],
                    "description": "Only with date_sent: how it was sent. sent (default): sent that day, method not known. emailed: sent by email that day. posted: posted that day (a posted letter is treated as arriving in the ordinary course of post, which matters for the 15-day comment periods). approximate: the user only knows roughly when it was sent; give the earliest day it could have been."
                  },
                  "outcome": {
                    "type": "string",
                    "enum": [
                      "keep",
                      "amend",
                      "cease",
                      "amended",
                      "not_amended"
                    ],
                    "description": "Only for a letter that can carry different decisions, when the user says which one it gives (otherwise Plenda looks for it in the text). For review_decision: keep (the plan stays as it is), amend (the council proposes changes), cease (the council will stop maintaining the plan). For final_amended_plan_or_no_amendment: amended (the final amended plan is sent), not_amended (the council decided not to make the changes). It decides which items apply, whether a time limit for appealing runs, and the issue for ehcp_challenge_options."
                  },
                  "review_meeting_date": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "For review_decision, amendment_proposal or cease_decision after a review (annual or early): the day the review meeting took place (YYYY-MM-DD), if known. Plenda plans the next review from it (whether the 12 months run from the meeting or from the council's decision is not settled), and the decision is due within 4 weeks of it."
                  },
                  "audience": {
                    "type": "string",
                    "enum": [
                      "parent",
                      "young_person",
                      "school",
                      "professional",
                      "local_authority"
                    ],
                    "description": "Who is asking: parent (a parent or carer; the default), young_person (the young person, over compulsory school age), school (a school or college, such as a SENCO), professional (an adviser, advocate or other professional), local_authority (council staff, for example checking their own letters). Changes the wording, not the check."
                  },
                  "year_group": {
                    "type": "integer",
                    "minimum": -1,
                    "maximum": 14,
                    "description": "School year group now: -1 nursery, 0 Reception, 1 to 11 for Years 1 to 11, 12 and 13 for the two years after Year 11, by age (the school years in which they turn 17 and 18), 14 for a young person who turned 18 before the school year began, whatever course they are on. Used to say whether the parent or the young person holds the right to appeal and, for Year 12 or below, to leave out items that apply only to a young person aged over 18 (for a pupil taught outside the usual year group for their age, give usual_year_group too)."
                  },
                  "usual_year_group": {
                    "type": "integer",
                    "minimum": -1,
                    "maximum": 14,
                    "description": "Only for a pupil taught in a different year group from the usual one for their age (for example a summer-born child who started Reception a year late, or a pupil held back or moved up a year): the year group usual for their age, with the same values as year_group. Used instead of year_group to work out who holds the rights, because that turns on age: the end of compulsory school age is the last Friday in June of the school year in which they turn 16. Also used instead of year_group to say whether an item only for a young person aged over 18 applies."
                  },
                  "rights_holder": {
                    "type": "string",
                    "enum": [
                      "parent",
                      "young_person",
                      "representative"
                    ],
                    "description": "Who holds the rights, if the user has said: parent (a child of compulsory school age or younger), young_person (over compulsory school age: after the last Friday in June of the school year in which they turn 16, usually the end of Year 11; not the 16th birthday), representative (acting for a young person who lacks the mental capacity to make the decision: their deputy or attorney or, if none, a parent). Leave out if year_group is given; if both are given they must agree, so for a pupil taught outside the usual year group for their age give usual_year_group too. Used only to say whose dates and right to appeal these are."
                  },
                  "england_confirmed": {
                    "type": "boolean",
                    "description": "Set true only if the user confirms the letter is from a council in England after Plenda asked."
                  },
                  "detail": {
                    "type": "string",
                    "enum": [
                      "summary",
                      "full"
                    ],
                    "description": "summary (default): each item with its status, label, basis and short source. full: also each item's sources, pin and status line, and the sources for each reason."
                  }
                },
                "required": [
                  "notice_type",
                  "letter_text"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "view": {
                          "type": "string",
                          "const": "letter"
                        },
                        "summary_for_user": {
                          "type": "string"
                        },
                        "next_actions": {
                          "type": "array",
                          "maxItems": 3,
                          "items": {
                            "type": "object",
                            "properties": {
                              "text": {
                                "type": "string"
                              },
                              "date": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "owner": {
                                "type": "string",
                                "enum": [
                                  "you",
                                  "council",
                                  "school",
                                  "health",
                                  "tribunal",
                                  "mediation",
                                  "other"
                                ]
                              }
                            },
                            "required": [
                              "text",
                              "date",
                              "owner"
                            ]
                          }
                        },
                        "keep_wording": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "rules_version": {
                          "type": "string"
                        },
                        "law_as_at": {
                          "type": "string"
                        },
                        "schema_version": {
                          "type": "string"
                        },
                        "engine_version": {
                          "type": "string"
                        },
                        "disclaimer": {
                          "type": "string"
                        },
                        "privacy": {
                          "type": "object",
                          "properties": {
                            "identifiers_found": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "note": {
                              "type": "string"
                            }
                          }
                        },
                        "audience": {
                          "type": "string",
                          "enum": [
                            "parent",
                            "young_person",
                            "school",
                            "professional",
                            "local_authority"
                          ]
                        },
                        "notice_type": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "title": {
                              "type": "string"
                            },
                            "rule_id": {
                              "type": "string"
                            },
                            "inferred": {
                              "type": "boolean",
                              "description": "True when notice_type was unknown and Plenda worked it out from the text."
                            },
                            "alternatives": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "title"
                                ]
                              }
                            },
                            "other_likely": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "required": [
                            "id",
                            "title",
                            "rule_id",
                            "inferred"
                          ]
                        },
                        "about": {
                          "type": "string"
                        },
                        "outcome": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            },
                            "from": {
                              "type": "string",
                              "enum": [
                                "input",
                                "text"
                              ],
                              "description": "input: the outcome given; text: recognised in the letter."
                            },
                            "text_suggests": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "When the outcome was given but the wording reads like a different decision: that decision."
                            }
                          },
                          "required": [
                            "id",
                            "label",
                            "from"
                          ]
                        },
                        "outcome_needed": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "When the letter can carry different decisions and none was recognised or given: the decisions, and how many more items the law requires for some of them.",
                          "properties": {
                            "outcomes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "choices": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "more_required": {
                              "type": "integer"
                            },
                            "appeal_may_run": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "outcomes",
                            "choices",
                            "more_required",
                            "appeal_may_run"
                          ]
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "rule_id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "short": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "found",
                                  "referred_to_enclosure",
                                  "enclosure_on_topic",
                                  "not_found_in_text"
                                ],
                                "description": "found: matched in the letter. referred_to_enclosure: not in the letter, but the letter, or an enclosure listed, points to an enclosure that names it. enclosure_on_topic: not in the letter, but the letter, or an enclosure listed, points to an enclosure on the same topic (for example appeals), which may or may not cover it. not_found_in_text: none of these."
                              },
                              "found": {
                                "type": "boolean",
                                "description": "True only when status is found."
                              },
                              "match": {
                                "type": "null",
                                "description": "Always null: Plenda does not repeat the letter."
                              },
                              "where": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "enum": [
                                  "letter",
                                  "enclosures",
                                  null
                                ]
                              },
                              "enclosure_topic": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "via": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "enum": [
                                  "enclosures_listed",
                                  "letter_mentions_enclosure",
                                  null
                                ]
                              },
                              "basis": {
                                "type": "string",
                                "enum": [
                                  "statute",
                                  "code_must",
                                  "code_should",
                                  "case_law",
                                  "good_practice"
                                ]
                              },
                              "basis_label": {
                                "type": "string"
                              },
                              "required": {
                                "type": "boolean"
                              },
                              "applies": {
                                "type": "string",
                                "enum": [
                                  "yes",
                                  "depends_on_outcome",
                                  "conditional"
                                ]
                              },
                              "when": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "line": {
                                "type": "string"
                              },
                              "pin": {
                                "type": "string"
                              },
                              "cite": {
                                "type": "string"
                              },
                              "sources": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "cite": {
                                      "type": "string"
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "statute",
                                        "code_must",
                                        "code_should",
                                        "case_law",
                                        "good_practice",
                                        "guidance"
                                      ]
                                    },
                                    "verify": {
                                      "type": "string",
                                      "description": "What is still to be confirmed about this source. Given on case law (status case_law), which keeps a note until a SEND solicitor has confirmed it; an open point on another source is stated in the result where a statement relies on it."
                                    }
                                  },
                                  "required": [
                                    "cite",
                                    "url",
                                    "status"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "rule_id",
                              "label",
                              "status",
                              "found",
                              "where",
                              "required",
                              "basis",
                              "basis_label",
                              "cite"
                            ]
                          }
                        },
                        "counts": {
                          "type": "object",
                          "properties": {
                            "checked": {
                              "type": "integer"
                            },
                            "found": {
                              "type": "integer"
                            },
                            "referred_to_enclosure": {
                              "type": "integer"
                            },
                            "enclosure_on_topic": {
                              "type": "integer"
                            },
                            "not_found": {
                              "type": "integer"
                            },
                            "required": {
                              "type": "integer"
                            },
                            "required_found": {
                              "type": "integer"
                            },
                            "required_referred_to_enclosure": {
                              "type": "integer"
                            },
                            "required_enclosure_on_topic": {
                              "type": "integer"
                            },
                            "required_not_found": {
                              "type": "integer"
                            },
                            "not_applicable": {
                              "type": "integer"
                            },
                            "depends_on_outcome": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "checked",
                            "found",
                            "referred_to_enclosure",
                            "enclosure_on_topic",
                            "not_found",
                            "required",
                            "required_found",
                            "required_referred_to_enclosure",
                            "required_enclosure_on_topic",
                            "required_not_found",
                            "not_applicable",
                            "depends_on_outcome"
                          ]
                        },
                        "reasons": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "test": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "summary": {
                                  "type": "string"
                                }
                              }
                            },
                            "part_of_test": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "explanation": {
                                    "type": "string"
                                  },
                                  "cite": {
                                    "type": "string"
                                  },
                                  "sentences": {
                                    "type": "integer",
                                    "description": "How many sentences of the letter this reason was found in."
                                  },
                                  "sources": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "cite": {
                                          "type": "string"
                                        },
                                        "url": {
                                          "type": "string"
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "statute",
                                            "code_must",
                                            "code_should",
                                            "case_law",
                                            "good_practice",
                                            "guidance"
                                          ]
                                        },
                                        "verify": {
                                          "type": "string",
                                          "description": "What is still to be confirmed about this source. Given on case law (status case_law), which keeps a note until a SEND solicitor has confirmed it; an open point on another source is stated in the result where a statement relies on it."
                                        }
                                      },
                                      "required": [
                                        "cite",
                                        "url",
                                        "status"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "explanation",
                                  "cite",
                                  "sentences"
                                ]
                              }
                            },
                            "not_part_of_test": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "explanation": {
                                    "type": "string"
                                  },
                                  "cite": {
                                    "type": "string"
                                  },
                                  "sentences": {
                                    "type": "integer",
                                    "description": "How many sentences of the letter this reason was found in."
                                  },
                                  "sources": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "cite": {
                                          "type": "string"
                                        },
                                        "url": {
                                          "type": "string"
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "statute",
                                            "code_must",
                                            "code_should",
                                            "case_law",
                                            "good_practice",
                                            "guidance"
                                          ]
                                        },
                                        "verify": {
                                          "type": "string",
                                          "description": "What is still to be confirmed about this source. Given on case law (status case_law), which keeps a note until a SEND solicitor has confirmed it; an open point on another source is stated in the result where a statement relies on it."
                                        }
                                      },
                                      "required": [
                                        "cite",
                                        "url",
                                        "status"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "explanation",
                                  "cite",
                                  "sentences"
                                ]
                              }
                            },
                            "lines": {
                              "type": "object",
                              "properties": {
                                "part_of_test": {
                                  "type": "string"
                                },
                                "not_part_of_test": {
                                  "type": "string"
                                }
                              }
                            },
                            "unmatched_line": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "note": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "test",
                            "part_of_test",
                            "not_part_of_test",
                            "lines",
                            "unmatched_line",
                            "note"
                          ]
                        },
                        "grounds": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "found": {
                                "type": "boolean"
                              },
                              "explanation": {
                                "type": "string"
                              },
                              "cite": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "found",
                              "explanation",
                              "cite"
                            ]
                          }
                        },
                        "starts": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "event": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "type": {
                                  "type": "string"
                                },
                                "date": {
                                  "type": "string"
                                },
                                "date_latest": {
                                  "type": "string"
                                },
                                "date_basis": {
                                  "type": "string"
                                },
                                "outcome": {
                                  "type": "string"
                                },
                                "date_on_letter": {
                                  "type": "string"
                                },
                                "date_received": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type",
                                "date",
                                "date_basis"
                              ]
                            },
                            "counted_from": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "enum": [
                                "date_sent",
                                "letter_date",
                                "date_received",
                                null
                              ]
                            },
                            "review_meeting": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The review meeting date used: the one given or, when none is given, the one read from the text (its dates_given label then ends \", read from the text supplied\")."
                            },
                            "dates_given": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "field": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "date": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "field",
                                  "label",
                                  "date"
                                ]
                              }
                            },
                            "date_lines": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "deadlines": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "rule_id": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "short": {
                                    "type": "string"
                                  },
                                  "group": {
                                    "type": "string"
                                  },
                                  "due_date": {
                                    "type": "string"
                                  },
                                  "due_time": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "status_label": {
                                    "type": "string"
                                  },
                                  "whose": {
                                    "type": "string",
                                    "description": "Whose date this is, in words for the audience: the title of its group in ehcp_calculate_deadlines, such as \"Your dates\" or \"The family's dates\"."
                                  },
                                  "later_date": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "For the family's dates: the latest the date could be, when the dates given leave a range (a letter sent later than the date printed on it, a letter known only by the day it arrived, a posted letter that counts from when it arrived, or a 15-day period that begins with the day the document was served when the day it arrived is later than the day it was sent). due_date is the earliest: the safe date to act by, for every reader. Only a 15-day period that begins with service (comments on a draft plan or on proposed amendments) is, for a council, school or professional reader, not over until later_date; the time to appeal and the time to contact a mediation adviser may already have passed by later_date. When later_not_relied_on is true, later_date is not relied on at all."
                                  },
                                  "later_not_relied_on": {
                                    "type": "boolean",
                                    "description": "True for the last day to contact a mediation adviser when the letter is dated before the day it was sent: due_date is counted from the date printed on the letter (SEND Regulations 2014, reg 34(2), which counts the 2 months from the date of the notice), and later_date is counted from the day it was sent. later_date is then not the latest the date could be and is not relied on: give due_date alone."
                                  },
                                  "printed_date_ended": {
                                    "type": "boolean",
                                    "description": "True for the last day to contact a mediation adviser when the letter is dated before the day it was sent and the 2 months counted from the date printed on it (SEND Regulations 2014, reg 34(2)) have already ended: due_date is then counted from the day it was sent, and the row says beside it that the time counted from the printed date has ended."
                                  },
                                  "rights_pass": {
                                    "type": "string",
                                    "description": "While the parent holds the rights (a child in Year 11): the line saying that by this date the right belongs to the young person, because compulsory school age ends on the last Friday in June of the school year in which they turn 16 (Children and Families Act 2014, s 83(2); Education Act 1996, s 8(3); Education (School Leaving Date) Order 1997, art 2). Relay it with the date."
                                  },
                                  "not_working_day": {
                                    "type": "boolean",
                                    "description": "True when the date falls on a weekend or bank holiday, so it is safer to act before it (unless not_working_today is true)."
                                  },
                                  "not_working_today": {
                                    "type": "boolean",
                                    "description": "True when that weekend or bank holiday is today: no rule moves it to the next working day, so today is still the last day."
                                  },
                                  "certificate_can_move": {
                                    "type": "boolean",
                                    "description": "For the last day to appeal, when no mediation certificate date is known: an appeal that reaches the Tribunal by due_date is in time, and where a certificate is needed the last day is 1 month after it is issued, if that is later. Not set for an appeal only about the school or college named, which needs no certificate."
                                  },
                                  "note": {
                                    "type": "string",
                                    "description": "When this date matters only in some cases, what they are."
                                  },
                                  "cite": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "rule_id",
                                  "title",
                                  "group",
                                  "due_date",
                                  "due_time",
                                  "status_label",
                                  "later_date",
                                  "cite"
                                ]
                              }
                            },
                            "needs_info": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "issue": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string"
                                },
                                "tool": {
                                  "type": "string",
                                  "const": "ehcp_challenge_options"
                                },
                                "args": {
                                  "type": "object"
                                }
                              },
                              "required": [
                                "id",
                                "label",
                                "tool",
                                "args"
                              ]
                            }
                          },
                          "required": [
                            "event",
                            "counted_from",
                            "review_meeting",
                            "dates_given",
                            "date_lines",
                            "deadlines",
                            "needs_info",
                            "issue"
                          ]
                        },
                        "enclosures": {
                          "type": "object",
                          "properties": {
                            "listed": {
                              "type": "integer"
                            },
                            "topics": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "unrecognised": {
                              "type": "integer"
                            },
                            "mentioned_in_letter": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "listed",
                            "topics",
                            "unrecognised",
                            "mentioned_in_letter"
                          ]
                        },
                        "notes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "text": {
                                "type": "string"
                              },
                              "unsettled": {
                                "type": "boolean"
                              },
                              "see_notice": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "cite": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "text",
                              "unsettled",
                              "see_notice",
                              "cite"
                            ]
                          }
                        },
                        "related_notices": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "title"
                            ]
                          }
                        },
                        "stripped": {
                          "type": "object",
                          "properties": {
                            "address_lines": {
                              "type": "integer"
                            },
                            "salutation": {
                              "type": "integer"
                            },
                            "reference_lines": {
                              "type": "integer"
                            },
                            "sign_off": {
                              "type": "integer"
                            }
                          }
                        },
                        "note": {
                          "type": "string"
                        },
                        "presentation": {
                          "type": "string"
                        },
                        "injection_suspected": {
                          "type": "boolean"
                        },
                        "privacy_line": {
                          "type": "string"
                        },
                        "privacy_url": {
                          "type": "string"
                        },
                        "needs_notice_type": {
                          "type": "boolean"
                        },
                        "other_letter": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "When the text reads like a letter this check does not cover (the council telling the Tribunal it will not oppose an appeal, a letter after a Tribunal order, or the council consulting a school or college about naming it): which one, the ehcp_calculate_deadlines event whose dates apply (null: none) and its source. With notice_type unknown, nothing is checked.",
                          "properties": {
                            "id": {
                              "type": "string",
                              "enum": [
                                "appeal_not_opposed",
                                "tribunal_decision",
                                "appeal_withdrawn",
                                "tribunal_order",
                                "school_consultation"
                              ]
                            },
                            "label": {
                              "type": "string"
                            },
                            "event": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "cite": {
                              "type": "string"
                            },
                            "line": {
                              "type": "string",
                              "description": "What follows if the letter is of that kind, to relay with the result."
                            },
                            "sources": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "cite": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "statute",
                                      "code_must",
                                      "code_should",
                                      "case_law",
                                      "good_practice",
                                      "guidance"
                                    ]
                                  },
                                  "verify": {
                                    "type": "string",
                                    "description": "What is still to be confirmed about this source. Given on case law (status case_law), which keeps a note until a SEND solicitor has confirmed it; an open point on another source is stated in the result where a statement relies on it."
                                  }
                                },
                                "required": [
                                  "cite",
                                  "url",
                                  "status"
                                ]
                              },
                              "description": "Every source for what is said about that kind of letter, with its status."
                            }
                          },
                          "required": [
                            "id",
                            "label",
                            "event",
                            "cite",
                            "line",
                            "sources"
                          ]
                        },
                        "redaction_required": {
                          "type": "object",
                          "properties": {
                            "identifiers": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "item_ids": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "identifiers",
                            "item_ids"
                          ]
                        },
                        "other_nation": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "signposts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "what": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "url"
                            ]
                          },
                          "description": "For a letter from Wales, Scotland or Northern Ireland: the advice service for that nation."
                        }
                      },
                      "required": [
                        "view",
                        "summary_for_user",
                        "next_actions",
                        "keep_wording",
                        "rules_version",
                        "law_as_at",
                        "schema_version",
                        "engine_version",
                        "disclaimer"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "description": "Plain-language summary of the result for the assistant."
                    },
                    "detail": {
                      "type": "object",
                      "description": "Extra detail for displaying the result (for example full findings). Optional."
                    }
                  },
                  "required": [
                    "result",
                    "text"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The input was not usable. The error explains what to change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools/explain": {
      "post": {
        "operationId": "ehcp_explain",
        "summary": "Explain an EHCP term or rule",
        "description": "Use this when someone asks what an EHCP word, section or rule means: \"what is Section F?\", \"what does EOTAS mean?\", \"what is SENDIST?\", \"what are the 20 weeks?\", \"is the Code of Practice the law?\", \"what is a working document?\", or \"what is happening with the SEND reforms, will EHCPs be scrapped?\". It is also the public rulebook: give any id from another Plenda result (a term id, req.*, chk.*, clock.* or a deadline rule_id, route.*, issue.*, notice.*) to get the requirement, how Plenda checks it, how a time limit starts and is counted with its exceptions, and the sources. Send exactly one of term (the word or short phrase only, never names or the family's story), id, or list (sections, stages, deadlines, routes, pending_changes or statuses). Answers follow the law in force on 30 September 2026. Each entry says whether it is the law, the SEND Code of Practice (\"must\" restates the law; \"should\" means the bodies the Code applies to, such as councils, schools, colleges and health bodies, must have regard to it, and the Code says they will be expected to explain any departure from it), case law (naming the court), official guidance or good practice, and marks proposals such as the 2026 SEND reforms as proposals, not law. Memory often mixes proposals with the law, reads \"should\" as optional, or quotes good practice as law; this tool keeps them apart. If Plenda has no entry it says so and offers close entries; it does not guess. Do not use for what happens next in a case (use ehcp_next_steps), working out dates (use ehcp_calculate_deadlines), the ways to challenge a decision (use ehcp_challenge_options), or checking a plan, wording or a letter (use ehcp_check_plan, ehcp_check_wording or ehcp_check_letter). England only.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 140,
                    "pattern": "^(?:[A-Za-z][A-Za-z0-9_]{0,63}|(?:term|clock|route|issue|pending)\\.[A-Za-z][A-Za-z0-9_]{0,63}|notice\\.[A-Za-z][A-Za-z0-9_]{0,63}(?:\\.[A-Za-z][A-Za-z0-9_]{0,63})?|(?:req|chk)\\.[A-Za-z][A-Za-z0-9_]{0,63}(?:\\.[A-Za-z0-9_]{1,63}){1,2})$",
                    "description": "A rule or term id from another Plenda result or the rulebook: a glossary term id (section_f, eotas, or term.section_f), req.* (a plan requirement, such as req.plan.f_specific), chk.* (a plan check, such as chk.f.hedged), clock.* or a deadline rule_id (a time limit, such as clock.final_plan_20_weeks or final_plan_20_weeks), route.* (a way to challenge, such as route.tribunal_appeal), issue.* (a kind of disagreement, such as issue.refused_assessment), notice.* (a council letter type or one of its items, such as notice.decision_not_to_assess), or pending.* (a proposal for change, such as pending.send_reform_2026)."
                  },
                  "term": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "pattern": "^[A-Za-z0-9À-ÿ\"“‘'][A-Za-z0-9À-ÿ '’‘\"“”().,/&?:!_-]{0,59}$",
                    "description": "The word or short phrase the user asked about, such as \"Section F\", \"SENDIST\", \"EOTAS\", \"20 weeks\", \"working document\" or \"SEND reforms\". The term only: no names, dates or story. It is matched against names and common aliases and is never repeated back."
                  },
                  "list": {
                    "type": "string",
                    "enum": [
                      "sections",
                      "stages",
                      "deadlines",
                      "routes",
                      "pending_changes",
                      "statuses"
                    ],
                    "description": "List ids and titles instead of explaining one entry. sections: the sections of an EHC plan, A to K. stages: the stages of the EHC process (ids for ehcp_next_steps). deadlines: every time limit Plenda counts (clock ids). routes: the ways to challenge a decision or complain (route ids). pending_changes: proposals to change the law that are not law yet. statuses: the types of rule (law, Code of Practice must and should, case law, guidance, good practice) and what each means."
                  },
                  "audience": {
                    "type": "string",
                    "enum": [
                      "parent",
                      "young_person",
                      "school",
                      "professional",
                      "local_authority"
                    ],
                    "description": "Who is asking: parent, young_person (over compulsory school age: past the last Friday in June of the school year in which they turn 16, usually the end of Year 11), school, professional, or local_authority (a council caseworker). For school, professional and local_authority, entries name who holds each right and who acts (the parent or young person) instead of saying \"you\", and next actions are worded for them. Defaults to parent."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "view": {
                          "type": "string",
                          "const": "explain"
                        },
                        "summary_for_user": {
                          "type": "string"
                        },
                        "next_actions": {
                          "type": "array",
                          "maxItems": 3,
                          "items": {
                            "type": "object",
                            "properties": {
                              "text": {
                                "type": "string"
                              },
                              "date": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "owner": {
                                "type": "string",
                                "enum": [
                                  "you",
                                  "council",
                                  "school",
                                  "health",
                                  "tribunal",
                                  "mediation",
                                  "other"
                                ]
                              }
                            },
                            "required": [
                              "text",
                              "date",
                              "owner"
                            ]
                          }
                        },
                        "keep_wording": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "rules_version": {
                          "type": "string"
                        },
                        "law_as_at": {
                          "type": "string"
                        },
                        "schema_version": {
                          "type": "string"
                        },
                        "engine_version": {
                          "type": "string"
                        },
                        "disclaimer": {
                          "type": "string"
                        },
                        "privacy": {
                          "type": "object",
                          "properties": {
                            "identifiers_found": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "note": {
                              "type": "string"
                            }
                          }
                        },
                        "found": {
                          "type": "boolean",
                          "description": "True when an entry (or the list asked for) was found."
                        },
                        "entry": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "The id to pass back to ehcp_explain."
                            },
                            "rule_id": {
                              "type": "string",
                              "description": "The permanent rulebook id (term.*, req.*, chk.*, clock.*, route.*, issue.*, notice.*, pending.*)."
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "plan_section",
                                "process",
                                "person",
                                "right",
                                "route",
                                "law",
                                "time_limit",
                                "other",
                                "requirement",
                                "check",
                                "deadline",
                                "challenge_route",
                                "issue",
                                "notice",
                                "notice_item",
                                "pending_change"
                              ],
                              "description": "What the entry is. Glossary terms: plan_section (a section of the plan, A to K), process (a step in the process), person (a person or body), right (something a family can ask for or do), route (a way to resolve a disagreement), law (a rule or legal test), time_limit (a time limit), other. Rule ids: requirement (req.*, what the law or Code requires of a plan), check (chk.*, how Plenda looks for it), deadline (clock.*, a time limit Plenda counts), challenge_route (route.*), issue (issue.*, a kind of disagreement), notice (notice.*, a council letter type), notice_item (something such a letter must or should include), pending_change (pending.*, a proposal, not law)."
                            },
                            "term": {
                              "type": "string"
                            },
                            "plain": {
                              "type": "string",
                              "description": "Plain explanation, reading age about 11."
                            },
                            "detail": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "statute",
                                "code_must",
                                "code_should",
                                "case_law",
                                "good_practice",
                                "guidance",
                                "unsettled",
                                "proposal",
                                "expired"
                              ],
                              "description": "The type of rule the main statement is. statute: Law (Act or Regulations). code_must: Code of Practice: must (restates the law). code_should: Code of Practice: should (follow unless there is a good reason not to). case_law: Case law. good_practice: Good practice. guidance: Official guidance. unsettled: Not settled. proposal: Proposal, not law. expired: Expired law."
                            },
                            "status_label": {
                              "type": "string"
                            },
                            "status_line": {
                              "type": "string",
                              "description": "The fixed plain meaning of the status. Relay it as it is."
                            },
                            "sources": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "cite": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "statute",
                                      "code_must",
                                      "code_should",
                                      "case_law",
                                      "good_practice",
                                      "guidance"
                                    ]
                                  },
                                  "status_label": {
                                    "type": "string"
                                  },
                                  "court": {
                                    "type": "string"
                                  },
                                  "binds_ftt": {
                                    "type": "boolean",
                                    "description": "As the case register records it. While verify is set, whether the case is treated as binding is one of the points still to confirm."
                                  },
                                  "binding_note": {
                                    "type": "string",
                                    "description": "As the case register records it. While verify is set, whether the case is treated as binding is one of the points still to confirm."
                                  },
                                  "holding": {
                                    "type": "string"
                                  },
                                  "verify": {
                                    "type": "string",
                                    "description": "What is still to be confirmed about this source. Given on every source with a point still open, so the Sources line marks it \"to verify\"; case law keeps its note until a SEND solicitor has confirmed it."
                                  }
                                },
                                "required": [
                                  "cite",
                                  "url",
                                  "status",
                                  "status_label"
                                ]
                              }
                            },
                            "related": {
                              "type": "array",
                              "maxItems": 15,
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "term": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "term"
                                ]
                              }
                            },
                            "tool": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "enum": [
                                "ehcp_next_steps",
                                "ehcp_calculate_deadlines",
                                "ehcp_check_plan",
                                "ehcp_check_wording",
                                "ehcp_challenge_options",
                                "ehcp_check_letter",
                                "ehcp_explain",
                                null
                              ]
                            },
                            "tool_why": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "superseded_by": {
                              "type": "string"
                            },
                            "readings": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "text": {
                                    "type": "string"
                                  },
                                  "sources": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "cite": {
                                          "type": "string"
                                        },
                                        "url": {
                                          "type": "string"
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "statute",
                                            "code_must",
                                            "code_should",
                                            "case_law",
                                            "good_practice",
                                            "guidance"
                                          ]
                                        },
                                        "status_label": {
                                          "type": "string"
                                        },
                                        "court": {
                                          "type": "string"
                                        },
                                        "binds_ftt": {
                                          "type": "boolean",
                                          "description": "As the case register records it. While verify is set, whether the case is treated as binding is one of the points still to confirm."
                                        },
                                        "binding_note": {
                                          "type": "string",
                                          "description": "As the case register records it. While verify is set, whether the case is treated as binding is one of the points still to confirm."
                                        },
                                        "holding": {
                                          "type": "string"
                                        },
                                        "verify": {
                                          "type": "string",
                                          "description": "What is still to be confirmed about this source. Given on every source with a point still open, so the Sources line marks it \"to verify\"; case law keeps its note until a SEND solicitor has confirmed it."
                                        }
                                      },
                                      "required": [
                                        "cite",
                                        "url",
                                        "status",
                                        "status_label"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "text",
                                  "sources"
                                ]
                              }
                            },
                            "not_settled": {
                              "type": "array",
                              "description": "Points the law has not settled that affect this entry, each with the id of the entry that shows both readings.",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "term": {
                                    "type": "string"
                                  },
                                  "line": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "term",
                                  "line"
                                ]
                              }
                            },
                            "in_force": {
                              "type": "object",
                              "properties": {
                                "from": {
                                  "type": "string"
                                },
                                "to": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "from",
                                "to"
                              ]
                            },
                            "requirement": {
                              "type": "object",
                              "properties": {
                                "text": {
                                  "type": "string"
                                },
                                "authority": {
                                  "type": "string"
                                },
                                "authority_label": {
                                  "type": "string"
                                },
                                "checks": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "title": {
                                        "type": "string"
                                      },
                                      "level": {
                                        "type": "string"
                                      },
                                      "level_label": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "title",
                                      "level"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "text",
                                "authority",
                                "authority_label",
                                "checks"
                              ]
                            },
                            "check": {
                              "type": "object",
                              "properties": {
                                "level": {
                                  "type": "string"
                                },
                                "level_label": {
                                  "type": "string"
                                },
                                "level_line": {
                                  "type": "string"
                                },
                                "looks_for": {
                                  "type": "string"
                                },
                                "basis": {
                                  "type": "string"
                                },
                                "basis_line": {
                                  "type": "string"
                                },
                                "confidence": {
                                  "type": "string",
                                  "enum": [
                                    "high",
                                    "medium",
                                    "low"
                                  ]
                                },
                                "limits": {
                                  "type": "string"
                                },
                                "req": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "text": {
                                      "type": "string"
                                    },
                                    "authority": {
                                      "type": "string"
                                    },
                                    "authority_label": {
                                      "type": "string"
                                    }
                                  }
                                }
                              },
                              "required": [
                                "level",
                                "level_label",
                                "looks_for",
                                "basis",
                                "confidence",
                                "limits",
                                "req"
                              ]
                            },
                            "clock": {
                              "type": "object",
                              "properties": {
                                "deadline_id": {
                                  "type": "string"
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "duty",
                                    "window",
                                    "derived"
                                  ]
                                },
                                "kind_line": {
                                  "type": "string"
                                },
                                "owner": {
                                  "type": "string"
                                },
                                "owner_label": {
                                  "type": "string"
                                },
                                "starts": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "label"
                                    ]
                                  }
                                },
                                "counted_back_from": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "For a time limit counted back from a later date (such as 15 February in the calendar year of a phase transfer): that date in words. Null when it is counted forward from the events in starts."
                                },
                                "met_by": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "label"
                                    ]
                                  },
                                  "description": "Events that meet the time limit (it is done)."
                                },
                                "ended_by": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "label"
                                    ]
                                  },
                                  "description": "Events after which the time limit stops with nothing more due under it, though a later time limit may run from them (an appeal registered ends the time to appeal; the council's response to an appeal is not due once it tells the Tribunal it will not oppose the appeal, or the Tribunal makes its order)."
                                },
                                "shown_by": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "label"
                                    ]
                                  },
                                  "description": "Later events that can only happen once this step was done. With no date for the step itself, ehcp_calculate_deadlines shows it as done with its timing unknown."
                                },
                                "counting": {
                                  "type": "string"
                                },
                                "due_time": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "exceptions": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      },
                                      "regulation": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "label",
                                      "regulation"
                                    ]
                                  }
                                },
                                "if_missed": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "notes": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "confidence": {
                                  "type": "string",
                                  "enum": [
                                    "high",
                                    "medium",
                                    "low"
                                  ]
                                }
                              },
                              "required": [
                                "deadline_id",
                                "kind",
                                "owner",
                                "owner_label",
                                "starts",
                                "met_by",
                                "ended_by",
                                "shown_by",
                                "counting",
                                "exceptions"
                              ]
                            },
                            "route": {
                              "type": "object",
                              "properties": {
                                "what_it_is": {
                                  "type": "string"
                                },
                                "can_change": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "cannot_change": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "who_can_use": {
                                  "type": "string"
                                },
                                "time_limit": {
                                  "type": "string"
                                },
                                "needs_certificate": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "alongside": {
                                  "type": "string"
                                },
                                "cost": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "what_it_is",
                                "can_change",
                                "cannot_change",
                                "who_can_use",
                                "time_limit"
                              ]
                            },
                            "issue": {
                              "type": "object",
                              "properties": {
                                "appeal_right": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "The pin of the appeal or claim right, or null when the issue has none of its own."
                                },
                                "appeal_kind": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "enum": [
                                    "send_appeal",
                                    "discrimination_claim",
                                    null
                                  ],
                                  "description": "send_appeal: an appeal to the SEND Tribunal under the Children and Families Act 2014. discrimination_claim: a disability discrimination claim to the SEND Tribunal under the Equality Act 2010. null: no appeal or claim of its own."
                                },
                                "appeal_line": {
                                  "type": "string"
                                },
                                "needs_certificate": {
                                  "type": [
                                    "boolean",
                                    "null"
                                  ]
                                },
                                "starts_with": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "routes": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "term": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "term"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "appeal_right",
                                "routes"
                              ]
                            },
                            "notice": {
                              "type": "object",
                              "properties": {
                                "event": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "issue": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "term": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      },
                                      "required": {
                                        "type": "boolean"
                                      },
                                      "basis": {
                                        "type": "string"
                                      },
                                      "basis_label": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "label",
                                      "required",
                                      "basis"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "items"
                              ]
                            },
                            "notice_item": {
                              "type": "object",
                              "properties": {
                                "notice": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "term": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "required": {
                                  "type": "boolean"
                                },
                                "basis": {
                                  "type": "string"
                                },
                                "basis_label": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "required",
                                "basis"
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "rule_id",
                            "revision",
                            "kind",
                            "term",
                            "plain",
                            "detail",
                            "status",
                            "status_label",
                            "status_line",
                            "sources",
                            "related",
                            "tool"
                          ]
                        },
                        "matches": {
                          "type": "array",
                          "maxItems": 10,
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "term": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "term"
                            ]
                          },
                          "description": "Close entries: alternatives when nothing matched, or other meanings when the word is ambiguous (at most 5). For a stage id, the words used at that stage (at most 10). For a topic id, close entries (at most 5). For an event id, every time limit it can start (at most 10)."
                        },
                        "pending": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "const": "proposal"
                              },
                              "status_label": {
                                "type": "string"
                              },
                              "summary": {
                                "type": "string"
                              },
                              "date": {
                                "type": "string"
                              },
                              "sources": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "cite": {
                                      "type": "string"
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "statute",
                                        "code_must",
                                        "code_should",
                                        "case_law",
                                        "good_practice",
                                        "guidance"
                                      ]
                                    },
                                    "status_label": {
                                      "type": "string"
                                    },
                                    "court": {
                                      "type": "string"
                                    },
                                    "binds_ftt": {
                                      "type": "boolean",
                                      "description": "As the case register records it. While verify is set, whether the case is treated as binding is one of the points still to confirm."
                                    },
                                    "binding_note": {
                                      "type": "string",
                                      "description": "As the case register records it. While verify is set, whether the case is treated as binding is one of the points still to confirm."
                                    },
                                    "holding": {
                                      "type": "string"
                                    },
                                    "verify": {
                                      "type": "string",
                                      "description": "What is still to be confirmed about this source. Given on every source with a point still open, so the Sources line marks it \"to verify\"; case law keeps its note until a SEND solicitor has confirmed it."
                                    }
                                  },
                                  "required": [
                                    "cite",
                                    "url",
                                    "status",
                                    "status_label"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "status",
                              "status_label",
                              "summary",
                              "date"
                            ]
                          },
                          "description": "Proposals for change that concern the entry. Proposals, not law."
                        },
                        "list": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "sections",
                                "stages",
                                "deadlines",
                                "routes",
                                "pending_changes",
                                "statuses"
                              ]
                            },
                            "title": {
                              "type": "string"
                            },
                            "items": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "term": {
                                    "type": "string"
                                  },
                                  "line": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "term"
                                ]
                              }
                            },
                            "tool": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "note": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "title",
                            "items",
                            "tool",
                            "note"
                          ]
                        },
                        "known_id": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "stage",
                                "topic",
                                "event"
                              ]
                            },
                            "id": {
                              "type": "string"
                            },
                            "title": {
                              "type": "string"
                            },
                            "tool": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "id",
                            "title",
                            "tool"
                          ],
                          "description": "Set when the id given is a stage of the process or a topic next to EHC plans (see ehcp_next_steps), or an event that starts time limits (see ehcp_calculate_deadlines), which have no entry of their own."
                        },
                        "presentation": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "view",
                        "summary_for_user",
                        "next_actions",
                        "keep_wording",
                        "rules_version",
                        "law_as_at",
                        "schema_version",
                        "engine_version",
                        "disclaimer",
                        "found",
                        "entry",
                        "matches",
                        "pending",
                        "list",
                        "presentation"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "description": "Plain-language summary of the result for the assistant."
                    },
                    "detail": {
                      "type": "object",
                      "description": "Extra detail for displaying the result (for example full findings). Optional."
                    }
                  },
                  "required": [
                    "result",
                    "text"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The input was not usable. The error explains what to change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      }
    }
  }
}