{
  "openapi": "3.0.1",
  "info": {
    "title": "CompaniesHouse",
    "version": "v1"
  },
  "paths": {
    "/CompaniesHouse/GetCompanyDetailsSimple.json": {
      "post": {
        "tags": [
          "CompaniesHouse"
        ],
        "summary": "Gets the registered details of a company",
        "requestBody": {
          "description": "The company number to get the details for",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetCompanyDetailsSimpleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GetCompanyDetailsSimpleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GetCompanyDetailsSimpleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHouseOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHouseOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHouseOutput"
                }
              }
            }
          }
        }
      }
    },
    "/CompaniesHouse/GetCompanyDetails.json": {
      "post": {
        "tags": [
          "CompaniesHouse"
        ],
        "summary": "Gets the registered details of a company",
        "requestBody": {
          "description": "The company number to get the details for",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetCompanyDetailsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GetCompanyDetailsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GetCompanyDetailsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHouseOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHouseOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHouseOutput"
                }
              }
            }
          }
        }
      }
    },
    "/CompaniesHouse/FindCompanyByNameOrPostcodeSimple.json": {
      "post": {
        "tags": [
          "CompaniesHouse"
        ],
        "summary": "Finds a company based on its name or postcode",
        "requestBody": {
          "description": "The name or postcode of the company to find",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FindCompanyByNameOrPostcodeSimpleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FindCompanyByNameOrPostcodeSimpleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FindCompanyByNameOrPostcodeSimpleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHousePartialOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHousePartialOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHousePartialOutput"
                }
              }
            }
          }
        }
      }
    },
    "/CompaniesHouse/FindCompanyByNameOrPostcode.json": {
      "post": {
        "tags": [
          "CompaniesHouse"
        ],
        "summary": "Finds a company based on its name or postcode",
        "requestBody": {
          "description": "The name or postcode of the company to find",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FindCompanyByNameOrPostcodeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FindCompanyByNameOrPostcodeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FindCompanyByNameOrPostcodeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHousePartialOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHousePartialOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHousePartialOutput"
                }
              }
            }
          }
        }
      }
    },
    "/CompaniesHouse/FindCompanyByNameAndAddressSimple.json": {
      "post": {
        "tags": [
          "CompaniesHouse"
        ],
        "summary": "Finds a company based on its name and address",
        "requestBody": {
          "description": "The name and address of the company to find",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FindCompanyByNameAndAddressSimpleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FindCompanyByNameAndAddressSimpleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FindCompanyByNameAndAddressSimpleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHousePartialOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHousePartialOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHousePartialOutput"
                }
              }
            }
          }
        }
      }
    },
    "/CompaniesHouse/FindCompanyByNameAndAddress.json": {
      "post": {
        "tags": [
          "CompaniesHouse"
        ],
        "summary": "Finds a company based on its name and address",
        "requestBody": {
          "description": "The name and address of the company to find",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FindCompanyByNameAndAddressRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FindCompanyByNameAndAddressRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FindCompanyByNameAndAddressRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHousePartialOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHousePartialOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompaniesHousePartialOutput"
                }
              }
            }
          }
        }
      }
    },
    "/CompaniesHouse/FindCompanyByNameAndAddressMultiple.json": {
      "post": {
        "tags": [
          "CompaniesHouse"
        ],
        "summary": "Finds companies based on their name and address",
        "requestBody": {
          "description": "The name and address of the companies to find",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FindCompanyByNameAndAddressMultipleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FindCompanyByNameAndAddressMultipleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FindCompanyByNameAndAddressMultipleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CompaniesHousePartialOutput"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CompaniesHousePartialOutput"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CompaniesHousePartialOutput"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Address": {
        "type": "object",
        "properties": {
          "Lines": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BusinessInputRecord": {
        "type": "object",
        "properties": {
          "Name": {
            "$ref": "#/components/schemas/Name"
          },
          "Address": {
            "$ref": "#/components/schemas/Address"
          },
          "CompanyName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CompaniesHouseOutput": {
        "type": "object",
        "properties": {
          "Status": {
            "$ref": "#/components/schemas/Status"
          },
          "Result": {
            "$ref": "#/components/schemas/CompaniesHouseResult"
          }
        },
        "additionalProperties": false
      },
      "CompaniesHousePartialOutput": {
        "type": "object",
        "properties": {
          "Status": {
            "$ref": "#/components/schemas/Status"
          },
          "Results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompaniesHousePartialResult"
            },
            "description": "Contains the partial details found for the requested companies on the companies house database",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CompaniesHousePartialResult": {
        "type": "object",
        "properties": {
          "CompanyName": {
            "type": "string",
            "nullable": true
          },
          "CompanyNumber": {
            "type": "string",
            "nullable": true
          },
          "CompanyCategory": {
            "type": "string",
            "nullable": true
          },
          "CompanyStatus": {
            "type": "string",
            "nullable": true
          },
          "Town": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CompaniesHouseResult": {
        "type": "object",
        "properties": {
          "CompanyName": {
            "type": "string",
            "nullable": true
          },
          "CompanyNumber": {
            "type": "string",
            "nullable": true
          },
          "HasInconsistencies": {
            "type": "string",
            "nullable": true
          },
          "RegAddress_CareOfName": {
            "type": "string",
            "nullable": true
          },
          "RegAddress_POBox": {
            "type": "string",
            "nullable": true
          },
          "RegAddress_AddressLine1": {
            "type": "string",
            "nullable": true
          },
          "RegAddress_AddressLine2": {
            "type": "string",
            "nullable": true
          },
          "RegAddress_AddressLine3": {
            "type": "string",
            "nullable": true
          },
          "RegAddress_AddressLine4": {
            "type": "string",
            "nullable": true
          },
          "RegAddress_AddressLine5": {
            "type": "string",
            "nullable": true
          },
          "RegAddress_AddressLine6": {
            "type": "string",
            "nullable": true
          },
          "CompanyCategory": {
            "type": "string",
            "nullable": true
          },
          "CompanyStatus": {
            "type": "string",
            "nullable": true
          },
          "CountryOfOrigin": {
            "type": "string",
            "nullable": true
          },
          "RegistrationDate": {
            "type": "string",
            "nullable": true
          },
          "DissolutionDate": {
            "type": "string",
            "nullable": true
          },
          "IncorporationDate": {
            "type": "string",
            "nullable": true
          },
          "ClosureDate": {
            "type": "string",
            "nullable": true
          },
          "Accounts_AccountRefDate": {
            "type": "string",
            "nullable": true
          },
          "Accounts_NextDueDate": {
            "type": "string",
            "nullable": true
          },
          "Accounts_Overdue": {
            "type": "string",
            "nullable": true
          },
          "Accounts_LastMadeUpDate": {
            "type": "string",
            "nullable": true
          },
          "Accounts_AccountCategory": {
            "type": "string",
            "nullable": true
          },
          "Accounts_DocumentsAvail": {
            "type": "string",
            "nullable": true
          },
          "Returns_NextDueDate": {
            "type": "string",
            "nullable": true
          },
          "Returns_Overdue": {
            "type": "string",
            "nullable": true
          },
          "Returns_LastMadeUpDate": {
            "type": "string",
            "nullable": true
          },
          "Returns_DocumentAvail": {
            "type": "string",
            "nullable": true
          },
          "Mortgages_MortgageInd": {
            "type": "string",
            "nullable": true
          },
          "Mortgages_NumMortgageCharges": {
            "type": "string",
            "nullable": true
          },
          "Mortgages_NumMortgageOutstanding": {
            "type": "string",
            "nullable": true
          },
          "Mortgages_NumPartSatisfied": {
            "type": "string",
            "nullable": true
          },
          "Mortgages_NumSatisfied": {
            "type": "string",
            "nullable": true
          },
          "SICCode1": {
            "type": "string",
            "nullable": true
          },
          "SICCode2": {
            "type": "string",
            "nullable": true
          },
          "SICCode3": {
            "type": "string",
            "nullable": true
          },
          "SICCode4": {
            "type": "string",
            "nullable": true
          },
          "LastFullMembersDate": {
            "type": "string",
            "nullable": true
          },
          "LastBulkShareDate": {
            "type": "string",
            "nullable": true
          },
          "WeededDate": {
            "type": "string",
            "nullable": true
          },
          "HasUKEstablishment": {
            "type": "string",
            "nullable": true
          },
          "HasAppointments": {
            "type": "string",
            "nullable": true
          },
          "InLiquidation": {
            "type": "string",
            "nullable": true
          },
          "LimitedPartnerships_NumberGenPartners": {
            "type": "string",
            "nullable": true
          },
          "LimitedPartnerships_NumberLimPartners": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FindCompanyByNameAndAddressMultipleRequest": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "description": "The username to authenticate with",
            "nullable": true
          },
          "password": {
            "type": "string",
            "description": "The password to authenticate with",
            "nullable": true
          },
          "requests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BusinessInputRecord"
            },
            "description": "The name and address of each company to find",
            "nullable": true
          },
          "companystatus": {
            "type": "string",
            "description": "An optional filter to restrict matches by status, e.g. \"Active\"",
            "nullable": true
          },
          "options": {
            "type": "object",
            "description": "Any custom options to control how the details should be validated. See the API documentation website for a list of currently supported option.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FindCompanyByNameAndAddressRequest": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "description": "The username to authenticate with",
            "nullable": true
          },
          "password": {
            "type": "string",
            "description": "The password to authenticate with",
            "nullable": true
          },
          "record": {
            "$ref": "#/components/schemas/BusinessInputRecord"
          },
          "companystatus": {
            "type": "string",
            "description": "An optional filter to restrict matches by status, e.g. \"Active\"",
            "nullable": true
          },
          "options": {
            "type": "object",
            "description": "Any custom options to control how the details should be validated. See the API documentation website for a list of currently supported option.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FindCompanyByNameAndAddressSimpleRequest": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "description": "The username to authenticate with",
            "nullable": true
          },
          "password": {
            "type": "string",
            "description": "The password to authenticate with",
            "nullable": true
          },
          "company": {
            "type": "string",
            "description": "The name of the company to find",
            "nullable": true
          },
          "address": {
            "type": "string",
            "description": "The full address of the company to find",
            "nullable": true
          },
          "companystatus": {
            "type": "string",
            "description": "An optional filter to restrict matches by status, e.g. \"Active\"",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FindCompanyByNameOrPostcodeRequest": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "description": "The username to authenticate with",
            "nullable": true
          },
          "password": {
            "type": "string",
            "description": "The password to authenticate with",
            "nullable": true
          },
          "companyname": {
            "type": "string",
            "description": "The name of the company to find",
            "nullable": true
          },
          "postcode": {
            "type": "string",
            "description": "The postcode of the company to find",
            "nullable": true
          },
          "companystatus": {
            "type": "string",
            "description": "An optional filter to restrict matches by status, e.g. \"Active\"",
            "nullable": true
          },
          "options": {
            "type": "object",
            "description": "Any custom options to control how the details should be validated. See the API documentation website for a list of currently supported option.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FindCompanyByNameOrPostcodeSimpleRequest": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "description": "The username to authenticate with",
            "nullable": true
          },
          "password": {
            "type": "string",
            "description": "The password to authenticate with",
            "nullable": true
          },
          "companyname": {
            "type": "string",
            "description": "The name of the company to find",
            "nullable": true
          },
          "postcode": {
            "type": "string",
            "description": "The postcode of the company to find",
            "nullable": true
          },
          "companystatus": {
            "type": "string",
            "description": "An optional filter to restrict matches by status, e.g. \"Active\"",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetCompanyDetailsRequest": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "description": "The username to authenticate with",
            "nullable": true
          },
          "password": {
            "type": "string",
            "description": "The password to authenticate with",
            "nullable": true
          },
          "companynumber": {
            "type": "string",
            "description": "The company registration number to get the associated details for",
            "nullable": true
          },
          "options": {
            "type": "object",
            "description": "Any custom options to control how the details should be validated. See the API documentation website for a list of currently supported option.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetCompanyDetailsSimpleRequest": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "description": "The username to authenticate with",
            "nullable": true
          },
          "password": {
            "type": "string",
            "description": "The password to authenticate with",
            "nullable": true
          },
          "companynumber": {
            "type": "string",
            "description": "The company registration number to get the associated details for",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Name": {
        "type": "object",
        "properties": {
          "Title": {
            "type": "string",
            "nullable": true
          },
          "Forename": {
            "type": "string",
            "nullable": true
          },
          "MiddleName": {
            "type": "string",
            "nullable": true
          },
          "Surname": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Option": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "The name of the option. For an option to have any effect, the name must be one that the service expects.\r\nAny other options that are supplied should be ignored",
            "nullable": true
          },
          "Value": {
            "type": "string",
            "description": "The value for the option. Although this is supplied as a string, it may be converted to other formats. If\r\nthe string is not in the expected format an error may be thrown.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents an option that the caller can use to control how a request is executed"
      },
      "Status": {
        "type": "object",
        "properties": {
          "Success": {
            "type": "boolean"
          },
          "ErrorMessage": {
            "type": "string",
            "nullable": true
          },
          "CreditsRemaining": {
            "type": "number",
            "format": "float"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "UserPass": {
        "type": "http",
        "scheme": "basic"
      },
      "ApiKey": {
        "type": "apiKey",
        "name": "key",
        "in": "query"
      },
      "JWT": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "UserPass": [ ],
      "ApiKey": [ ],
      "JWT": [ ]
    }
  ]
}