> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# 金融機関取得API：1件の銀行と対応機能

> Didit の金融機関取得エンドポイントは、1つの銀行の対応機能と稼働状況を返します。

DiditのGet an Institutionエンドポイントは、1つの銀行について、その対応機能と稼働状況を返します。
これまでに観測されたことがない値は、推測値ではなく`null`になります。


## OpenAPI

````yaml ja/openapi-25.json GET /v3/bank/institutions/{id}/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: 本人確認API。x-api-keyヘッダーで認証します。
servers:
  - url: https://verification.didit.me
security: []
tags:
  - name: Bank Data
    description: >-
      Bank
      Link、接続、アカウント、残高、取引、金融機関、カバレッジ。銀行データはサンドボックスアプリケーションで利用できます。本番アプリケーションの呼び出しは、本番アクセスが発表されるまで
      `404`
      を返します。サンドボックスでは課金されません。APIキーを使った呼び出しには、銀行データ権限（`bank-data`）を持つキーが必要です。読み取りには読み取り権限、変更を伴う操作には書き込み権限が必要です。口座確認は例外で、セッションへの書き込みアクセスまたはフルアクセスが必要であり、銀行データ権限は不要です。銀行データはフルアクセスには含まれません。フルアクセスのキーは拒否され、権限を持つキーを作成するまで、呼び出しは
      `403 bank_data_access_denied`
      を返します。生の銀行データ（アカウント、残高、取引、変更フィード）も、APIキーを含まないリクエストを拒否します。


      `/v3/bank/`
      配下の拒否は、口座確認を除き、すべて同じJSONボディ（`code`、`message`、`request_id`、`field`、`next_action`、`retry_after`）を返します。操作ではないパス、UUIDではないID、未知のサブリソースは、すべてのメソッドで
      `404 not_found` を返し、予期しないエラーは `request_id` を伴う `500 internal_error`
      を返します。銀行データが利用できない場合、すべての操作はプラットフォームの標準 `404` を返します。これは未知のルートの場合とまったく同じです。
paths:
  /v3/bank/institutions/{id}/:
    get:
      tags:
        - Bank Data
      summary: 金融機関を取得
      description: >-
        銀行を1件、その機能とともに返します。IDは、`list_institutions`で一覧表示されるDiditのスラッグです。


        「Bank
        data」権限（`bank-data`）を持つAPIキーが必要です。この操作には読み取り権限が必要です。フルアクセスのキーにはこの権限は含まれません。キーの作成時に明示的に付与してください。付与しない場合、呼び出しは`403
        bank_data_access_denied`で応答します。
      operationId: getBankInstitution
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: '金融機関のIDです。例: `es-banco-norte`'
      responses:
        '200':
          description: 銀行。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankInstitution'
              examples:
                Spanish bank:
                  summary: 継続的なアクセスを提供するスペインの銀行
                  value:
                    id: es-banco-norte
                    name: Banco Norte
                    country: ESP
                    logo_url: https://static.example.com/banks/es-banco-norte.png
                    timezone: Europe/Madrid
                    segments:
                      - personal
                      - business
                    access:
                      - one_time
                      - ongoing
                    ongoing_access: true
                    consent_days_max: 180
                    history_days_max: 365
                    pending_transactions: true
                    pending_linkage: false
                    balance_types:
                      - booked
                      - available
                    transaction_fields:
                      - value_date
                      - counterparty_name
                      - counterparty_iban
                      - remittance
                      - bank_transaction_code
                      - bank_reference
                      - balance_after
                    sign_in: redirect
                    requires_end_user_email: true
                    corporate_accounts: true
                    bank_account_selection: false
                    separate_history_consent: false
                    reconfirmation: false
                    sync_frequency_hours: null
                    health: operational
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/BankDataAccessDenied'
        '404':
          description: このアプリケーションおよび環境には、このリソースが存在しません。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankDataError'
              examples:
                Not found:
                  summary: 見つかりません
                  value:
                    code: not_found
                    message: The resource does not exist.
                    request_id: 3f6a1c8e-92b5-4d07-a1e3-8c4b7f0d2e59
                    field: null
                    next_action: null
                    retry_after: null
        '429':
          $ref: '#/components/responses/RateLimitedRead'
        '500':
          $ref: '#/components/responses/BankDataInternalError'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl
            'https://verification.didit.me/v3/bank/institutions/es-banco-norte/'
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.bank.get_institution(
                "your-id",
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY.
            const didit = new Didit();

            const result = await didit.bank.getInstitution("your-id");
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Bank.GetInstitution(ctx, \"your-id\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: |-
            import me.didit.Didit;

            // Reads DIDIT_API_KEY.
            Didit client = new Didit();

            var result = client.bank().getInstitution("your-id");
            System.out.println(result);
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;

            // Reads DIDIT_API_KEY.
            $didit = new DiditClient();

            $result = $didit->bank->getInstitution('your-id');
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            result = didit.bank.get_institution("your-id")
            puts result.to_h
        - lang: csharp
          label: .NET
          source: |-
            using System;
            using System.Text.Json;
            using Didit;

            // Reads DIDIT_API_KEY.
            using var client = new DiditClient();

            var result = await client.Bank.GetInstitutionAsync("your-id");
            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    BankInstitution:
      type: object
      description: >-
        銀行と、その銀行がサポートする機能。値は観測された機能データに基づき毎日更新されます。一度も観測されていない値は推測ではなく`null`となります。
      properties:
        id:
          type: string
          description: 銀行を示すDidit識別子（安定したスラッグ）。
          example: es-banco-norte
        name:
          type: string
        country:
          type: string
          pattern: ^[A-Z]{3}$
        logo_url:
          type: string
          format: uri
          nullable: true
        timezone:
          type: string
          description: 銀行の日付に使用されるIANAタイムゾーン。
          nullable: true
        segments:
          type: array
          items:
            type: string
            enum:
              - personal
              - business
        access:
          type: array
          items:
            type: string
            enum:
              - one_time
              - ongoing
          description: '`ongoing` は、その銀行で継続的アクセスが有効な場合にのみ表示されます。'
        ongoing_access:
          type: boolean
          description: この銀行で継続的なアクセスが利用可能かどうか。
        consent_days_max:
          type: integer
          description: その銀行が許可する最長の同意期間です。日数で示します。観測されていない場合は `null` です。
          nullable: true
        history_days_max:
          type: integer
          description: その銀行が提供する履歴の最大日数です。観測されていない場合は `null` です。
          nullable: true
        pending_transactions:
          type: boolean
          nullable: true
          description: 銀行が保留中の取引を報告するかどうか。
        pending_linkage:
          type: boolean
          nullable: true
          description: 銀行が保留中の取引を確定取引に紐付けるかどうか。これにより `pending_id` が設定されます。
        balance_types:
          type: array
          items:
            type: string
            enum:
              - booked
              - available
              - expected
        transaction_fields:
          type: array
          items:
            type: string
          description: 銀行が送信することがわかっている取引フィールド。それ以外のフィールドはすべて`null`です。
        sign_in:
          type: string
          enum:
            - redirect
            - app_approval
            - credentials
            - null
          description: 本人が銀行にサインインする方法。
          nullable: true
        requires_end_user_email:
          type: boolean
          nullable: true
          description: Bank Linkで本人に確認済みのメールアドレスが必要かどうか。
        corporate_accounts:
          type: boolean
          nullable: true
          description: 法人口座に対応しているかどうか。
        bank_account_selection:
          type: boolean
          nullable: true
          description: 本人がBank Link内ではなく銀行側で口座を選択するかどうか。
        separate_history_consent:
          type: boolean
          nullable: true
          description: 銀行が、過去の履歴を解放するために追加の確認を1回求めるかどうか。
        reconfirmation:
          type: boolean
          nullable: true
          description: 更新を、銀行へのサインインなしでDiditの画面上で再確認できるかどうか。
        sync_frequency_hours:
          type: integer
          description: 銀行がより短い間隔を許可している場合の、自動同期の間隔（時間）。`null` は日次のデフォルトを意味します。
          nullable: true
        health:
          type: string
          enum:
            - operational
            - degraded
            - down
      required:
        - id
        - name
        - country
        - logo_url
        - timezone
        - segments
        - access
        - ongoing_access
        - consent_days_max
        - history_days_max
        - pending_transactions
        - pending_linkage
        - balance_types
        - transaction_fields
        - sign_in
        - requires_end_user_email
        - corporate_accounts
        - bank_account_selection
        - separate_history_consent
        - reconfirmation
        - sync_frequency_hours
        - health
    BankDataError:
      type: object
      description: すべての銀行データ操作のエラー本文。すべてのフィールドが常に含まれます。
      properties:
        code:
          type: string
          enum:
            - ongoing_access_not_available
            - segment_not_available
            - window_not_available
            - history_window_ambiguous
            - redirect_url_not_registered
            - link_origin_not_allowed
            - bank_data_access_denied
            - connection_not_active
            - consent_expired
            - renewal_not_needed
            - renewal_window_expired
            - access_removed
            - refresh_limit_reached
            - cursor_expired
            - page_expired
            - invalid_cursor
            - page_token_mismatch
            - contract_rate_missing
            - insufficient_credits
            - invalid_request
            - not_found
            - internal_error
          description: 機械可読なエラーコード。分岐にはこの値を使用してください。`message`では分岐しないでください。
        message:
          type: string
          description: 開発者向けの平易な説明。文言は変更されることがあるため、解析しないでください。
        request_id:
          type: string
          description: このリクエストの識別子。サポートに問い合わせる際は、この値を伝えてください。
        field:
          type: string
          description: エラーが1つのフィールドに関するものである場合に修正すべきリクエストフィールド。それ以外の場合は`null`。
          nullable: true
        next_action:
          type: string
          enum:
            - retry_later
            - renew_connection
            - create_link
            - restart_from_cursor
            - restart_read
            - top_up_balance
            - enable_bank_data_access
            - contact_support
            - null
          description: 次に行うべき対応。クライアントが推測せずに行動できるようにするためのものです。標準の次のステップがない場合は `null`。
          nullable: true
        retry_after:
          type: integer
          description: 再試行するまでに待つ秒数です。レート制限と一時的なエラーの場合に設定され、それ以外の場合は `null` です。
          nullable: true
      required:
        - code
        - message
        - request_id
        - field
        - next_action
        - retry_after
      example:
        code: ongoing_access_not_available
        message: >-
          This bank cannot keep access open. Use access one_time or choose
          another bank.
        request_id: 3f6a1c8e-92b5-4d07-a1e3-8c4b7f0d2e59
        field: institution_id
        next_action: create_link
        retry_after: null
    RateLimitBudgetError:
      type: object
      description: >-
        レート制限ミドルウェアの予算超過による拒否の場合にのみ返されます。その他の429エラー（冪等性の競合やエンドポイント固有の上限を含む）では、これらのメタデータフィールドは保証されません。
      required:
        - detail
        - reference
        - limit
        - remaining
        - reset
        - window_seconds
      properties:
        detail:
          type: string
          description: 既存の、人が読める形式のバジェット拒否メッセージです。
        reference:
          type: string
          pattern: ^RL-[0-9a-f]{32}$
          description: RL-で始まり、その後に小文字の16進数文字32文字（UUID形式）が続く不透明なサポート参照番号。
        limit:
          type: integer
          description: 超過した範囲のバジェット。X-RateLimit-Limit と同じ値です。
        remaining:
          type: integer
          minimum: 0
          description: 残りの予算。ゼロ未満にならないよう下限をゼロに制限しています。X-RateLimit-Remaining と等しくなります。
        reset:
          type: integer
          format: int64
          description: ウィンドウのリセット時刻（Unix秒）。X-RateLimit-Resetと同じ値です。
        window_seconds:
          type: integer
          description: 固定ウィンドウの期間（秒）です。残りの待機時間ではありません。再試行する前に Retry-Afterに従ってください。
      example:
        detail: >-
          Write request rate limit exceeded. You can make up to 300 requests per
          minute.
        reference: RL-00000000000040008000000000000001
        limit: 300
        remaining: 0
        reset: 1794358860
        window_seconds: 60
  responses:
    Unauthorized:
      description: 認証されていません
      content:
        application/json:
          examples:
            Invalid API Key:
              summary: 無効なAPIキー
              value:
                detail: Invalid API Key.
    BankDataAccessDenied:
      description: >-
        APIキーに銀行データの権限(`bank-data`)がないか、本番環境のアプリケーションで生の銀行データを扱う場合は、アプリケーション設定
        "Bank data in the API"
        が無効になっています。銀行データはフルアクセスに含まれません。フルアクセスのキー、他のリソースに限定されたキー、APIキーを使わずに認証されたリクエスト(クライアント認証情報、生データの場合)は、いずれもこの内容で拒否されます。キーを作成し、明示的に権限を付与してください。この拒否はオブジェクトの検索より前に行われるため、オブジェクトが存在するかどうかは示しません。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BankDataError'
          examples:
            Bank data not allowed:
              summary: 銀行データは許可されていません
              value:
                code: bank_data_access_denied
                message: >-
                  Bank data calls need an API key that carries the Bank data
                  permission.
                request_id: 3f6a1c8e-92b5-4d07-a1e3-8c4b7f0d2e59
                field: null
                next_action: enable_bank_data_access
                retry_after: null
    RateLimitedRead:
      description: ミドルウェアの読み取り上限を超えました。再試行する前に Retry-After に従ってください。
      headers:
        Retry-After:
          $ref: '#/components/headers/BudgetRetryAfter'
        X-RateLimit-Scope:
          $ref: '#/components/headers/BudgetXRateLimitScope'
        X-RateLimit-Limit:
          $ref: '#/components/headers/BudgetXRateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/BudgetXRateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/BudgetXRateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitBudgetError'
          example:
            detail: >-
              GET request rate limit exceeded. You can make up to 600 requests
              per minute.
            reference: RL-00000000000040008000000000000001
            limit: 600
            remaining: 0
            reset: 1794358860
            window_seconds: 60
    BankDataInternalError:
      description: >-
        Didit側で予期しないエラーが発生しました。`/v3/bank/` 配下で起きた予期しないエラーは、HTMLページではなく、必ず Bank
        のエラー形式で応答されます。サポートに問い合わせる際は `request_id` を伝えてください。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BankDataError'
          examples:
            Internal error:
              summary: 予期しないエラー
              value:
                code: internal_error
                message: >-
                  Something went wrong on our side. Quote the request_id to
                  support.
                request_id: 3f6a1c8e92b54d07a1e38c4b7f0d2e59
                field: null
                next_action: contact_support
                retry_after: null
  headers:
    BudgetRetryAfter:
      description: 次のウィンドウまでの待機秒数（切り上げ）。ミドルウェアの予算超過による拒否の場合にのみ含まれます。
      schema:
        type: integer
    BudgetXRateLimitScope:
      description: 予算を超過した範囲。ミドルウェアによる拒否の場合にのみ含まれます。
      schema:
        type: string
    BudgetXRateLimitLimit:
      description: 超過した範囲のバジェット。ボディの制限値と同じ値です。ミドルウェアのバジェットによる拒否の場合にのみ含まれます。
      schema:
        type: integer
    BudgetXRateLimitRemaining:
      description: >-
        残りの予算。ゼロ未満にならないよう下限をゼロに制限しています。ボディの remaining
        と等しくなります。ミドルウェアの予算による拒否の場合に存在します。
      schema:
        type: integer
    BudgetXRateLimitReset:
      description: リセット時刻はUnix秒です。本文のresetと同じ値です。ミドルウェアの予算超過による拒否レスポンスに含まれます。
      schema:
        type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        お客様のアプリケーションのAPIキーです。Business Console の Developers -> API keys
        から取得できます。プライマリーキーはすべてのアクセス権を持ちます。名前付きキーは範囲を制限できます。リソースごとに
        none、read、write
        を指定でき、一部のワークフローや承認済みセッションに限定できます。IPアドレスのリストや有効期限も設定できます。401
        はキーが誤っている、取り消されている、または期限切れであることを意味します。403
        はキーが送信されていない、そのリソースまたはアクションへのアクセス権がない、またはリクエストがIPリストに含まれないアドレスから送信されたことを意味します。セッションのルートでの404
        は、セッションがキーのワークフローまたはステータスの範囲外にあることを意味します。メディアへのアクセス権がないキーでは、画像、動画、PDFのURLが
        null で返されます。セッションの書き込み権限がないキーでは、セッションリンクとトークンが null で返されます。詳しくは
        https://docs.didit.me/console/api-keys を参照してください。

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.