{
  "openapi": "3.1.0",
  "info": {
    "title": "LTD Turnaround Data API",
    "version": "2026-11-02",
    "description": "Read-only official UK company distress data: Insolvency Service company insolvency statistics, Gazette winding-up petition counts and the insolvency practitioner register. No key needed. Data reused under the Open Government Licence v3.0.",
    "license": {
      "name": "Open Government Licence v3.0",
      "url": "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
    }
  },
  "servers": [
    {
      "url": "https://ltdturnaround.co.uk",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/insolvency": {
      "get": {
        "summary": "Latest monthly company insolvency figures (England and Wales)",
        "responses": {
          "200": {
            "description": "Insolvency snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/petitions": {
      "get": {
        "summary": "Recent winding-up petition counts from The Gazette (counts only)",
        "responses": {
          "200": {
            "description": "Petition counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/practitioners": {
      "get": {
        "summary": "Search the insolvency practitioner register",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Name or firm"
          },
          {
            "name": "town",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Town or start of postcode"
          },
          {
            "name": "body",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Authorising body"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "1 to 100, default 25"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching practitioners",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/practitioners/{ip}": {
      "get": {
        "summary": "One practitioner by IP number",
        "parameters": [
          {
            "name": "ip",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Practitioner",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    }
  }
}