> ## 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：アクセスを停止

> Didit の「銀行接続を取り消す」エンドポイントは銀行へのアクセスを停止し、リクエストした時点で銀行データの取得も即座に止まります。

Didit の銀行接続取り消しエンドポイントは、銀行へのアクセスを停止し、銀行からのデータ取得はリクエストした時点で止まります。
取り消しではデータは削除されません。削除するには[削除](https://docs.didit.me/ja/standalone-apis/bank-connection-delete.md)を使用してください。
同意の状態は、銀行が確認するまでは`revocation_pending`と表示され、確認後は`revoked`に変わります。


## OpenAPI

````yaml ja/openapi-25.json POST /v3/bank/connections/{id}/revoke/
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/connections/{id}/revoke/:
    post:
      tags:
        - Bank Data
      summary: 銀行接続を取り消す
      description: >-
        銀行へのアクセスを停止します。停止後は、銀行からのデータ取得も、銀行の確認が保留中であってもすぐに止まります。同意のステータスは、取り消しの保留中は
        `revocation_pending`、銀行がアクセスの終了を確認すると `revoked`、自動で再試行している間は
        `revocation_failed` になります。`consent.ended_by` は `customer` になります。


        取り消しでは何も削除されません。保存済みのアカウント、残高、取引は、アプリケーションの保持設定である
        `consent.retain_until` まで読み取り可能なままです。料金も発生しません。今すぐ削除するには
        `delete_connection` を呼び出してください。同じ呼び出しを繰り返すと、現在の状態が返されます。


        この操作には、銀行データの権限(`bank-data`)を持つAPIキーが必要です。この操作は状態を変更する書き込み操作です。フルアクセスのキーにはこの権限は含まれません。キーの作成時に明示的に付与してください。付与していない場合、呼び出しは
        `403 bank_data_access_denied` で拒否されます。


        削除済みの接続を取り消そうとすると、削除された接続を含む `200` が返されます。そのため、呼び出しを繰り返しても安全です。
      operationId: revokeBankConnection
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: 接続ID。
        - $ref: '#/components/parameters/IdempotencyKey'
      responses:
        '200':
          description: 取り消しステータスを含む接続。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankConnection'
              examples:
                Revocation pending:
                  summary: アクセス停止が要求されました
                  value:
                    id: 5e1d2a70-3b94-4c1f-8a6e-d2f07b9c1e35
                    environment: live
                    access: ongoing
                    status: active
                    status_reason: null
                    institution:
                      id: es-banco-norte
                      name: Banco Norte
                      country: ESP
                      logo_url: https://static.example.com/banks/es-banco-norte.png
                    segment: business
                    data:
                      - accounts
                      - balances
                      - transactions
                    consent:
                      status: revocation_pending
                      version: 1
                      granted_at: '2026-11-21T12:04:11Z'
                      expires_at: '2027-05-20T12:04:11Z'
                      days_granted: 180
                      renewed_count: 0
                      scopes_requested:
                        - accounts
                        - balances
                        - transactions
                      scopes_granted:
                        - accounts
                        - balances
                        - transactions
                      accounts_granted:
                        - a71f0c2e-5d38-4b96-a1c4-3e9f8d2b7a10
                        - c3d84e19-2a7b-4f60-b5e1-9a0c6d3f8e72
                      renewal_action: bank_auth
                      renew_by: '2027-05-20T12:04:11Z'
                      reconfirm_by: null
                      renewable_until: '2026-12-21T15:10:00Z'
                      retain_until: '2026-12-21T15:10:00Z'
                      ended_at: '2026-11-21T15:10:00Z'
                      ended_by: customer
                    sync:
                      status: ok
                      initial_status: succeeded
                      initial_complete: true
                      history_complete: true
                      last_synced_at: '2026-11-21T12:04:40Z'
                      next_sync_at: '2026-11-22T06:00:00Z'
                      budgets:
                        - scope: connection
                          resource: all
                          limit: 4
                          remaining: 3
                          resets_at: '2026-11-22T00:00:00Z'
                      last_error: null
                      frequency_per_day: 1
                      live_syncs_left_today: 3
                    accounts:
                      - id: a71f0c2e-5d38-4b96-a1c4-3e9f8d2b7a10
                        name: Cuenta negocio
                        type: current
                        usage: business
                        currency: EUR
                        iban_last4: '1332'
                        status: open
                      - id: c3d84e19-2a7b-4f60-b5e1-9a0c6d3f8e72
                        name: Cuenta de ahorro
                        type: savings
                        usage: business
                        currency: EUR
                        iban_last4: '7708'
                        status: open
                    ownership:
                      compare: none
                      match: null
                      check_id: null
                      result: null
                    end_user:
                      reference: client-7731
                    manage_url: null
                    billing:
                      unit: connection_month
                      price_usd: '0.9000'
                      billed_through: '2026-11-30'
                    possible_duplicate_of: null
                    erasure: null
                    vendor_data: client-7731
                    created_at: '2026-11-21T12:03:02Z'
                    updated_at: '2026-11-21T12:04:40Z'
        '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/RateLimitedWrite'
        '500':
          $ref: '#/components/responses/BankDataInternalError'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            'https://verification.didit.me/v3/bank/connections/5e1d2a70-3b94-4c1f-8a6e-d2f07b9c1e35/revoke/'
            \
              -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.revoke_connection(
                "11111111-2222-3333-4444-555555555555",
            )
            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.revokeConnection("11111111-2222-3333-4444-555555555555");

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Bank.RevokeConnection(ctx, \"11111111-2222-3333-4444-555555555555\", didit.BankRevokeConnectionParams{})\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().revokeConnection("11111111-2222-3333-4444-555555555555");

            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->revokeConnection('11111111-2222-3333-4444-555555555555');

            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: >-
            require "didit"


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            result =
            didit.bank.revoke_connection("11111111-2222-3333-4444-555555555555")

            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.RevokeConnectionAsync("11111111-2222-3333-4444-555555555555");

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        1回の操作に対して任意で指定する、再試行の安全性を確保するためのキーです。255文字まで指定でき、UUIDも使用できます。同じキー、エンドポイント、クエリ、ボディで繰り返されたリクエストには、最初のレスポンスが同じステータスと同じボディで返され、2回目は実行も課金も行われません。同じキーを別のエンドポイント、クエリ、ボディで使うと
        `409` `idempotency_key_reused` が返されます。最初のリクエストがまだ処理中の場合は、`Retry-After`
        付きの `409` `idempotency_key_in_progress` が返されます。失敗したリクエスト（`4xx` または
        `5xx`）は保存されないため、同じキーで再送できます。キーは、APIキーとアクセストークンのどちらで呼び出す場合でも、お使いのアプリケーションに属します。詳しくは
        [再試行と冪等性](/ja/integration/api-errors#再試行と冪等性) を参照してください。
      schema:
        type: string
        minLength: 1
        maxLength: 255
  schemas:
    BankConnection:
      type: object
      description: >-
        あなたのアプリケーションが1つの銀行を読み取るための本人の権限です。更新しても接続IDとすべてのアカウントIDは維持されます。削除された接続では、`id`、`status`、`status_reason`、`created_at`、`erasure`のみが返されます。それ以外のフィールドは存在せず、銀行、本人、アカウントのデータは一切残りません。
      properties:
        id:
          type: string
          description: 接続の識別子。
          format: uuid
        environment:
          type: string
          enum:
            - live
            - sandbox
        access:
          type: string
          enum:
            - one_time
            - ongoing
        status:
          type: string
          enum:
            - pending
            - active
            - renewal_required
            - paused
            - revoked
            - deleted
            - failed
          description: >-
            `pending`: 初回の同期が実行中です。`active`: 同意は有効です。`renewal_required`:
            同意が終了したか、銀行が本人に再サインインを求めています。データは最後の同期時点のまま読み取り可能で、課金は発生しません。`paused`:
            今月の残高が不足しています。`revoked`: 本人、銀行、またはあなたによりアクセスが停止されました。`deleted`:
            `id`、`status`、`status_reason`、`created_at`、`erasure`
            のみが残ります。`failed`: 初回の同期が一度も成功していません。
        status_reason:
          type: string
          enum:
            - collection_complete
            - consent_expired
            - consent_lapsed
            - bank_requires_sign_in
            - revoked_by_end_user
            - revoked_by_bank
            - revoked_by_customer
            - insufficient_balance
            - paused_by_customer
            - first_sync_failed
            - deleted_by_customer
            - retention_elapsed
            - application_deleted
            - null
          description: >-
            接続がこのステータスになっている理由。`paused_by_customer` は予約済みです。`deleted` の接続の場合:
            `deleted_by_customer`、`consent_lapsed`、`retention_elapsed`、`application_deleted`。
          nullable: true
        institution:
          $ref: '#/components/schemas/BankInstitutionSummary'
        segment:
          type: string
          enum:
            - personal
            - business
            - null
          nullable: true
        data:
          type: array
          items:
            type: string
            enum:
              - accounts
              - balances
              - transactions
          description: 本人が承諾したスコープ。
        consent:
          $ref: '#/components/schemas/BankConnectionConsent'
        sync:
          $ref: '#/components/schemas/BankConnectionSync'
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/BankConnectionAccountSummary'
          description: 接続内のすべてのアカウントの概要です。アカウントの詳細は `get_account` で取得してください。
        ownership:
          $ref: '#/components/schemas/BankConnectionOwnership'
        end_user:
          type: object
          properties:
            reference:
              type: string
              description: 本人または企業に対するあなたのID。
              nullable: true
          required:
            - reference
        manage_url:
          type: string
          description: 本人のアクセスページ。アクセスページが利用可能になるまでは`null`。
          nullable: true
          format: uri
        billing:
          $ref: '#/components/schemas/BankConnectionBilling'
        possible_duplicate_of:
          type: string
          description: >-
            この接続が、有効な別の接続と重複する可能性があるにもかかわらず、どの `end_user.reference`
            も特定の一致を許可しなかった場合に設定されます。
          format: uuid
          nullable: true
        erasure:
          allOf:
            - $ref: '#/components/schemas/BankConnectionErasure'
          nullable: true
          description: '`delete_connection` の後に設定されます。それ以外の場合は `null` です。'
        vendor_data:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - status
        - status_reason
        - created_at
        - erasure
    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
    BankInstitutionSummary:
      type: object
      description: 接続またはリンクの対象となる銀行。
      properties:
        id:
          type: string
          description: 銀行のDidit識別子（安定したスラッグ）。`institution_id`として使用します。
          example: es-banco-norte
        name:
          type: string
          description: 銀行名。
          example: Banco Norte
        country:
          type: string
          description: 銀行の国です。ISO 3166-1 alpha-3形式です。
          pattern: ^[A-Z]{3}$
          example: ESP
        logo_url:
          type: string
          description: 銀行のロゴ。ない場合は`null`。
          nullable: true
          format: uri
      required:
        - id
        - name
        - country
        - logo_url
    BankConnectionConsent:
      type: object
      description: この接続に対する本人の同意。
      properties:
        status:
          type: string
          enum:
            - granted
            - expired
            - revocation_pending
            - revoked
            - revocation_failed
          description: >-
            銀行が同意の取り消しを確認するまでは `revocation_pending` になり、確認後に `revoked`
            になります。`revocation_failed`
            は自動的に再試行されます。取り消しが要求されると、銀行からのデータ取得は直ちに停止します。
        version:
          type: integer
          description: 同意のバージョン。更新すると、同じ接続上に次のバージョンが作成されます。
        granted_at:
          type: string
          format: date-time
          nullable: true
        expires_at:
          type: string
          description: 銀行の同意が終了する日時。銀行が設定し、上限は `consent_days`。
          format: date-time
          nullable: true
        days_granted:
          type: integer
          description: 銀行が付与した同意の期間（日数）。
          nullable: true
        renewed_count:
          type: integer
          description: 同意が更新された回数。
        scopes_requested:
          type: array
          items:
            type: string
            enum:
              - accounts
              - balances
              - transactions
        scopes_granted:
          type: array
          items:
            type: string
            enum:
              - accounts
              - balances
              - transactions
        accounts_granted:
          type: array
          items:
            type: string
            format: uuid
          description: 当事者が共有するアカウントのID。
        renewal_action:
          type: string
          enum:
            - reconfirm
            - bank_auth
            - null
          description: >-
            更新の方法。`reconfirm`
            は、銀行と国の規則で認められている場合に、銀行へのサインインなしで、本人がDiditの画面上で確認するものです。`bank_auth`
            は銀行へのサインインです。
          nullable: true
        renew_by:
          type: string
          description: 同意の終了日。空白期間を作らないよう、終了前に更新してください。
          format: date-time
          nullable: true
        reconfirm_by:
          type: string
          description: '`renewal_action` が `reconfirm` の場合に設定されます。再確認できる最終期限です。'
          format: date-time
          nullable: true
        renewable_until:
          type: string
          description: >-
            同意が終了した後に、同じ接続を再開できる最終時刻です。この時刻を過ぎると、利用者は再度接続する必要があります。`retain_until`と同じ値です。
          format: date-time
          nullable: true
        retain_until:
          type: string
          description: アクセスが終了すると設定されます。保存されたデータが読み取り可能な期間を示し、アプリケーションのデータ保持設定によって決まります。
          format: date-time
          nullable: true
        ended_at:
          type: string
          format: date-time
          nullable: true
        ended_by:
          type: string
          enum:
            - end_user
            - bank
            - customer
            - unknown
            - null
          description: アクセスを終了した主体。証拠から設定されます。銀行も同期も示さない場合は `unknown`。
          nullable: true
      required:
        - status
        - version
        - granted_at
        - expires_at
        - days_granted
        - renewed_count
        - scopes_requested
        - scopes_granted
        - accounts_granted
        - renewal_action
        - renew_by
        - reconfirm_by
        - renewable_until
        - retain_until
        - ended_at
        - ended_by
    BankConnectionSync:
      type: object
      description: 接続の同期状態です。
      properties:
        status:
          type: string
          enum:
            - pending
            - ok
            - failing
          description: >-
            24時間にわたって試行が失敗した場合は `failing`
            になります。失敗した試行は間隔を空けて再試行されます。本人に再サインインを求める銀行の場合は、代わりに接続が
            `renewal_required` になります。
        initial_status:
          type: string
          enum:
            - pending
            - succeeded
            - partial
            - failed
          description: >-
            最初の同期の結果です。`succeeded`または`partial`の場合、接続は`active`になります。どのアカウントも成功しなかった場合は`failed`になります。
        initial_complete:
          type: boolean
          description: >-
            `initial_status` が `succeeded` の場合にのみ `true`
            になります。この場合、口座、残高、直近の取引を読み取れます。
        history_complete:
          type: boolean
          description: >-
            履歴の遡及取得が理由を問わず終了した場合は `true` になります。取得できなかった期間は、各口座の
            `history_coverage.missing_ranges` に含まれます。
        last_synced_at:
          type: string
          description: 銀行からデータが最後に取得された日時。参照した日時ではありません。
          format: date-time
          nullable: true
        next_sync_at:
          type: string
          description: 次の自動同期が予定されている日時。自動同期は銀行によって1日1〜4回実行されます（`frequency_per_day` を参照）。
          format: date-time
          nullable: true
        budgets:
          type: array
          items:
            $ref: '#/components/schemas/BankSyncBudget'
          description: 本人が不在の状態での取得に関する銀行の上限。
        last_error:
          allOf:
            - $ref: '#/components/schemas/BankSyncError'
          nullable: true
          description: 最後の同期エラーです。エラーがない場合は `null` です。
        frequency_per_day:
          type: integer
          minimum: 1
          maximum: 4
          description: >-
            この接続について自動同期が1日に実行される回数。銀行によって1日1回から4回です。銀行がより多くの非対話型の読み取りを許可している場合でも、ライブ同期のために常に1日少なくとも2回は残されます。
        live_syncs_left_today:
          type: integer
          minimum: 0
          description: >-
            銀行の上限内で、本日残っているライブ同期（`refresh_connection`）の回数。最も厳しい上限の `remaining`
            です。銀行が上限を設定していない場合は `null`。ライブ同期は月額料金に含まれます。
          nullable: true
      required:
        - status
        - initial_status
        - initial_complete
        - history_complete
        - last_synced_at
        - next_sync_at
        - budgets
        - last_error
        - frequency_per_day
        - live_syncs_left_today
    BankConnectionAccountSummary:
      type: object
      description: 接続内のアカウントの短縮形です。
      properties:
        id:
          type: string
          description: アカウントID。接続のライフサイクル全体を通じて安定しており、更新を含めて変わりません。
          format: uuid
        name:
          type: string
          nullable: true
        type:
          type: string
          enum:
            - current
            - savings
            - card
            - loan
            - investment
            - other
        usage:
          type: string
          enum:
            - personal
            - business
            - unknown
        currency:
          type: string
          pattern: ^[A-Z]{3}$
          description: 通貨コード（ISO4217）。
        iban_last4:
          type: string
          description: IBANの末尾4文字（口座がIBANを持つ場合）。
          nullable: true
        status:
          type: string
          enum:
            - open
            - closed
            - access_removed
      required:
        - id
        - name
        - type
        - usage
        - currency
        - iban_last4
        - status
    BankConnectionOwnership:
      type: object
      description: 口座名義人を個人または法人と照合する、任意の照合結果です。
      properties:
        compare:
          type: string
          enum:
            - none
            - person
            - business
        match:
          type: string
          enum:
            - any_holder
            - all_holders
            - null
          nullable: true
        check_id:
          type: string
          description: 比較が要求された場合の、所有構造の結果のID。
          format: uuid
          nullable: true
        result:
          type: string
          enum:
            - match
            - close_match
            - no_match
            - unknown
            - null
          description: 判定。不足している保有者の証拠によって結果が変わりうる場合、および銀行が保有者を共有しない場合は`unknown`。
          nullable: true
      required:
        - compare
        - match
        - check_id
        - result
    BankConnectionBilling:
      type: object
      description: この接続の料金。サンドボックスは課金されません。
      properties:
        unit:
          type: string
          description: 課金単位です。継続的なアクセスの場合は `connection_month`、それ以外の場合は `one_time` です。
          enum:
            - connection_month
            - one_time
        price_usd:
          type: string
          description: >-
            本日時点の今月の料金。アプリケーションと国ごとに、USD建てで、小数点以下4桁の小数文字列です。接続は、承認されたすべての範囲で、その月に少なくとも1つのアカウントのデータが公開された場合にのみ、その月分が課金されます。一回限りの接続およびサンドボックスでは
            `null`。継続的アクセスは、有効な接続ごとに月単位で課金されます。現在の料金は料金ページ（https://docs.didit.me/getting-started/pricing）にあります。例に示す金額は説明用です。国別の料金は料金ページに表示されています。
          pattern: ^-?\d+(\.\d+)?$
          nullable: true
        billed_through:
          type: string
          description: すでに確定している最後の月末です。
          format: date
          nullable: true
      required:
        - unit
        - price_usd
        - billed_through
    BankConnectionErasure:
      type: object
      description: 依頼した削除の進行状況。
      properties:
        status:
          type: string
          enum:
            - pending
            - erased
            - failed
          description: >-
            削除の実行中は `pending`、保存済みのコピーと銀行へのアクセスが残っていないときは
            `erased`、24時間以内に確認できなかった場合は
            `failed`。削除が失敗した場合、接続のデータは閉じられたままになり、再試行され、Didit に通知されます。
        requested_at:
          type: string
          format: date-time
        erased_at:
          type: string
          format: date-time
          nullable: true
          description: 削除が完了した日時。`status` が `erased` になるまでは `null`。
      required:
        - status
        - requested_at
        - erased_at
    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
    BankSyncBudget:
      type: object
      description: 本人不在での取得に対する銀行の上限の1つの区分。
      properties:
        scope:
          type: string
          enum:
            - connection
            - account
          description: 銀行が予算をカウントする対象。
        resource:
          type: string
          enum:
            - all
            - accounts
            - balances
            - transactions
        account_id:
          type: string
          description: '`scope` が `account` の場合の口座。'
          format: uuid
          nullable: true
        limit:
          type: integer
          description: >-
            銀行の定義に従い、本人が不在の状態でDiditが銀行からデータを取得できる1日あたりの回数。これは銀行が設定する上限であり、保証ではありません。
        remaining:
          type: integer
          description: >-
            現在のウィンドウで手動更新に使用できる残りの取得回数です。自動同期用に確保された取得回数はあらかじめ差し引かれており、自動同期が1日の最後の2回の取得を使用することはありません。そのため、オンデマンドの更新は常に2回分残ります。
        resets_at:
          type: string
          description: 期間がリセットされる日時。
          format: date-time
      required:
        - scope
        - resource
        - limit
        - remaining
        - resets_at
    BankSyncError:
      type: object
      description: 同期が失敗した理由。
      properties:
        code:
          type: string
          description: Diditエラーコードです。
        message:
          type: string
          description: 平易な説明。
        at:
          type: string
          description: 発生した日時。口座ごとの結果では `null`。
          format: date-time
          nullable: true
      required:
        - code
        - message
        - at
  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
    RateLimitedWrite:
      description: APIキーごとに毎分300リクエストという共有の書き込み上限を超えました。`Retry-After` の指示に従ってから再試行してください。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitBudgetError'
          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
      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'
    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.