openapi: 3.0.3
info:
  description: KEN ALL API
  contact:
    url: https://kenall.jp/
  termsOfService: https://kenall.jp/terms
  title: kenall
  version: 1.2024-01-01.250220
servers:
  - url: https://api.kenall.jp/v1
security:
  - Token: []
tags:
  - name: bank
    description: APIs for bank information.
    externalDocs:
      url: https://kenall.jp/docs/API/bank/
  - name: businessday
    description: APIs for calculating business days
    externalDocs:
      url: https://kenall.jp/docs/API/businessday/
  - name: houjinbangou
    description: APIs for looking up corporate information by the corporate number and vice versa.
    externalDocs:
      url: https://kenall.jp/docs/API/houjinbangou/
  - name: invoice
    description: Get the invoice issuer information by issuer number.
    externalDocs:
      url: https://kenall.jp/docs/API/invoice/
  - name: postalcode
    description: APIs for looking up addresses by the postal code and vice versa.
    externalDocs:
      url: https://kenall.jp/docs/API/postalcode/
  - name: city
    description: City information API
    externalDocs:
      url: https://kenall.jp/docs/API/city/
  - name: holidays
    description: National holiday information API
    externalDocs:
      url: https://kenall.jp/docs/API/holidays/
  - name: whoami
    description: Requesting entity's IP address identification API
    externalDocs:
      url: https://kenall.jp/docs/API/whoami/
  - name: school
    description: APIs for looking up school information by the school code and vice versa.
    externalDocs:
      url: https://kenall.jp/docs/API/school/
externalDocs:
  url: https://kenall.jp/docs/
paths:
  /bank:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
    get:
      operationId: getBanks
      summary: Get bank information set
      description: Get the set of the bank information.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBanksResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/bank/
      tags:
        - bank
  /bank/{bankCode}:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
      - name: bankCode
        in: path
        description: The bank code to query with.
        required: true
        schema:
          $ref: '#/components/schemas/BankCode'
        example: '0001'
    get:
      operationId: getBank
      summary: Get bank information
      description: Get the bank information.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBankResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/bank/
      tags:
        - bank
  /bank/{bankCode}/branches:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
      - name: bankCode
        in: path
        description: The bank code to query with.
        required: true
        schema:
          $ref: '#/components/schemas/BankCode'
        example: '0001'
    get:
      operationId: getBankBranches
      summary: Get bank branch information set
      description: Get the set of the bank branch information.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBankBranchesResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/bank/
      tags:
        - bank
  /bank/{bankCode}/branches/{branchCode}:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
      - name: bankCode
        in: path
        description: The bank code to query with.
        required: true
        schema:
          $ref: '#/components/schemas/BankCode'
        example: '0001'
      - name: branchCode
        in: path
        description: The branch code to query with.
        required: true
        schema:
          $ref: '#/components/schemas/BankBranchCode'
        example: '188'
    get:
      operationId: getBankBranch
      summary: Get bank branch information
      description: Get the bank branch information.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBankBranchResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/bank/
      tags:
        - bank
  /bank/versions:
    get:
      operationId: bankDataVersions
      summary: Get all bank data versions.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  versions:
                    description: The version identifier of the stored data.
                    type: array
                    items:
                      type: string
                      format: date
                    example:
                      - '2025-01-01'
      externalDocs:
        url: https://kenall.jp/docs/API/bank/#get-v1bankversions
      tags:
        - bank
  /batch/houjinbangou/search:
    post:
      operationId: batchSearchCorporateInfo
      summary: Batch search corporate information
      description: Search the corporate information by the queries in a batch operation.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchSearchCorporateInfoRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchSearchCorporateInfoResponse'
      tags:
        - houjinbangou
  /batch/postalcode/search:
    parameters:
      - name: version
        in: query
        description: The data version to query against
        schema:
          $ref: '#/components/schemas/DataVersion'
    post:
      operationId: batchSearchAddresses
      summary: Look for multiple addresses that match to the given search criteria in a batch operation.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchSearchAddressesRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchSearchAddressesResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/postalcode/rev-lookup/#post-v1batchpostalcodesearch
      tags:
        - postalcode
  /businessdays/check:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
      - name: date
        in: query
        description: Specify the date in the form of YYYY-MM-DD.
        required: true
        schema:
          $ref: '#/components/schemas/ISO8601Date'
    get:
      operationId: checkBusinessDay
      summary: Check business day
      description: Specify the date to check if it is a legal holiday.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckBusinessDayResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/businessday/
      tags:
        - businessday
  /businessdays/period:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
      - name: year
        in: query
        description: Specify the year in the form of yyyy.
        required: true
        schema:
          $ref: '#/components/schemas/Year'
      - name: month
        in: query
        description: Specify the month in the form of m.
        required: true
        schema:
          $ref: '#/components/schemas/Month'
    get:
      operationId: getBusinessDayPeriod
      summary: Get business day period
      description: Get the first and last business days of the specified year and month.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBusinessDayPeriodResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/businessday/
      tags:
        - businessday
  /houjinbangou:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
      - name: q
        in: query
        schema:
          $ref: '#/components/schemas/CorporateInfoSearchQuery'
      - name: offset
        in: query
        schema:
          $ref: '#/components/schemas/Offset'
      - name: limit
        in: query
        schema:
          $ref: '#/components/schemas/Limit'
      - name: mode
        in: query
        schema:
          $ref: '#/components/schemas/CorporateInfoSearchMode'
      - name: normalize_name
        in: query
        description: |
          If set to `true`, the API will return the normalized name.
          The normalized name is the name that is normalized by the following rules:

          * Convert full-width alphanumeric characters to half-width alphanumeric characters.
          * Convert long vowel marks to half-width hyphens if the previous character is an alphanumeric character.
          * Convert long vowel marks to full-width long vowel marks if the previous character is not an alphanumeric characters.

          Example: `ａｂｃ－ｄｅｆ` → `abc-def`
          Example: `あいう－えお` → `あいうーえお`
        schema:
          type: boolean
          example: false
          default: false
      - name: facet_area
        in: query
        description: |
          The facet representation at which level the resulting facets of prefecture and city will be shaped.
          The facet should be written in Japanese.
          If you want to specify foreign corporate, please set `/海外など` to this field.
        schema:
          type: string
          example: /東京都
          pattern: ^/([^/]+/?)*$
      - name: facet_kind
        in: query
        description: |
          The facet representation at which level the resulting facets of kind will be shaped.
          The facet should be written in Japanese.
        schema:
          type: string
          example: /株式会社
          pattern: ^/([^/]+/?)*$
      - name: facet_process
        in: query
        description: |
          The facet representation at which level the resulting facets of process will be shaped.
          The facet should be written in Japanese.
        schema:
          type: string
          example: /商号又は名称の変更
          pattern: ^/([^/]+/?)*$
      - name: facet_close_cause
        in: query
        description: |
          The facet representation at which level the resulting facets of close cause will be shaped.
          The facet should be written in Japanese.
        schema:
          type: string
          example: /清算の結了等
          pattern: ^/([^/]+/?)*$
    get:
      operationId: searchCorporateInfo
      summary: Search corporate information
      description: Search the corporate information by the query.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchCorporateInfoResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/houjinbangou/rev-lookup/
      tags:
        - houjinbangou
  /houjinbangou/{corporateNumber}:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
      - name: corporateNumber
        in: path
        description: corporateNumber The corporate number to query with.
        required: true
        schema:
          $ref: '#/components/schemas/CanonicalCorporateNumber'
    get:
      operationId: getCorporateInfo
      summary: Get corporate information
      description: Get the company information by corporate number.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCorporateInfoResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/houjinbangou/forward-lookup/
      tags:
        - houjinbangou
  /houjinbangou/radar/corporate_numbers:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
      - name: offset
        in: query
        description: The offset from which the result will be fetched.
        required: false
        schema:
          $ref: '#/components/schemas/Offset'
      - name: limit
        in: query
        description: The maximum number of entries the result will be fetched.
        required: false
        schema:
          $ref: '#/components/schemas/Limit'
    get:
      operationId: listCorporateInfoRadarTargets
      summary: Get the list of the corporate numbers watched by the Corporate Info Radar.
      description: Get the list of the corporate numbers of the targets watched by the acount's Corporate Info Radar.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCorporateInfoRadarTargetsResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/houjinbangou/radar/
      tags:
        - houjinbangou
  /houjinbangou/radar/corporate_numbers/add:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
    post:
      operationId: addCorporateInfoRadarTargets
      summary: Add new targets to the corporate numbers watched by the Corporate Info Radar.
      description: Add new targets to the list of the targets' corporate numbers watched by the acount's Corporate Info Radar.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddCorporateInfoRadarTargetsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CorporateNumberListContainer'
      externalDocs:
        url: https://kenall.jp/docs/API/houjinbangou/radar/
      tags:
        - houjinbangou
  /houjinbangou/radar/corporate_numbers/remove:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
    post:
      operationId: deleteCorporateInfoRadarTargets
      summary: Delete multiple targets from the corporate numbers watched by the Corporate Info Radar.
      description: Delete multiple targets from the list of the targets' corporate numbers watched by the acount's Corporate Info Radar.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteCorporateInfoRadarTargetsRequest'
      responses:
        '200':
          description: OK
      externalDocs:
        url: https://kenall.jp/docs/API/houjinbangou/radar/
      tags:
        - houjinbangou
  /houjinbangou/radar/{date}:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
      - name: date
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/ISO8601Date'
    get:
      operationId: getCorporateInfoRadarTargetsUpdatedForDay
      summary: Get Corporate Info Radar targets updated for the specific day.
      description: Get the Corporate Info Radar targets that have been updated for the specific day.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCorporateInfoRadarTargetsUpdatedForDayResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/houjinbangou/radar/
      tags:
        - houjinbangou
  /postalcode/{postalCode}:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
      - name: postalCode
        in: path
        description: The postal code to query with.
        required: true
        schema:
          $ref: '#/components/schemas/PostalCode'
    get:
      operationId: getAddress
      summary: Get address by postal code
      description: Get the address for the given postal code.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAddressResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/postalcode/
      tags:
        - postalcode
  /postalcode/versions/:
    get:
      operationId: postalcodeDataVersions
      summary: Get all postalcode data versions.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  versions:
                    description: The version identifier of the stored data.
                    type: array
                    items:
                      type: string
                      format: date
                    example:
                      - '2025-01-31'
      externalDocs:
        url: https://kenall.jp/docs/API/postalcode/forward-lookup/#get-v1postalcodeversions
      tags:
        - postalcode
  /postalcode/:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
      - name: q
        in: query
        description: The query to search against the address database with. Either `q` or `t` is required.
        schema:
          $ref: '#/components/schemas/AddressSearchQuery'
      - name: t
        in: query
        description: The address to normalize and search against the address database with. Either `q` or `t` is required.
        schema:
          type: string
          minLength: 1
        example: 東京都千代田区千代田1-1
      - name: offset
        in: query
        schema:
          $ref: '#/components/schemas/Offset'
      - name: limit
        in: query
        schema:
          $ref: '#/components/schemas/Limit'
      - name: facet
        in: query
        description: |
          The facet representation at which level the resulting facets of process will be shaped.

          The facet should be written in Japanese.
        schema:
          type: string
          example: /宮城県
          pattern: ^/([^/]+/?)*$
      - name: version
        in: query
        description: |
          The data version to query against
        schema:
          $ref: '#/components/schemas/DataVersion'
    get:
      operationId: searchAddresses
      summary: Look for the addresses that match to the given search criteria.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchAddressesResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/postalcode/
      tags:
        - postalcode
  /cities/{prefectureCode}:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
      - name: prefectureCode
        in: path
        description: The prefecture code to query with.
        required: true
        schema:
          $ref: '#/components/schemas/PrefectureCode'
    get:
      operationId: getCities
      summary: Get cities by prefecture
      description: |
        Get the cities belonging to the prefecture of the specified code.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCitiesResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/city/
      tags:
        - city
  /holidays:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
      - name: year
        in: query
        schema:
          $ref: '#/components/schemas/Year'
      - name: from
        in: query
        schema:
          $ref: '#/components/schemas/ISO8601Date'
      - name: to
        in: query
        schema:
          $ref: '#/components/schemas/ISO8601Date'
    get:
      operationId: getNationalHolidays
      summary: Retrieve Japanese national holidays
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetNationalHolidaysResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/holidays/
      tags:
        - holidays
  /whoami:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
    get:
      operationId: getMyIPAddress
      summary: Get the IP address of the requesting entity.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMyIPAddressResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/whoami/
      tags:
        - whoami
  /invoice/{issuerNumber}:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
      - name: issuerNumber
        in: path
        description: The qualified invoice issuer number to query with.
        required: true
        schema:
          $ref: '#/components/schemas/InvoiceIssuerNumber'
    get:
      operationId: getInvoiceIssuer
      summary: Get invoice issuer information
      description: Get the invoice issuer information by issuer number.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetInvoiceIssuerResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/invoice/forward-lookup/
      tags:
        - invoice
  /download/postalcode/:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
    get:
      operationId: listAvailablePostalcodeData
      summary: Get the list of the available postalcode data.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAvailablePostalcodeDataResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/postalcode/source-downloads/
      tags:
        - postalcode
  /download/postalcode/{path}:
    parameters:
      - name: KenAll-API-Version
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/KenAllAPIVersion'
      - name: path
        in: path
        description: The path to the postalcode data
        required: true
        schema:
          type: string
        example: 2021-06-30/kenall.json.xz
    get:
      operationId: getDownloadURLForPostalcodeData
      summary: Get the download URL for the available postalcode data.
      responses:
        '303':
          description: The returned `Location` header refers to the URL from which you can download the data.
      externalDocs:
        url: https://kenall.jp/docs/API/postalcode/source-downloads/
      tags:
        - postalcode
  /school/{schoolCode}:
    parameters:
      - name: schoolCode
        in: path
        description: The school code to query with.
        required: true
        schema:
          $ref: '#/components/schemas/SchoolCode'
        example: F101110100010
    get:
      operationId: getSchool
      summary: Get school information
      description: Get the school information for the given school code.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSchoolResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/school/forward-lookup/
      tags:
        - school
  /school/:
    parameters:
      - name: q
        in: query
        description: The query to search against the school database with.
        required: true
        schema:
          $ref: '#/components/schemas/SchoolSearchQuery'
      - name: offset
        in: query
        schema:
          $ref: '#/components/schemas/Offset'
      - name: limit
        in: query
        schema:
          $ref: '#/components/schemas/Limit'
      - name: facet_area
        in: query
        description: |
          The facet representation at which level the resulting facets of prefecture and city will be shaped.
          The facet should be written in Japanese.
        schema:
          type: string
          example: /東京都
          pattern: ^/([^/]+/?)*$
      - name: facet_prefecture
        in: query
        description: |
          The facet representation at which level the resulting facets of prefecture will be shaped.
          The facet should be written in Japanese.
        schema:
          type: string
          example: /東京都
          pattern: ^/([^/]+/?)*$
      - name: facet_type
        in: query
        description: |
          The facet representation at which level the resulting facets of type will be shaped.
          The facet should be written in Japanese.
        schema:
          type: string
          example: /大学
          enum:
            - /
            - /幼稚園
            - /幼保連携型認定こども園
            - /小学校
            - /中学校
            - /義務教育学校
            - /高等学校
            - /中等教育学校
            - /特別支援学校
            - /大学
            - /短期大学
            - /高等専門学校
            - /専修学校
            - /各種学校
      - name: facet_establishment_type
        in: query
        description: |
          The facet representation at which level the resulting facets of establishment type will be shaped.
          The facet should be written in Japanese.
        schema:
          type: string
          example: /公立
          enum:
            - /
            - /国立
            - /公立
            - /私立
      - name: facet_branch
        in: query
        description: |
          The facet representation at which level the resulting facets of branch will be shaped.
          The facet should be written in Japanese.
        schema:
          type: string
          example: /本校
          enum:
            - /
            - /本校
            - /分校
            - /廃校
    get:
      operationId: searchSchool
      summary: Search school information
      description: Search the school information by the query.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchSchoolResponse'
      externalDocs:
        url: https://kenall.jp/docs/API/school/rev-lookup/
      tags:
        - school
components:
  securitySchemes:
    Token:
      type: apiKey
      in: header
      name: Authorization
      description: Enter your token in the format **Token &lt;token>**
  schemas:
    KenAllAPIVersion:
      description: The minor version of the KEN ALL API.
      type: string
      example: '2024-01-01'
      enum:
        - '2024-01-01'
    DataVersion:
      description: The version of the data, in the form of `"YYYY-MM-DD"` where Y, M, and D represent digits of the year, month, and day the source data became available.
      type: string
      example: '2022-01-31'
      pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
    BankCode:
      type: string
      pattern: ^[0-9]{4}$
    Bank:
      description: Information about the bank.
      type: object
      properties:
        code:
          $ref: '#/components/schemas/BankCode'
        name:
          description: The name of the bank.
          type: string
          example: みずほ
        katakana:
          description: Reading of the bank name in Katakana.
          type: string
          example: ミズホ
        hiragana:
          description: Reading of the bank name in Hiragana.
          type: string
          example: みずほ
        romaji:
          description: The "romanized" reading of the bank name.
          type: string
          example: mizuho
      required:
        - code
        - name
        - katakana
        - hiragana
        - romaji
    GetBanksResponse:
      type: object
      properties:
        version:
          $ref: '#/components/schemas/DataVersion'
        data:
          type: array
          items:
            $ref: '#/components/schemas/Bank'
    GetBankResponse:
      type: object
      properties:
        version:
          $ref: '#/components/schemas/DataVersion'
        data:
          $ref: '#/components/schemas/Bank'
          nullable: true
    BankBranchCode:
      description: The code of the bank branch.
      type: string
      pattern: ^[0-9]{3}$
      example: '188'
    BankBranch:
      description: Information about the bank branch.
      type: object
      properties:
        code:
          $ref: '#/components/schemas/BankBranchCode'
        name:
          description: The name of the bank branch.
          type: string
          example: 恵比寿
        katakana:
          description: Reading of the bank branch name in Katakana.
          type: string
          example: エビス
        hiragana:
          description: Reading of the bank branch name in Hiragana.
          type: string
          example: えびす
        romaji:
          description: The "romanized" reading of the bank branch name.
          type: string
          example: ebisu
      required:
        - code
        - name
        - katakana
        - hiragana
        - romaji
    GetBankBranchesResponse:
      type: object
      properties:
        version:
          $ref: '#/components/schemas/DataVersion'
        data:
          type: object
          properties:
            bank:
              $ref: '#/components/schemas/Bank'
            branches:
              type: object
              additionalProperties:
                $ref: '#/components/schemas/BankBranch'
    GetBankBranchResponse:
      type: object
      properties:
        version:
          $ref: '#/components/schemas/DataVersion'
        data:
          type: object
          properties:
            bank:
              $ref: '#/components/schemas/Bank'
            branch:
              $ref: '#/components/schemas/BankBranch'
    Limit:
      description: The maximum number of items that you want to retrieve.
      type: integer
      example: 3
      default: 100
      maximum: 100
      minimum: 1
    CorporateInfoSearchQuery:
      description: The query to search against the corporate information database.
      type: string
      minLength: 1
      example: 東京都 AND ケンオール
    BatchSearchCorporateInfoRequest:
      type: object
      required:
        - queries
      properties:
        default_limit:
          default: 1
          $ref: '#/components/schemas/Limit'
          maximum: 5
        queries:
          type: array
          items:
            type: object
            required:
              - q
            properties:
              q:
                $ref: '#/components/schemas/CorporateInfoSearchQuery'
              limit:
                default: 1
                $ref: '#/components/schemas/Limit'
                maximum: 5
              id:
                type: string
          maxItems: 1000
          minItems: 1
    CanonicalCorporateNumber:
      type: string
      pattern: ^[0-9]{13}$
      example: '2021001052596'
    ISO8601Date:
      type: string
      format: date
      example: '2000-01-01'
    NTAImageID:
      type: string
      example: '12345678'
      pattern: ^[0-9]{8}$
    InvoiceIssuerNumber:
      type: string
      pattern: ^T[0-9]{13}$
      example: T2021001052596
    PostalCode:
      type: string
      pattern: ^[0-9]{7}$
      example: '1000001'
    JISX0402:
      description: |
        The 5 digit Japanese municipality code (全国地方公共団体コード) for the administrative division where the place this object represents belongs.
      type: string
      pattern: ^[0-9]{5}$
    NTAAddress:
      description: The address of the legal entity.
      type: object
      properties:
        postal_code:
          description: The postal code for the place this object represents.
          $ref: '#/components/schemas/PostalCode'
          nullable: true
        jisx0402:
          $ref: '#/components/schemas/JISX0402'
          nullable: true
        prefecture:
          description: The name of the prefecture in Kanji.
          type: string
          example: 東京都
          nullable: true
        prefecture_kana:
          description: The reading of the name of the prefecture in katakana.
          type: string
          example: トウキョウト
          nullable: true
        prefecture_roman:
          description: The "romanized" reading of the name of the prefecture.
          type: string
          example: Tokyo
          nullable: true
        city:
          description: |
            The name of the city.

            The county name may precede it, or the name of the ward would follow it in case the city has ordinance-designated wards.
          type: string
          example: 港区
          nullable: true
        city_kana:
          description: |
            The reading of the name of the city in katakana.

            The county name may precede it, or the name of the ward would follow it in case the city has ordinance-designated wards.
          type: string
          example: ミナトク
          nullable: true
        city_roman:
          description: |
            The "romanized" reading of the name of the city in katakana.

            The county name may precede it, or the name of the ward would follow it in case the city has ordinance-designated wards.
          type: string
          example: Minato-ku
          nullable: true
        street_number:
          description: |
            The part of the address line below the second-level administrative division.

            The string is preprocessed so it would fit within 300 characters by NTA if it is longer than that length actually.

            If the text uses a Kanji which is not JIS Level 1 or 2, The Kanji will be converted into correspondent JIS Level 1 or 2 Kanjis.

            You can refer to the un-normalized version of the text from a correspondent image file.

            See `address_image_id` for details.
          type: string
          example: 麹町３丁目１２－１４麹町駅前ヒルトップ８階
          nullable: true
        town:
          description: The extracted name of the third-level administrative division, which correspond to the "o-aza", or the "cho" with its chome part stripped out.
          type: string
          example: 麹町
          nullable: true
        kyoto_street:
          description: The extracted instructional phrase (通り名 in Japanese) very specific to Kyoto city, which helps one to locate the place out of the area of the town.
          type: string
          example: 先斗町通蛸薬師上る
          nullable: true
        block_lot_num:
          description: The reconstructed numerical part of the address line below the second-level administrative division.
          type: string
          example: 3-12-14
          nullable: true
        building:
          description: The extracted building name in the address line below the second-level administrative division, without the floor name.'
          type: string
          example: 麹町駅前ヒルトップ
          nullable: true
        floor_room:
          description: The extracted floor name and room number in the address line below the second-level administrative division.
          type: string
          example: ８階８０１
          nullable: true
    NTACorporateInfo_2025-01-01:
      description: The data that match to the query.
      type: object
      properties:
        sequence_number:
          description: The revision number of the corporate record, non zero-padded 8 digit number at maximum.
          type: number
          example: 12345678
        corporate_number:
          description: The corporate number, 12 digit number plus 1 check digit.
          $ref: '#/components/schemas/CanonicalCorporateNumber'
        process:
          description: |
            The reason why the record was added.
            * `1` - `NEW`, Indicates new record.
            * `11` - `NAME_CHANGED`, Indicates trade name or corporate name was changed.
            * `12` - `DOMESTIC_ADDRESS_CHANGED`, Indicates domestic address was changed.
            * `13` - `OVERSEAS_ADDRESS_CHANGED`, Indicates overseas address was changed.
            * `21` - `REGISTRATION_RECORD_CLOSED`, Indicates registration record was closed.
            * `22` - `REGISTRATION_RECORD_REOPENED`, Indicates registration record was reopened.
            * `71` - `ABSORPTION_MERGER_COMPLETED`, Indicates absorption merger completed.
            * `72` - `ABSORPTION_MERGER_INVALIDATED`, Indicates absorption merger was invalidated.
            * `81` - `REGISTRATION_RECORD_ERASED`, Indicates registration record was erased.
            * `99` - `DELETED`, Indicates the record was deleted.
          type: number
          example: 1
          enum:
            - 1
            - 11
            - 12
            - 13
            - 21
            - 22
            - 71
            - 72
            - 81
            - 99
        correct:
          description: |
            The flag if the record was corrected or not.
            * 0 - Indicates the record was corrected.
            * 1 - Indicates the record was not corrected.
          type: number
          example: 0
          enum:
            - 0
            - 1
        update_date:
          description: |
            The date the record was updated, in the form of `"YYYY-MM-DD"` where Y, M, and D represent digits of the year, month, and day.
            Unlike `change_date` and `published_date`, this field indicates the actual update date of the corporate information in NTA data.
            See `change_date` and `published_date` for further information.
          $ref: '#/components/schemas/ISO8601Date'
        change_date:
          description: |
            The changed date of the record, in the form of `"YYYY-MM-DD"` where Y, M, and D represent digits of the year, month, and day.
            The meaning of "changed" depends on other contexts of the record.
            If `process` is `NEW`, the changed date means the corporate number was assigned.
            If `process` is not `NEW` and `kind` is not a public entity, the changed date means the date related to the process.
            If `kind` is a public entity, the changed date means when the process occurred.
          $ref: '#/components/schemas/ISO8601Date'
        name:
          description: |
            The trade name or corporate name in Japanese.
            All the characters are rendered in full-width form.
            The string is preprocessed so it would fit within 150 characters by NTA if it is longer than that length actually.
            If the text uses a Kanji which is not JIS Level 1 or 2, The Kanji will be converted into correspondent JIS Level 1 or 2 Kanjis.
            You can refer to the un-normalized version of the text from a correspondent image file.
            See `name_image_id` for details.
          type: string
          example: ケンオール株式会社
        name_image_id:
          description: |
            The trade name or corporate name image ID, 8 digit number at maximum.
            If you want to obtain the image file, please refer to https://www.houjin-bangou.nta.go.jp/image?imageid=NAME_IMAGE_ID,
            where NAME_IMAGE_ID is a zero-padded 8 digit number of the ID.
            For example, if the ID is `100`, You can get the image file from https://www.houjin-bangou.nta.go.jp/image?imageid=00000100.
            If `name` is not normalized, This value is set to `null`.
          type: string
          example: '12345678'
          nullable: true
          pattern: ^[0-9]{1,8}$
        kind:
          description: |
            The kind of the corporate.
            * `101` - `NATIONAL_PUBLIC_ENTITY`, National public entity
            * `201` - `LOCAL_PUBLIC_ENTITY`, Local public entity
            * `301` - `KABUSHIKI_KAISHA`, Limited liability company by share, aka K.K.
            * `302` - `YUGEN_KAISHA`, Old style of limited liability company not by share
            * `303` - `GOMEI_KAISHA`, General partnership company
            * `304` - `GOSHI_KAISHA`, Limited partnership company
            * `305` - `GODO_KAISHA`, Limited liability company, aka G.K.
            * `399` - `OTHER_COMPANY`, Other types of company
            * `401` - `FOREIGN_COMPANY`, Foreign company
            * `499` - `OTHER`, Other corporate kinds which do not belong to the above
          type: number
          example: 301
          enum:
            - 101
            - 201
            - 301
            - 302
            - 303
            - 304
            - 305
            - 399
            - 401
            - 499
        prefecture_name:
          description: The name of the prefecture in Kanji.
          type: string
          example: 東京都
          nullable: true
        city_name:
          description: |
            The name of the city.
            The county name may precede it, or the name of the ward would follow it in case the city has ordinance-designated wards.
          type: string
          example: 各務原市
          nullable: true
        published_date:
          description: |
            The published date of the record, in the form of `"YYYY-MM-DD"` where Y, M, and D represent digits of the year, month, and day the record was published.
            Please note that this field doesn't indicate the actual date of the updated date of the record.
            The published date may be later than the updated date. Please see `update_date` for further details.
          $ref: '#/components/schemas/ISO8601Date'
        hihyoji:
          description: |
            If the corporate address is confirmed that it doesn't exist, this value is set to `"1"`.
            * `0` - Search target.
            * `1` - Excluded from the search.
          type: number
          example: 0
          enum:
            - 0
            - 1
        furigana:
          description: |
            The furigana correspondent to the corporate name.

            If the furigana is not available, this value is set to blank.
          type: string
          example: ケンオール
        en_name:
          description: |
            The trade name or corporate name in English, in halfwidth characters, 300 characters at maximum.

            If the English name is not provided, this value is set to blank.
          type: string
          example: Rumoi Summary Court
        en_address_outside:
          description: |
            The corporate address outside of Japan, written in alphabetical form.
            The string is preprocessed so it would fit within 600 characters by NTA if it is longer than that length actually.

            If the address is not provided, this value is set to `null`.
          type: string
          example: 35 Selegie Road, suiteA-2 Honolulu, Maryland 21401, U.S.A.
          nullable: true
        en_address_line:
          description: |
            The address without prefecture in English with hankaku format.
            The string is preprocessed so it would fit within 600 characters by NTA if it is longer than that length actually.

            If the address is not provided, this value is set to `null`.
          type: string
          example: 4-7, Kashiwagicho, Tomakomai shi
          nullable: true
        assignment_date:
          description: |
            The date of the record when the corporate number was assigned, in the form of `"YYYY-MM-DD"` where Y, M, and D represent digits of the year, month, and day.
          $ref: '#/components/schemas/ISO8601Date'
        change_cause:
          description: |
            The reason why the process occurred, 500 characters at maximum.
            Both zenkaku and hankaku format are allowed.
          type: string
          example: 令和２年５月１日○○株式会社に合併し解散
        successor_corporate_number:
          description: |
            The corporate number of the successor of the closed corporate, 12 digit number plus 1 check digit.

            If the corporate is not closed, this value is set to `null`.
          $ref: '#/components/schemas/CanonicalCorporateNumber'
          nullable: true
        close_cause:
          description: |
            The reason the corporate was closed.
            If the corporate is not closed, this value is set to `null`.

            * `1` - `LIQUIDATION_COMPLETED`, Liquidation completed
            * `11` - `DISSOLUTION_BY_MERGER`, Dissolution by merger
            * `21` - `CLOSED_BY_REGISTERER`, A registerer closed the corporate
            * `31` - `OTHER`, Other reasons
          type: number
          enum:
            - 1
            - 11
            - 21
            - 31
          nullable: true
        close_date:
          description: |
            The date of the record when the corporate was closed, in the form of `"YYYY-MM-DD"` where Y, M, and D represent digits of the year, month, and day.
            If the corporate is not closed, this value is set to `null`.
          $ref: '#/components/schemas/ISO8601Date'
          nullable: true
        address_outside_image_id:
          description: |
            The foreign address image ID, 8 digit number at maximum.

            If you want to obtain the image file, please refer to https://www.houjin-bangou.nta.go.jp/image?imageid=ADDRESS_IMAGE_ID,
            where ADDRESS_IMAGE_ID is a zero-padded 8 digit number of the ID.

            For example, if the ID is `100`, You can get the image file from https://www.houjin-bangou.nta.go.jp/image?imageid=00000100.

            If `address_outside` is not normalized, this value is set to `null`.
          $ref: '#/components/schemas/NTAImageID'
          nullable: true
        address_outside:
          description: |
            The corporate address outside of Japan, written in Japanese.

            The string is preprocessed so it would fit within 300 characters by NTA if it is longer than that length actually.

            If the text uses a Kanji which is not JIS Level 1 or 2, The Kanji will be converted into correspondent JIS Level 1 or 2 Kanjis.
            You can refer to the un-normalized version of the text from a correspondent image file.

            See `address_outside_image_id` for details.
          type: string
          example: アメリカ合衆国ハワイ州２２４１１メリーランド州トライオン・ストリート２０
        qualified_invoice_issuer_number:
          description: The qualified invoice issuer number of the entity.
          $ref: '#/components/schemas/InvoiceIssuerNumber'
        address_image_id:
          description: |
            The address image ID, 8 digit number at maximum.

            If you want to obtain the image file, please refer to https://www.houjin-bangou.nta.go.jp/image?imageid=ADDRESS_IMAGE_ID,
            where ADDRESS_IMAGE_ID is a zero-padded 8 digit number of the ID.

            For example, if the ID is `100`, You can get the image file from https://www.houjin-bangou.nta.go.jp/image?imageid=00000100.

            If `street_number` is not normalized, this value is set to `null`.
          $ref: '#/components/schemas/NTAImageID'
          nullable: true
        address:
          $ref: '#/components/schemas/NTAAddress'
    Facet:
      description: |
        A `Facet` is a tuple that stores a facet representation of some level and the number of the items in the result's subset that belong to the facet.
        A facet representation consist of hierarchical facet strings delimited by slashes.
      type: array
      items:
        anyOf:
          - type: string
          - type: integer
      maxItems: 2
      minItems: 2
      x-examples:
        Example:
          - /string/string
          - 1
    Facets:
      description: |
        A `Facet` is a tuple that stores a facet representation of some level and the number of the items in the result's subset that belong to the facet.
        A facet representation consist of hierarchical facet strings delimited by slashes.
      type: object
      nullable: true
      properties:
        area:
          description: The area facet of the result.
          type: array
          items:
            $ref: '#/components/schemas/Facet'
          example:
            - - /東京都/港区
              - 1
        kind:
          description: The kind facet of the result.
          type: array
          items:
            $ref: '#/components/schemas/Facet'
          example:
            - - /株式会社
              - 1
        process:
          description: The process facet of the result.
          type: array
          items:
            $ref: '#/components/schemas/Facet'
          example:
            - - /国内所在地の変更
              - 1
        close_cause:
          description: The close cause facet of the result.
          type: array
          items:
            $ref: '#/components/schemas/Facet'
          example:
            - - /その他
              - 1
    BatchSearchCorporateInfoResponse:
      type: object
      properties:
        version:
          $ref: '#/components/schemas/DataVersion'
        params:
          type: object
          properties:
            default_q:
              $ref: '#/components/schemas/CorporateInfoSearchQuery'
            default_limit:
              $ref: '#/components/schemas/Limit'
        records:
          type: array
          items:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/NTACorporateInfo_2025-01-01'
              query:
                description: The query that the search has been performed for.
                example: name:ケンオール
                type: string
              count:
                description: The number of the resulting items in total.
                type: integer
                example: 1
                minimum: 0
              offset:
                description: The offset from which the result has been retrieved.
                type: integer
                example: 0
                minimum: 0
              limit:
                description: The number of items that have been intended, at most, to retrieve from the result.
                type: integer
                example: 100
                maximum: 100
                minimum: 1
              facets:
                $ref: '#/components/schemas/Facets'
              id:
                type: string
                nullable: true
    AddressSearchQuery:
      description: The query to search against the address database with.
      type: string
      minLength: 1
      example: prefecture:東京都 千代田区
    BatchSearchAddressesRequest:
      type: object
      required:
        - queries
      properties:
        default_q:
          $ref: '#/components/schemas/AddressSearchQuery'
          nullable: true
        default_limit:
          description: |
            The default number of results to return per query, applied to any query
            that does not specify its own `limit`.
          type: integer
          default: 1
          maximum: 5
          minimum: 1
        queries:
          description: |
            The list of individual queries to search for. Each query requires either
            `q` or `t` to be specified.
          type: array
          items:
            type: object
            properties:
              q:
                $ref: '#/components/schemas/AddressSearchQuery'
              t:
                description: The address to normalize and search against the address database with. Either `q` or `t` is required.
                type: string
                example: 東京都千代田区千代田1-1
                minLength: 1
              limit:
                description: The number of results to return for this query.
                type: integer
                default: 1
                maximum: 5
                minimum: 1
          maxItems: 1000
          minItems: 1
    AddressNormalizationResult:
      description: The normalized components of the address provided with `t`
      type: object
      properties:
        prefecture:
          description: The prefecture of the normalized address.
          type: string
          nullable: true
        county:
          description: The country, if applicable, of the normalized address.
          type: string
          nullable: true
        city:
          description: The city of the normalized address.
          type: string
          nullable: true
        city_ward:
          description: The city ward, if any, of the normalized address.
          type: string
          nullable: true
        town:
          description: The town of the normalized address.
          type: string
          nullable: true
        kyoto_street:
          description: The instructional phrase (通り名 in Japanese) very specific to Kyoto city, which helps one to locate the place out of the area of the town.
          type: string
          nullable: true
        block_lot_num:
          description: The reconstructed numerical part of the address line below the second-level administrative division.
          type: string
          nullable: true
        building:
          description: The name of the building/suite, if any, in the normalized address.
          type: string
          nullable: true
        floor_room:
          description: The floor number and room number of the building, if any, in the normalized address.
          type: string
          nullable: true
    Count:
      description: The number of the resulting items in total.
      type: integer
    Offset:
      description: The offset from which you want to retrieve the result.
      type: integer
      example: 0
      default: 0
      maximum: 5000000
      minimum: 0
    OfficeLocation:
      type: object
      properties:
        block_lot:
          description: |
            The address line by which the division is postally reachable, in the sense it doesn't necessarily point to the actual address of its business place.
          type: string
          example: ２丁目１－２
        block_lot_num:
          description: |
            The reconstructed numerical part of the address line below the second-level administrative division.
          type: string
          example: 2-1-2
        code_type:
          description: |
            `0` indicates the postal code most likely describes a actual business place, and 1 indicates it refers to a post office box.
          type: number
        name:
          description: |
            The name of the organization, or the division of such.
          type: string
          example: 総務省
        name_kana:
          description: |
            The reading of the division's name.
          type: string
          example: ｿｳﾑｼﾖｳ
        post_office:
          description: |
            The name of the post office that handles the postal items for the division.
          type: string
          example: 銀座
    Address:
      type: object
      properties:
        building:
          description: |
            The name of the building, in case the postal code is designated to a building, or its each floor.

            This is a synthetic value; that means it resulted from our original interpretation of the town_raw data, and the corresponding value might well not be present in the original KEN_ALL data provided by Japan Post
          type: string
        city:
          description: |
            The name of the city. The county name may precede it, or the name of the ward would follow it in case the city has ordinance-designated wards.
          type: string
          example: 大阪市北区
        city_kana:
          description: |
            The reading of the name of the city in katakana.
          type: string
          example: オオサカシキタク
        city_roman:
          description: |
            The "romanized" reading of the name of the city.
          type: string
          example: Kita-ku, Osaka
        city_ward:
          description: |
            The name of the ordinance-designated ward, if applicable.
          type: string
          example: 北区
        city_ward_kana:
          description: |
            The reading of the name of the ordinance-designated ward in katakana.
          type: string
          example: キタク
        city_ward_roman:
          description: |
            The "romanized" reading of the name of the city.
          type: string
          example: Kita-ku
        city_without_county_and_ward:
          description: |
            The name of the city, with the county and ordinance-designated ward part removed.
          type: string
          example: 大阪市
        city_without_county_and_ward_kana:
          description: |
            The reading of the name of the city, with the county and ordinance-designated ward part removed.
          type: string
          example: オオサカシ
        city_without_county_and_ward_roman:
          description: |
            The "romanized" reading of the name of the city, with the county and ordinance-designated ward part removed.
          type: string
          example: Osaka
        corporation:
          $ref: '#/components/schemas/OfficeLocation'
          nullable: true
        county:
          description: |
            The name of the county.
          type: string
          example: 秩父郡
        county_kana:
          description: |
            The reading of the name of the county in katakana.
          type: string
          example: チチブグン
        county_roman:
          description: |
            The "romanized" reading of the name of the county.
          type: string
          example: Chichibu
        floor:
          description: |
            The floor of the building.

            This is a synthetic value; that means it resulted from our original interpretation of the town_raw data, and the corresponding value might well not be present in the original KEN_ALL data provided by Japan Post.
          type: string
          example: １階
        jisx0402:
          $ref: '#/components/schemas/JISX0402'
        koaza:
          description: |
            The name of the (non-administrative) sub-area of the town.

            This is a synthetic value; that means it resulted from our original interpretation of the town_raw data, and the corresponding value might well not be present in the original KEN_ALL data provided by Japan Post.
          type: string
          example: １丁目
        kyoto_street:
          description: |
            The instructional phrase (通り名 in Japanese) very specific to Kyoto city, which helps one to locate the place out of the area of the town.

            This is a synthetic value; that means it resulted from our original interpretation of the town_raw data, and the corresponding value might well not be present in the original KEN_ALL data provided by Japan Post.
          type: string
          example: 先斗町通蛸薬師上る
        old_code:
          description: |
            The "old" postal code that was used before February 2, 1998.
          type: string
        postal_code:
          description: |
            The postal code for the place this object represents.
          type: string
        prefecture:
          description: |
            The name of the prefecture in Kanji.
          type: string
          example: 東京都
        prefecture_kana:
          description: |
            The reading of the name of the prefecture in katakana.
          type: string
          example: トウキョウト
        prefecture_roman:
          description: |
            The "romanized" reading of the name of the prefecture.
          type: string
          example: Tokyo
        town:
          description: |-
            The name of the area that usually corresponds to lowest part of the administrative division levels ("town").
            This is a synthetic value; that means it resulted from our original interpretation of the town_raw data, and the corresponding value might well not be present in the original KEN_ALL data provided by Japan Post.
          type: string
          example: 箱石
        town_kana:
          description: |
            The reading of the name of the town.

            This is a synthetic value; that means it resulted from our original interpretation of the town_raw data, and the corresponding value might well not be present in the original KEN_ALL data provided by Japan Post.
          type: string
          example: ハコイシ
        town_roman:
          description: |
            The "romanized" reading of the name of the town.

            This is a synthetic value; that means it resulted from our original interpretation of the town_raw data, and the corresponding value might well not be present in the original KEN_ALL data provided by Japan Post.
          type: string
          example: Hakoishi
        town_addressed_koaza:
          description: |
            If set to `true`, it indicates the area has multiple blocks (koaza's), and the lands that belong to each block are indexed on a per-block basis, not a per-area basis. That implies the address cannot be determined with the area name / land number pair.
          type: boolean
        town_chome:
          description: |
            If set to `true`, it indicates the blocks belonging to the area are indexed with chome numbers.
          type: boolean
        town_jukyohyoji:
          description: |
            If set to `true`, it indicates the addressing system according to the per-dwelling addressing representation law ([住居表示に関する法律](https://laws.e-gov.go.jp/law/337AC0000000119)) is employed in the area.
          type: boolean
        town_multi:
          description: |
            If set to `true`, it indicates the same postal code is assigned to the multiple areas. That implies that the address cannot be determined with the postal code and the street number (block number, land number, etc.).
          type: boolean
        town_partial:
          description: |
            If set to `true`, it indicates the area has two or more postal codes assigned (for instance, each block is assigned a different postal code), and the postal code of the record is just one of them. That implies the postal code cannot be determined just with the area name.
          type: boolean
        town_raw:
          description: |
            The unprocessed value(s) of the name of the area. It may consist of multiple (non-administrative) sub-areas.

            Note that they don't always represent the actual name of the area, in case they are expediently designated by Japan Post.
          type: string
          example: 岩手県宮古市箱石（第２地割「７０〜１３６」〜第４地割「３〜１１」）
        town_kana_raw:
          description: |
            The reading of the unprocessed value(s) of the name of the area.
          type: string
          example: イワテケンミヤコシハコイシ(ダイ2チワリ<70-136>-ダイ4チワリ<3-11>)
        update_reason:
          description: |
            The value that represents the reason how the record is changed, when update_status is set to non-zero value.
          type: number
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
        update_status:
          description: |
            The value that indicates if the record is updated or deleted for this version.
          type: number
          enum:
            - 0
            - 1
            - 2
      required:
        - jisx0402
        - old_code
        - postal_code
        - prefecture
        - prefecture_kana
        - prefecture_roman
        - county
        - county_kana
        - county_roman
        - city_without_county_and_ward
        - city_without_county_and_ward_kana
        - city_without_county_and_ward_roman
        - city_ward
        - city_ward_kana
        - city_ward_roman
        - city
        - city_kana
        - city_roman
        - town
        - town_kana
        - town_roman
        - koaza
        - kyoto_street
        - building
        - floor
        - town_partial
        - town_addressed_koaza
        - town_chome
        - town_multi
        - town_raw
        - town_kana_raw
        - corporation
        - town_jukyohyoji
        - update_status
        - update_reason
    BatchSearchAddressesResponse:
      type: object
      properties:
        version:
          $ref: '#/components/schemas/DataVersion'
        params:
          type: object
          properties:
            default_q:
              $ref: '#/components/schemas/AddressSearchQuery'
            default_limit:
              $ref: '#/components/schemas/Limit'
        records:
          type: array
          items:
            type: object
            properties:
              query:
                description: The query that the search has been performed for.
                allOf:
                  - $ref: '#/components/schemas/AddressNormalizationResult'
                  - type: object
                    properties:
                      q:
                        description: The verbatim value provided as `q` in the parameters.
                        type: string
                        nullable: true
                      t:
                        description: The verbatim value provided as `t` in the parameters.
                        type: string
                        nullable: true
                type: object
              count:
                $ref: '#/components/schemas/Count'
              offset:
                $ref: '#/components/schemas/Offset'
              limit:
                $ref: '#/components/schemas/Limit'
              facets:
                $ref: '#/components/schemas/Facets'
              status:
                description: The status of the search for this individual query.
                type: object
                properties:
                  code:
                    description: The status code for this query's search result.
                    type: integer
                  message:
                    description: The status message for this query's search result.
                    type: string
              data:
                type: array
                items:
                  $ref: '#/components/schemas/Address'
    CheckBusinessDayResponse:
      type: object
      properties:
        result:
          description: The result of the check. `true` if the date is a business day (i.e. not a holiday, weekend, or other non-business day), `false` otherwise.
          type: boolean
          example: true
    Year:
      type: integer
      example: 2000
      maximum: 2100
      minimum: 1900
    Month:
      type: integer
      example: 1
      maximum: 12
      minimum: 1
    GetBusinessDayPeriodResponse:
      type: object
      required:
        - first
        - last
      properties:
        first:
          description: The first business day of the specified year and month.
          $ref: '#/components/schemas/ISO8601Date'
        last:
          description: The last business day of the specified year and month.
          $ref: '#/components/schemas/ISO8601Date'
    CorporateInfoSearchMode:
      description: |
        The search mode.
        If set to `partial`, the API will return partially match results.
        If set to `exact`, the result includes only the corporate which name without corporate kind exactly matches the query.
        Please note that the `exact` mode doesn't match a query that contains corporate kind.
        For example, the query `ケンオール株式会社` doesn't return any result in the `exact` mode, but `ケンオール` will return the result.
        You can search with a corporate name with a corporate kind in `exact_with_kind` mode.
      type: string
      example: exact
      default: partial
      enum:
        - partial
        - exact_with_kind
        - exact
    NTACorporateInfo:
      description: The data that match to the query.
      type: object
      properties:
        sequence_number:
          description: The revision number of the corporate record, non zero-padded 8 digit number at maximum.
          type: number
          example: 12345678
        corporate_number:
          description: The corporate number, 12 digit number plus 1 check digit.
          $ref: '#/components/schemas/CanonicalCorporateNumber'
        process:
          description: |
            The reason why the record was added.
            * `1` - `NEW`, Indicates new record.
            * `11` - `NAME_CHANGED`, Indicates trade name or corporate name was changed.
            * `12` - `DOMESTIC_ADDRESS_CHANGED`, Indicates domestic address was changed.
            * `13` - `OVERSEAS_ADDRESS_CHANGED`, Indicates overseas address was changed.
            * `21` - `REGISTRATION_RECORD_CLOSED`, Indicates registration record was closed.
            * `22` - `REGISTRATION_RECORD_REOPENED`, Indicates registration record was reopened.
            * `71` - `ABSORPTION_MERGER_COMPLETED`, Indicates absorption merger completed.
            * `72` - `ABSORPTION_MERGER_INVALIDATED`, Indicates absorption merger was invalidated.
            * `81` - `REGISTRATION_RECORD_ERASED`, Indicates registration record was erased.
            * `99` - `DELETED`, Indicates the record was deleted.
          type: number
          example: 1
          enum:
            - 1
            - 11
            - 12
            - 13
            - 21
            - 22
            - 71
            - 72
            - 81
            - 99
        correct:
          description: |
            The flag if the record was corrected or not.
            * 0 - Indicates the record was corrected.
            * 1 - Indicates the record was not corrected.
          type: number
          example: 0
          enum:
            - 0
            - 1
        update_date:
          description: |
            The date the record was updated, in the form of `"YYYY-MM-DD"` where Y, M, and D represent digits of the year, month, and day.
            Unlike `change_date` and `published_date`, this field indicates the actual update date of the corporate information in NTA data.
            See `change_date` and `published_date` for further information.
          $ref: '#/components/schemas/ISO8601Date'
        change_date:
          description: |
            The changed date of the record, in the form of `"YYYY-MM-DD"` where Y, M, and D represent digits of the year, month, and day.
            The meaning of "changed" depends on other contexts of the record.
            If `process` is `NEW`, the changed date means the corporate number was assigned.
            If `process` is not `NEW` and `kind` is not a public entity, the changed date means the date related to the process.
            If `kind` is a public entity, the changed date means when the process occurred.
          $ref: '#/components/schemas/ISO8601Date'
        name:
          description: |
            The trade name or corporate name in Japanese.
            All the characters are rendered in full-width form.
            The string is preprocessed so it would fit within 150 characters by NTA if it is longer than that length actually.
            If the text uses a Kanji which is not JIS Level 1 or 2, The Kanji will be converted into correspondent JIS Level 1 or 2 Kanjis.
            You can refer to the un-normalized version of the text from a correspondent image file.
            See `name_image_id` for details.
          type: string
          example: ケンオール株式会社
        name_image_id:
          description: |
            The trade name or corporate name image ID, 8 digit number at maximum.
            If you want to obtain the image file, please refer to https://www.houjin-bangou.nta.go.jp/image?imageid=NAME_IMAGE_ID,
            where NAME_IMAGE_ID is a zero-padded 8 digit number of the ID.
            For example, if the ID is `100`, You can get the image file from https://www.houjin-bangou.nta.go.jp/image?imageid=00000100.
            If `name` is not normalized, This value is set to `null`.
          type: string
          example: '12345678'
          nullable: true
          pattern: ^[0-9]{1,8}$
        kind:
          description: |
            The kind of the corporate.
            * `101` - `NATIONAL_PUBLIC_ENTITY`, National public entity
            * `201` - `LOCAL_PUBLIC_ENTITY`, Local public entity
            * `301` - `KABUSHIKI_KAISHA`, Limited liability company by share, aka K.K.
            * `302` - `YUGEN_KAISHA`, Old style of limited liability company not by share
            * `303` - `GOMEI_KAISHA`, General partnership company
            * `304` - `GOSHI_KAISHA`, Limited partnership company
            * `305` - `GODO_KAISHA`, Limited liability company, aka G.K.
            * `399` - `OTHER_COMPANY`, Other types of company
            * `401` - `FOREIGN_COMPANY`, Foreign company
            * `499` - `OTHER`, Other corporate kinds which do not belong to the above
          type: number
          example: 301
          enum:
            - 101
            - 201
            - 301
            - 302
            - 303
            - 304
            - 305
            - 399
            - 401
            - 499
        prefecture_name:
          description: The name of the prefecture in Kanji.
          type: string
          example: 東京都
          nullable: true
        city_name:
          description: |
            The name of the city.
            The county name may precede it, or the name of the ward would follow it in case the city has ordinance-designated wards.
          type: string
          example: 各務原市
          nullable: true
        published_date:
          description: |
            The published date of the record, in the form of `"YYYY-MM-DD"` where Y, M, and D represent digits of the year, month, and day the record was published.
            Please note that this field doesn't indicate the actual date of the updated date of the record.
            The published date may be later than the updated date. Please see `update_date` for further details.
          $ref: '#/components/schemas/ISO8601Date'
        hihyoji:
          description: |
            If the corporate address is confirmed that it doesn't exist, this value is set to `"1"`.
            * `0` - Search target.
            * `1` - Excluded from the search.
          type: number
          example: 0
          enum:
            - 0
            - 1
        furigana:
          description: |
            The furigana correspondent to the corporate name.

            If the furigana is not available, this value is set to blank.
          type: string
          example: ケンオール
        en_name:
          description: |
            The trade name or corporate name in English, in halfwidth characters, 300 characters at maximum.

            If the English name is not provided, this value is set to blank.
          type: string
          example: Rumoi Summary Court
        en_address_outside:
          description: |
            The corporate address outside of Japan, written in alphabetical form.
            The string is preprocessed so it would fit within 600 characters by NTA if it is longer than that length actually.

            If the address is not provided, this value is set to `null`.
          type: string
          example: 35 Selegie Road, suiteA-2 Honolulu, Maryland 21401, U.S.A.
          nullable: true
        en_address_line:
          description: |
            The address without prefecture in English with hankaku format.
            The string is preprocessed so it would fit within 600 characters by NTA if it is longer than that length actually.

            If the address is not provided, this value is set to `null`.
          type: string
          example: 4-7, Kashiwagicho, Tomakomai shi
          nullable: true
        assignment_date:
          description: |
            The date of the record when the corporate number was assigned, in the form of `"YYYY-MM-DD"` where Y, M, and D represent digits of the year, month, and day.
          $ref: '#/components/schemas/ISO8601Date'
        change_cause:
          description: |
            The reason why the process occurred, 500 characters at maximum.
            Both zenkaku and hankaku format are allowed.
          type: string
          example: 令和２年５月１日○○株式会社に合併し解散
        successor_corporate_number:
          description: |
            The corporate number of the successor of the closed corporate, 12 digit number plus 1 check digit.

            If the corporate is not closed, this value is set to `null`.
          $ref: '#/components/schemas/CanonicalCorporateNumber'
          nullable: true
        close_cause:
          description: |
            The reason the corporate was closed.
            If the corporate is not closed, this value is set to `null`.
            * `'1'` - `LIQUIDATION_COMPLETED`, Liquidation completed
            * `'11'` - `DISSOLUTION_BY_MERGER`, Dissolution by merger
            * `'21'` - `CLOSED_BY_REGISTERER`, A registerer closed the corporate
            * `'31'` - `OTHER`, Other reasons
          type: string
          enum:
            - '1'
            - '11'
            - '21'
            - '31'
          nullable: true
        close_date:
          description: |
            The date of the record when the corporate was closed, in the form of `"YYYY-MM-DD"` where Y, M, and D represent digits of the year, month, and day.
            If the corporate is not closed, this value is set to `null`.
          $ref: '#/components/schemas/ISO8601Date'
          nullable: true
        address_outside_image_id:
          description: |
            The foreign address image ID, 8 digit number at maximum.

            If you want to obtain the image file, please refer to https://www.houjin-bangou.nta.go.jp/image?imageid=ADDRESS_IMAGE_ID,
            where ADDRESS_IMAGE_ID is a zero-padded 8 digit number of the ID.

            For example, if the ID is `100`, You can get the image file from https://www.houjin-bangou.nta.go.jp/image?imageid=00000100.

            If `address_outside` is not normalized, this value is set to `null`.
          $ref: '#/components/schemas/NTAImageID'
          nullable: true
        address_outside:
          description: |
            The corporate address outside of Japan, written in Japanese.

            The string is preprocessed so it would fit within 300 characters by NTA if it is longer than that length actually.

            If the text uses a Kanji which is not JIS Level 1 or 2, The Kanji will be converted into correspondent JIS Level 1 or 2 Kanjis.
            You can refer to the un-normalized version of the text from a correspondent image file.

            See `address_outside_image_id` for details.
          type: string
          example: アメリカ合衆国ハワイ州２２４１１メリーランド州トライオン・ストリート２０
        qualified_invoice_issuer_number:
          description: The qualified invoice issuer number of the entity.
          $ref: '#/components/schemas/InvoiceIssuerNumber'
        address_image_id:
          description: |
            The address image ID, 8 digit number at maximum.

            If you want to obtain the image file, please refer to https://www.houjin-bangou.nta.go.jp/image?imageid=ADDRESS_IMAGE_ID,
            where ADDRESS_IMAGE_ID is a zero-padded 8 digit number of the ID.

            For example, if the ID is `100`, You can get the image file from https://www.houjin-bangou.nta.go.jp/image?imageid=00000100.

            If `street_number` is not normalized, this value is set to `null`.
          $ref: '#/components/schemas/NTAImageID'
          nullable: true
        address:
          $ref: '#/components/schemas/NTAAddress'
    SearchCorporateInfoResponse:
      type: object
      properties:
        version:
          description: The version of the data, in the form of `"YYYY-MM-DD"` where Y, M, and D represent digits of the year, month, and day the source data became available.
          $ref: '#/components/schemas/DataVersion'
        data:
          description: The set of the data that match to the query.
          type: array
          items:
            $ref: '#/components/schemas/NTACorporateInfo'
        query:
          description: The query that the search has been performed for.
          example: name:ケンオール
          type: string
        count:
          description: The number of the resulting items in total.
          type: integer
          example: 1
          minimum: 0
        offset:
          description: The offset from which the result has been retrieved.
          type: integer
          example: 0
          minimum: 0
        limit:
          description: The number of items that have been intended, at most, to retrieve from the result.
          type: integer
          example: 100
          maximum: 100
          minimum: 1
        facets:
          description: |
            The facets of the result that form with the query.
            If no facet is given, those will be unavailable and this stores null.
            A `Facet` is a tuple that stores a facet representation of some level and the number of the items in the result's subset that belong to the facet.
            A facet representation consist of hierarchical facet strings delimited by slashes.
          type: object
          nullable: true
          properties:
            area:
              description: The area facet of the result.
              type: array
              items:
                $ref: '#/components/schemas/Facet'
              example:
                - - /東京都/港区
                  - 1
            kind:
              description: The kind facet of the result.
              type: array
              items:
                $ref: '#/components/schemas/Facet'
              example:
                - - /株式会社
                  - 1
            process:
              description: The process facet of the result.
              type: array
              items:
                $ref: '#/components/schemas/Facet'
              example:
                - - /国内所在地の変更
                  - 1
            close_cause:
              description: The close cause facet of the result.
              type: array
              items:
                $ref: '#/components/schemas/Facet'
              example:
                - - /その他
                  - 1
    GetCorporateInfoResponse:
      type: object
      properties:
        version:
          $ref: '#/components/schemas/DataVersion'
        data:
          $ref: '#/components/schemas/NTACorporateInfo'
    CorporateNumberListContainer:
      type: array
      items:
        $ref: '#/components/schemas/CanonicalCorporateNumber'
    ListCorporateInfoRadarTargetsResponse:
      description: The response payload of listCorporateInfoRadarTargets.
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CorporateNumberListContainer'
        offset:
          type: number
        limit:
          type: number
      required:
        - data
        - offset
        - limit
    AddCorporateInfoRadarTargetsRequest:
      description: The request payload of addCorporateInfoRadarTarget.
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CanonicalCorporateNumber'
          maxItems: 100
      required:
        - data
    DeleteCorporateInfoRadarTargetsRequest:
      description: The request payload of addCorporateInfoRadarTarget.
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CanonicalCorporateNumber'
          maxItems: 100
      required:
        - data
    GetCorporateInfoRadarTargetsUpdatedForDayResponse:
      description: |
        The response payload of getCorporateInfoRadarTargetsUpdatedForDay.

        Note: when no update record exists for the requested day, the endpoint returns a bare empty array (`[]`) instead of this object.
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/CorporateNumberListContainer'
    GetAddressResponse:
      type: object
      properties:
        version:
          $ref: '#/components/schemas/DataVersion'
        data:
          type: array
          items:
            $ref: '#/components/schemas/Address'
    SearchAddressesResponse:
      type: object
      properties:
        version:
          $ref: '#/components/schemas/DataVersion'
        count:
          $ref: '#/components/schemas/Count'
        facets:
          description: |
            The facets of the result that form with the query.

            If no facets are given, those will be unavailable and this stores null.
          $ref: '#/components/schemas/Facets'
        limit:
          $ref: '#/components/schemas/Limit'
        offset:
          $ref: '#/components/schemas/Offset'
        query:
          description: The query that the search has been performed for.
          allOf:
            - $ref: '#/components/schemas/AddressNormalizationResult'
            - type: object
              properties:
                q:
                  description: The verbatim value provided as `q` in the parameters.
                  type: string
                  nullable: true
                t:
                  description: The verbatim value provided as `t` in the parameters.
                  type: string
                  nullable: true
          type: object
        data:
          type: array
          items:
            $ref: '#/components/schemas/Address'
    PrefectureCode:
      type: string
      pattern: ^[0-9]{2}$
      example: '13'
    City:
      type: object
      properties:
        city:
          description: |
            The name of the city. The county name may precede it, or the name of the ward would follow it in case the city has ordinance-designated wards.
          type: string
          example: 大阪市北区
        city_code:
          description: |
            The remaining portion of the JISX0402 code that has the leading two-dight prefecture code removed.
          type: string
          example: '127'
        city_kana:
          description: |
            The reading of the name of the city in katakana.
          type: string
          example: オオサカシキタク
        city_roman:
          description: |
            The "romanized" reading of the name of the city.
          type: string
          example: Kita-ku, Osaka
        city_without_county_and_ward:
          description: |
            The name of the city, with the county and ordinance-designated ward part removed.
          type: string
          example: 各務原市
        city_without_county_and_ward_kana:
          description: |
            The reading of the name of the city, with the county and ordinance-designated ward part removed.
          type: string
          example: カカミガハラシ
        city_without_county_and_ward_roman:
          description: |
            The "romanized" reading of the name of the city, with the county and ordinance-designated ward part removed.
          type: string
          example: Kakamigahara
        county:
          description: |
            The name of the county.
          type: string
          example: 秩父郡
        county_kana:
          description: |
            The reading of the name of the county in katakana.
          type: string
          example: チチブグン
        county_roman:
          description: |
            The "romanized" reading of the name of the county.
          type: string
          example: Chichibu
        jisx0402:
          $ref: '#/components/schemas/JISX0402'
        prefecture:
          description: |
            The name of the prefecture in Kanji.
          type: string
          example: 東京都
        prefecture_code:
          description: |
            The prefecture code defined in JISX0401.
          $ref: '#/components/schemas/PrefectureCode'
        prefecture_kana:
          description: |
            The reading of the name of the prefecture in katakana.
          type: string
          example: トウキョウト
        prefecture_roman:
          description: |
            The "romanized" reading of the name of the prefecture.
          type: string
          example: Tokyo
    GetCitiesResponse:
      type: object
      properties:
        version:
          $ref: '#/components/schemas/DataVersion'
        data:
          type: array
          items:
            $ref: '#/components/schemas/City'
    DOW:
      type: integer
      minimum: 0
      maximum: 6
      description: |
        An integer that represents the day of week.

        The values from 0 to 6 represents Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday, respectively.
    DOWText:
      type: string
      enum:
        - sunday
        - monday
        - tuesday
        - wednesday
        - thursday
        - friday
        - saturday
      description: A string that represents the day of week.
    HolidayDescriptor:
      type: object
      required:
        - title
        - date
        - day_of_week
        - day_of_week_text
      properties:
        title:
          description: The name of the holiday.
          type: string
        date:
          description: The date of the holiday.
          $ref: '#/components/schemas/ISO8601Date'
        day_of_week:
          $ref: '#/components/schemas/DOW'
        day_of_week_text:
          $ref: '#/components/schemas/DOWText'
    GetNationalHolidaysResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/HolidayDescriptor'
    IPAddressType:
      type: string
      enum:
        - v4
        - v6
      description: A value that specifies the type of the IP address.
    IPv4Address:
      type: string
      pattern: ^(?:[1-9][0-9]{0,2}|0)\.(?:[1-9][0-9]{0,2}|0)\.(?:[1-9][0-9]{0,2}|0)\.(?:[1-9][0-9]{0,2}|0)$
      description: A string representing the IPv4 address.
      example: 169.254.169.254
    IPv6Address:
      type: string
      pattern: ^(?:(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|(?:(?:[0-9a-fA-F]{1,4}:){1,6}|:):[0-9a-fA-F]{1,4}|(?:(?:[0-9a-fA-F]{1,4}:){1,7}|:):)$
      description: A string representing the IPv6 address.
      example: ff80::1
    IPAddress:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/IPAddressType'
        address:
          oneOf:
            - $ref: '#/components/schemas/IPv4Address'
            - $ref: '#/components/schemas/IPv6Address'
    GetMyIPAddressResponse:
      type: object
      properties:
        remote_addr:
          $ref: '#/components/schemas/IPAddress'
    InvoiceIssuer:
      description: The data that match to the query.
      type: object
      properties:
        published_date:
          description: |
            The published date of the record, in the form of `"YYYY-MM-DD"` where Y, M, and D represent digits of the year, month, and day the record was published.
            Please note that this field doesn't indicate the actual date of the updated date of the record.
            The published date may be later than the updated date. Please see `update_date` for further details.
          type: string
          example: '2021-01-01'
          pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
        sequence_number:
          description: The revision number of the issuer record, non zero-padded 8 digit number at maximum.
          type: number
          example: 12345678
        qualified_invoice_issuer_number:
          description: The qualified invoice issuer number of the entity.
          type: string
          example: T2021001052596
          pattern: ^T[0-9]{13}$
        process:
          description: |
            The status of the registration.
            * `1` - `NEW`, Implies that the record is newly registered.
            * `2` - `INFORMATION_CHANGED`, Implies that the record has been changed.
            * `3` - `REGISTRATION_EXPIRED`, Implies that the registration has been expired.
            * `4` - `REGISTRATION_DISPOSED`, Implies that the registration has been invalidated.
            * `99` - `DELETED`, Implies that the registration has been deleted.
          type: number
          example: 1
          enum:
            - 1
            - 2
            - 3
            - 4
            - 99
          nullable: true
        correct:
          description: |
            The reason for the change, if the record has been updated.
            `null` when the record has been deleted.
            * `0` - `OTHER`, Not the correction.
            * `1` - `CORRECTION`, Correction.
          type: number
          example: 0
          enum:
            - 0
            - 1
          nullable: true
        kind:
          description: |
            The kind of the invoice issuer.
            * `1` - `INDIVIDUAL`, Implies that the record is for a sole proprietor.
            * `2` - `CORPORATION`, Implies that the record is for a corporate entity.
          type: number
          example: 1
          enum:
            - 1
            - 2
          nullable: true
        country:
          description: |
            Whether the issuing entity is domestic or not, and if domestic, whether it is specifically designated by the National Tax Agency.
            * `1` - `DOMESTIC_ENTITY`, Implies that the record is for a domestic entity.
            * `2` - `DESIGNATED_FOREIGN_ENTITY`, Implies that the record is for a designated foreign entity.
            * `3` - `GENERAL_FOREIGN_ENTITY`, Implies that the record is for a general (not specifically designated) foreign entity.
          type: number
          example: 1
          enum:
            - 1
            - 2
            - 3
          nullable: true
        latest:
          description: |
            Whether the record is latest or obsolete.
            * `0` - `OBSOLETE`, Implies that the record is obsolete.
            * `1` - `LATEST`, Implies that the record is the latest one.
          type: number
          example: 1
          enum:
            - 0
            - 1
          nullable: true
        registration_date:
          description: |
            The date of the registration, in the form of `"YYYY-MM-DD"`
            where Y, M, and D represent digits of the year, month, and day
            the issuer was qualified and registered.
          type: string
          example: '2021-01-01'
          nullable: true
          pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
        update_date:
          description: |
            The date the record was updated, in the form of `"YYYY-MM-DD"` where Y, M, and D represent digits of the year, month, and day.
            Unlike `change_date` and `published_date`, this field indicates the actual update date of the issuer information in NTA data.
            See `change_date` and `published_date` for further information.
          type: string
          example: '2021-01-01'
          nullable: true
          pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
        disposal_date:
          description: |
            The date the record was invalidated, in the form of `"YYYY-MM-DD"`
            where Y, M, and D represent digits of the year, month, and day.
          type: string
          example: '2021-01-01'
          nullable: true
          pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
        expire_date:
          description: |
            The date the record was expired, in the form of `"YYYY-MM-DD"`
            where Y, M, and D represent digits of the year, month, and day.
          type: string
          example: '2021-01-01'
          nullable: true
          pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
        name:
          description: |
            The trade name or issuer name in Japanese.
            All the characters are rendered in full-width form.
            The string is preprocessed so it would fit within 150 characters by NTA if it is longer than that length actually.
            If the text uses a Kanji which is not JIS Level 1 or 2, The Kanji will be converted into correspondent JIS Level 1 or 2 Kanjis.
            You can refer to the un-normalized version of the text from a correspondent image file.
            See `name_image_id` for details.
          type: string
          example: ケンオール株式会社
        kana:
          description: |
            Reading of the invoice issuer, if the issuer is a foreign entity.
          type: string
          example: ケンオール
          nullable: true
        trade_name:
          description: |
            Trade name of the issuer, if any.
          type: string
          example: ケンオール
          nullable: true
        popular_name_previous_name:
          description: |
            Alias or former name of the issuer.
          type: string
          example: ケンオール
          nullable: true
        address_inside:
          $ref: '#/components/schemas/NTAAddress'
        address_request:
          $ref: '#/components/schemas/NTAAddress'
        address:
          $ref: '#/components/schemas/NTAAddress'
    GetInvoiceIssuerResponse:
      type: object
      properties:
        version:
          $ref: '#/components/schemas/DataVersion'
        data:
          $ref: '#/components/schemas/InvoiceIssuer'
    ListAvailablePostalcodeDataResponse:
      description: Information about the downloadable postalcode data.
      type: object
      properties:
        json:
          type: array
          items:
            type: string
            description: 'The path to the downloadable data. The path is in the following format: `<version>/<filename>`.'
            example: 2021-06-30/kenall.json.xz
    SchoolCode:
      type: string
      pattern: ^[A-H][12][0-9]{2}[1-3][0-9]{7}[0-9]$
      example: F113110102700
    School:
      description: The data that match to the query.
      type: object
      properties:
        code:
          $ref: '#/components/schemas/SchoolCode'
        name:
          description: The name of the school.
          type: string
          example: 東京大学
        type:
          description: |
            The type of the school.
            * `'A1'` - Kindergarten.
            * `'A2'` - Kodomoen. A certified facility in Japan that combines early childhood education and childcare services for children.
            * `'B1'` - Elementary school.
            * `'C1'` - Junior high school.
            * `'C2'` - Compulsory education school.
            * `'D1'` - High school.
            * `'D2'` - Secondary school.
            * `'E1'` - Special support school.
            * `'F1'` - University.
            * `'F2'` - Junior college.
            * `'G1'` - College of technology.
            * `'H1'` - Specialized training college.
            * `'H2'` - Miscellaneous school.
          type: string
          example: F1
          enum:
            - A1
            - A2
            - B1
            - C1
            - C2
            - D1
            - D2
            - E1
            - F1
            - F2
            - G1
            - H1
            - H2
        jurisdiction_prefecture_code:
          description: The prefecture code defined in JISX0401.
          $ref: '#/components/schemas/PrefectureCode'
        establishment_type:
          description: |
            A type that indicates the organization responsible for establishing and operating the educational institution.
            * `1` - National.
            * `2` - Public.
            * `3` - Private.
          type: number
          example: 1
          enum:
            - 1
            - 2
            - 3
        branch:
          description: |
            A subsidiary campus or facility operated by the main school, typically located in a different area to provide education to students in that region.
            * `1` - Main.
            * `2` - Branch.
            * `9` - Abolished.
          type: number
          example: 1
          enum:
            - 1
            - 2
            - 9
        address_raw:
          description: The unprocessed address of school.
          type: string
          example: 東京都文京区本郷７－３－１
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/NTAAddress'
        established_date:
          description: |
            The date when the attribute information was officially established, in the form of `"YYYY-MM-DD"` where Y, M, and D represent digits of the year, month, and day.
          $ref: '#/components/schemas/ISO8601Date'
        abolished_date:
          description: |
            The date when the attribute information was officially abolished, in the form of `"YYYY-MM-DD"` where Y, M, and D represent digits of the year, month, and day.
            If the school is not abolished, this value is set to `null`.
          $ref: '#/components/schemas/ISO8601Date'
          nullable: true
        school_survey_number:
          description: |
            The former school survey number used prior to the current system.
          type: string
          example: 01A025
          nullable: true
        new_code:
          description: |
            This field is set when the current school code is abolished and transitioned to a different school code.
          type: array
          items:
            type: string
          example:
            - B140210001314
    GetSchoolResponse:
      type: object
      properties:
        version:
          $ref: '#/components/schemas/DataVersion'
        data:
          $ref: '#/components/schemas/School'
    SchoolSearchQuery:
      description: The query to search against the school database with.
      type: string
      minLength: 1
      example: postal_code:0600808 AND type:F1
    SearchSchoolResponse:
      type: object
      properties:
        version:
          description: The version of the data, in the form of `"YYYY-MM-DD"` where Y, M, and D represent digits of the year, month, and day the source data became available.
          $ref: '#/components/schemas/DataVersion'
        data:
          description: The set of the data that match to the query.
          type: array
          items:
            $ref: '#/components/schemas/School'
        query:
          description: The query that the search has been performed for.
          example: postal_code:0600808 AND type:F1
          type: string
        count:
          description: The number of the resulting items in total.
          type: integer
          example: 1
          minimum: 0
        offset:
          description: The offset from which the result has been retrieved.
          type: integer
          example: 0
          minimum: 0
        limit:
          description: The number of items that have been intended, at most, to retrieve from the result.
          type: integer
          example: 100
          maximum: 100
          minimum: 1
        facets:
          description: |
            The facets of the result that form with the query.
            If no facet is given, those will be unavailable and this stores null.
            A `Facet` is a tuple that stores a facet representation of some level and the number of the items in the result's subset that belong to the facet.
            A facet representation consist of hierarchical facet strings delimited by slashes.
          type: object
          nullable: true
          properties:
            area:
              description: The area facet of the result.
              type: array
              items:
                $ref: '#/components/schemas/Facet'
              example:
                - - /東京都
                  - 1
            type:
              description: The type facet of the result.
              type: array
              items:
                $ref: '#/components/schemas/Facet'
              example:
                - - /大学
                  - 1
            establishment_type:
              description: The establishment type facet of the result.
              type: array
              items:
                $ref: '#/components/schemas/Facet'
              example:
                - - /公立
                  - 1
            branch:
              description: The branch facet of the result.
              type: array
              items:
                $ref: '#/components/schemas/Facet'
              example:
                - - /本校
                  - 1
