{
 "openapi": "3.1.0",
 "info": {
  "title": "UKCheck",
  "version": "1.0.0",
  "description": "UK company due-diligence: Companies House registry flags plus UK Sanctions List name screen. Free search; full checks cost 1 prepaid credit.",
  "contact": {
   "email": "hello@gptshopltd.com"
  }
 },
 "servers": [
  {
   "url": "https://ukcheck.gptshopltd.com"
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer",
    "description": "UKCheck key (ukc_...). Buy: https://ukcheck.gptshopltd.com/#pricing"
   }
  }
 },
 "paths": {
  "/v1/search": {
   "get": {
    "operationId": "searchUkCompanies",
    "summary": "Find UK companies by name (free)",
    "description": "Use when you know a UK company's name and need its Companies House number.",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Up to 10 matches",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "number": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "status": {
              "type": "string"
             }
            }
           }
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/v1/company/{number}": {
   "get": {
    "operationId": "getUkCompanyBasic",
    "summary": "Basic profile (free)",
    "parameters": [
     {
      "name": "number",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Name, status, incorporation date, category"
     },
     "404": {
      "description": "Not found"
     }
    }
   }
  },
  "/v1/check/{number}": {
   "get": {
    "operationId": "checkUkCompany",
    "summary": "Full due-diligence check (1 credit)",
    "description": "Use when you must vet a UK company: status, age, overdue filings, dormant, charges, previous names, UK Sanctions List name screen, risk_flags.",
    "security": [
     {
      "bearer": []
     }
    ],
    "parameters": [
     {
      "name": "number",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Check result with risk_flags and sources"
     },
     "402": {
      "description": "No key or no credits; body lists purchase options"
     },
     "404": {
      "description": "Not in live-company snapshot"
     }
    }
   }
  },
  "/v1/credits": {
   "get": {
    "operationId": "getCredits",
    "summary": "Credits remaining",
    "security": [
     {
      "bearer": []
     }
    ],
    "responses": {
     "200": {
      "description": "credits, used"
     }
    }
   }
  }
 }
}