> ## 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：署名済みPDFの再チェック

> Diditの署名検証APIは、電子署名ステップの署名済み書類を再チェックし、ファイルの完全性、PAdES署名、証明書、失効情報、タイムスタンプを確認します。

ステップの署名済み書類を再度チェックし、その結果を各署名者の`validation`に保存します。Diditは署名済みのPDFをすべて読み直し、そのSHA-256を確認します。高度電子署名(AES)の場合は、PAdES署名、証明書、失効情報、タイムスタンプも検証します。シンプル署名にはデジタル署名がないため、ファイルの完全性のみを確認します。再署名は一切行われません。コンソールでは、セッションの**Signature**タブにある**Validate again**ボタンがこの操作に当たります。

```bash theme={null}
curl -X POST 'https://verification.didit.me/v3/session/{session_id}/signatures/{node_id}/validate/' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"signature_id": "{signature_id}"}'
```

1人の署名者だけをチェックするには`signature_id`を送信します。指定しない場合、Diditはステップのすべての署名者をチェックし、いずれかの署名者が未署名であれば`409`と`signature_not_signed`を返します。保存されている署名済みPDFが`sha256_signed`と一致しなくなっている場合は、`400`と`signature_document_changed`が返されます。

レスポンスは、チェックされた署名者を含む`{ "signatures": [...] }`です。全体の結果は`validation.valid`、各書類の結果は`validation.documents[]`で確認してください。すべてのフィールドについては[署名を再検証する](https://docs.didit.me/ja/core-technology/electronic-signature/report-electronic-signature.md#署名を再検証する)を参照してください。

## 関連情報

* [電子署名レポート](https://docs.didit.me/ja/core-technology/electronic-signature/report-electronic-signature.md)
* [署名済み書類をダウンロードする](https://docs.didit.me/ja/sessions-api/electronic-signature/download-signed-document.md)


## OpenAPI

````yaml ja/openapi-25.json POST /v3/session/{sessionId}/signatures/{nodeId}/validate/
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: []
paths:
  /v3/session/{sessionId}/signatures/{nodeId}/validate/:
    post:
      tags:
        - Sessions
      summary: 署名を再度検証
      description: >-
        電子署名ステップの署名済み書類を再チェックします。Diditは署名済みPDFをすべて読み直してSHA-256を確認し、高度電子署名（AES）の場合はPAdES署名、証明書、失効情報、タイムスタンプを検証します（シンプル署名にはデジタル署名がないため、ファイルの完全性のみを確認します）。その後、結果を各署名者の`validation`に保存し、更新された項目を返します。再署名は一切行われません。1人の署名者を確認するには`signature_id`を送信します。指定しない場合はステップのすべての署名者が確認され、いずれかの署名者が未署名であれば呼び出しは失敗します。


        `write:sessions`が必要です。APIキーで利用できます。コンソールでは**Validate again**ボタンに相当します。
      operationId: post_v3_session_signature_validate
      parameters:
        - name: sessionId
          in: path
          required: true
          description: ユーザー認証（KYC）または法人確認（KYB）のセッションです。
          schema:
            type: string
            format: uuid
            example: 11111111-2222-3333-4444-555555555555
        - name: nodeId
          in: path
          required: true
          description: '電子署名ステップ: `signatures[]`内の項目の`node_id`。'
          schema:
            type: string
            example: feature_signature
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                signature_id:
                  type: string
                  format: uuid
                  description: '`signatures[]`内の署名者1人分の項目の`id`。'
            example:
              signature_id: 0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10
      responses:
        '200':
          description: チェックされた署名者と、更新された`validation`。
          content:
            application/json:
              schema:
                type: object
                properties:
                  signatures:
                    type: array
                    items:
                      $ref: '#/components/schemas/SignatureResult'
        '400':
          description: 保存されている署名済みPDFが、署名時に記録されたSHA-256と一致しなくなっています。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
              examples:
                Document changed:
                  summary: 署名済みファイルがハッシュと一致しなくなっています
                  value:
                    code: signature_document_changed
                    detail: signature_document_changed
        '403':
          description: >-
            認証情報がないか、その認証情報ではこのセッションを読み取れません。キーがない場合は`403`を返し、誤った、失効した、または期限切れのキーの場合は`401`を返します。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              example:
                detail: You do not have permission to perform this action.
        '404':
          description: 一致する署名がありません。セッション、ステップ、または署名者が存在しないか、削除されています。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
              examples:
                Unknown signer:
                  summary: このステップにそのような署名はありません
                  value:
                    code: signature_not_found
                    detail: signature_not_found
        '409':
          description: このステップの署名者が署名していないため、検証する対象がありません。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
              examples:
                Not signed:
                  summary: まだ署名していない署名者がいます
                  value:
                    code: signature_not_signed
                    detail: signature_not_signed
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.sessions.signatures.validate(
                "11111111-2222-3333-4444-555555555555",
                "feature_signature",
                signature_id="0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10",
            )
            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.sessions.signatures.validate(
              "11111111-2222-3333-4444-555555555555",
              "feature_signature",
              {
                signature_id: "0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10",
              },
            );
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Signatures.Validate(ctx, \"11111111-2222-3333-4444-555555555555\", \"feature_signature\", didit.SessionsSignaturesValidateParams{\n\tSignatureID: didit.String(\"0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;

            import me.didit.types.SessionsSignaturesValidateParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.sessions().signatures().validate("11111111-2222-3333-4444-555555555555",
            "feature_signature", SessionsSignaturesValidateParams.builder()
                    .signatureId("0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10")
                    .build());
            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->sessions->signatures->validate('11111111-2222-3333-4444-555555555555',
            'feature_signature', [
                'signature_id' => '0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10',
            ]);

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

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

            result = didit.sessions.signatures.validate(
              "11111111-2222-3333-4444-555555555555",
              "feature_signature",
              signature_id: "0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10"
            )
            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.Sessions.Signatures.ValidateAsync("11111111-2222-3333-4444-555555555555",
            "feature_signature", new SessionsSignaturesValidateParams

            {
                SignatureId = "0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10",
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    SignatureResult:
      type: object
      description: >-
        1つの電子署名ステップにおける署名者1名の結果です。[電子署名レポート](/ja/core-technology/electronic-signature/report-electronic-signature)を参照してください。
      properties:
        id:
          type: string
          format: uuid
          description: この署名者の証跡をダウンロードする場合や署名を検証する場合は、これを`signature_id`として渡します。
        node_id:
          type: string
          description: これを生成したワークフローのステップ。
        status:
          type: string
          enum:
            - intro
            - review
            - code
            - signing
            - signed
            - declined
          description: ステップ内での署名者の状況です。書類が署名済みであることを意味するのは`signed`のみです。
        verdict:
          type: string
          enum:
            - Not Finished
            - Approved
            - In Review
            - Declined
          description: ステップの結果。警告はそのルールを通じて結果を設定し、カスタムステータスルールはその後に適用されます。
        level:
          type: string
          enum:
            - simple
            - aes
            - qes
          description: '`simple`（デフォルト）または`aes`です。`qes`（適格電子署名、QES）はアドオンで、まだ提供されていません。'
        format:
          type: string
          enum:
            - pdf
            - pades
          description: Simple署名の場合は`pdf`、Advanced（AES）の場合は`pades`です。
        profile:
          type: string
          nullable: true
          description: 高度電子署名（AES）が署名されると`PAdES-B-LT`、それ以外はnullです。
        signer:
          type: object
          properties:
            name:
              type: string
              nullable: true
              description: >-
                署名者の氏名。検証済みの氏名（承認済みの本人確認またはセッションから取得）ですが、検証済みのセッション名がないSimpleレベルの場合は例外で、署名者が入力した氏名となり、検証されていません。
            capacity:
              type: string
              enum:
                - self
                - company
            company:
              type: string
              nullable: true
            role:
              type: string
              nullable: true
              description: 申告された主要人物の役職です。
            roles:
              type: array
              items:
                type: string
              description: 企業について申告された主要人物の構造化された役割です。
            identity_session_id:
              type: string
              format: uuid
              description: 署名者を検証したKYCセッション。
        identity_used:
          type: object
          description: 署名の根拠となる検証済みの本人情報。検証済みの本人情報がないSimple署名の場合は空です。
          properties:
            session_id:
              type: string
              format: uuid
            kyc_id:
              type: string
              format: uuid
              nullable: true
            verified:
              type: boolean
            expected_name:
              type: string
              nullable: true
              description: 署名者が一致する必要があった名前です。
        certificate:
          type: object
          nullable: true
          description: 書類の署名に使用された証明書。署名されるまでは`null`で、Simple署名の場合は常に`null`です。
          properties:
            issuer:
              type: string
            issued_to:
              type: string
            serial:
              type: string
              description: シリアル番号（16進数）。
            valid_from:
              type: string
              format: date-time
            valid_until:
              type: string
              format: date-time
        confirmation:
          type: object
          properties:
            channel:
              type: string
              nullable: true
              enum:
                - email
                - sms
              description: Simple署名の場合は、コードがないため`null`です。
            destination:
              type: string
              nullable: true
              description: コードの送信先となった、マスク済みの連絡先です。
            confirmed_at:
              type: string
              format: date-time
              nullable: true
            attempts:
              type: integer
              description: 入力されたコード（正しいコードを含む）。
        timestamp:
          type: object
          nullable: true
          description: >-
            署名に含まれるRFC
            3161タイムスタンプで、Diditが発行します。署名されるまでは`null`で、Simple署名では常に`null`です。
          properties:
            time:
              type: string
              format: date-time
            qualified:
              type: boolean
              description: AESの場合は常に`false`です。
            valid:
              type: boolean
        documents:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: この署名者のコピーにある書類です。署名済みファイルのダウンロードに使用します。
              uuid:
                type: string
                format: uuid
                description: '`id`と同じ。'
              title:
                type: string
              file_name:
                type: string
              pages:
                type: integer
                description: 署名された書類のページ。Wordの場合は、変換後のPDFのページです。
              size_bytes:
                type: integer
              sha256_original:
                type: string
                description: 署名者に表示された時点の書類のSHA-256。
              sha256_signed:
                type: string
                nullable: true
                description: 署名後の、署名済みPDFのSHA-256。
              status:
                type: string
                enum:
                  - signed
                  - declined
                  - not_signed
                  - not_reached
                description: '`not_signed`: 開かれましたが署名されていません。`not_reached`: 一度も開かれていません。'
              opened_at:
                type: string
                format: date-time
                nullable: true
              read_at:
                type: string
                format: date-time
                nullable: true
                description: ステップで必須とされている場合に、署名者がフィールドのない書類の最後まで到達した日時。
              read_to_end:
                type: boolean
              consented_at:
                type: string
                format: date-time
                nullable: true
                description: 署名者がフィールドのない書類に同意した日時、またはフィールドのある書類のフィールドへの入力を完了した日時。
              consent:
                type: boolean
              signed_file:
                type: string
                nullable: true
                description: >-
                  署名後の署名済みPDFのパス。[署名済み書類をダウンロード](/ja/sessions-api/electronic-signature/download-signed-document)を参照してください。
              mode:
                type: string
                enum:
                  - fields
                  - read_and_agree
                description: フィールドがある書類の場合は`fields`、フィールドがない書類の場合は`read_and_agree`。
              source_format:
                type: string
                enum:
                  - pdf
                  - docx
                description: '`pdf`、またはDiditがPDFに変換したWord文書の場合は`docx`です。'
              conversion:
                type: object
                nullable: true
                description: PDFの場合は`null`です。Word文書の場合は、元のファイルと変換後のファイルです。
                properties:
                  from:
                    type: string
                    enum:
                      - docx
                  file_name:
                    type: string
                    description: 元のWordファイル名です。
                  sha256:
                    type: string
                    description: 元のWordファイルのSHA-256。
                  size_bytes:
                    type: integer
                    description: 元のWordファイルのサイズ。
                  converter:
                    type: string
                    description: PDFを生成したコンバーターのバージョン。
              fields:
                type: array
                description: 書類のフィールドとその値。フィールドのない書類では空です。
                items:
                  $ref: '#/components/schemas/SignatureFieldResult'
        adopted_signature:
          type: object
          nullable: true
          description: 署名者が署名フィールドとイニシャルフィールド用に採用した署名とイニシャル。署名者が採用するまでは`null`です。
          properties:
            method:
              type: string
              enum:
                - typed
                - drawn
              description: '`typed`：認証済みの氏名を手書き風の書体で表示したもの。`drawn`：指またはマウスで描いたもの。'
            font:
              type: string
              nullable: true
              description: 入力した署名の筆跡スタイルです。手書きの場合は`null`です。
            adopted_at:
              type: string
              format: date-time
        electronic_signature_consent_at:
          type: string
          format: date-time
          nullable: true
          description: 署名者がレビュー画面で、書類に電子的に署名することに同意した日時。いずれかの書類にフィールドがある場合に設定されます。
        evidence_file:
          type: string
          nullable: true
          description: >-
            署名後の証跡PDFのパス。[署名の証跡をダウンロード](/ja/sessions-api/electronic-signature/download-evidence)を参照してください。
        warnings:
          type: array
          description: >-
            この署名者に対して発生した警告。[電子署名の警告](/ja/core-technology/electronic-signature/warnings-electronic-signature)を参照してください。
          items:
            type: object
            properties:
              code:
                type: string
                enum:
                  - SIGNATURE_DECLINED
                  - SIGNATURE_OTP_FAILED
                  - SIGNATURE_NAME_MISMATCH
                  - SIGNATURE_IDENTITY_NOT_VERIFIED
                  - SIGNATURE_DOCUMENT_CHANGED
                  - SIGNATURE_FIELD_DATA_MISSING
              node_id:
                type: string
        validation:
          type: object
          nullable: true
          description: >-
            署名済み書類の最後の暗号学的チェックです。書類が署名されるまでは`null`です。Diditが署名の結果を確認できない場合は`{"valid":
            null, "reason": "signature_provider_outcome_unknown", "checked_at":
            ...}`となり、`status`は`signing`のままです。この場合は未署名として扱ってください。
          properties:
            valid:
              type: boolean
              nullable: true
              description: すべての書類が有効な場合は`true`です。署名の結果を確認できなかった場合は`null`です。
            reason:
              type: string
              description: '`valid`が`null`の場合に設定されます：`signature_provider_outcome_unknown`。'
            checked_at:
              type: string
              format: date-time
            documents:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  checked_at:
                    type: string
                    format: date-time
                  valid:
                    type: boolean
                    description: 署名とタイムスタンプがともに有効かつ信頼できる場合は`true`です。
                  integrity:
                    type: boolean
                    description: 署名後に書類が変更されていない場合は`true`です。
                  trusted:
                    type: boolean
                    description: 署名証明書が信頼されたルートまでチェーンしている場合は`true`です。
                  revoked:
                    type: boolean
                  trusted_list:
                    type: object
                    description: >-
                      EUトラステッドリストのチェック。AESの場合：`{"status": "not_applicable",
                      "reason": "aes_not_qualified"}`。
                    properties:
                      status:
                        type: string
                      reason:
                        type: string
                  certificate:
                    type: object
                    nullable: true
                    description: 書類の署名に使用された証明書。署名されるまでは`null`で、Simple署名の場合は常に`null`です。
                    properties:
                      issuer:
                        type: string
                      issued_to:
                        type: string
                      serial:
                        type: string
                        description: シリアル番号（16進数）。
                      valid_from:
                        type: string
                        format: date-time
                      valid_until:
                        type: string
                        format: date-time
                  timestamp:
                    type: object
                    nullable: true
                    description: >-
                      署名に含まれるRFC
                      3161タイムスタンプで、Diditが発行します。署名されるまでは`null`で、Simple署名では常に`null`です。
                    properties:
                      time:
                        type: string
                        format: date-time
                      qualified:
                        type: boolean
                        description: AESの場合は常に`false`です。
                      valid:
                        type: boolean
        declined_at:
          type: string
          format: date-time
          nullable: true
        declined_action:
          type: string
          enum:
            - DECLINE
            - REVIEW
            - NO_ACTION
        signed_at:
          type: string
          format: date-time
          nullable: true
        expires_at:
          type: string
          format: date-time
          description: 署名リンクが機能しなくなる日時。
        email_sent_at:
          type: string
          format: date-time
          nullable: true
        email_unavailable_reason:
          type: string
          nullable: true
        ip_address:
          type: string
          nullable: true
          description: 署名者がコードをリクエストしたときのIPアドレス。
        place:
          type: string
          nullable: true
          description: '収集されません: 常に`null`です。'
        place_unavailable_reason:
          type: string
          nullable: true
          enum:
            - not_collected
    SignatureFieldResult:
      type: object
      description: >-
        署名済み書類のフィールドと、この署名者のコピー上での値。[フィールド](/ja/core-technology/electronic-signature/report-electronic-signature#フィールド)を参照してください。
      properties:
        key:
          type: string
          description: '`sign.field_values`で使用するフィールドのキーです。'
        type:
          type: string
          enum:
            - signature
            - initials
            - full_name
            - date_signed
            - text
            - checkbox
            - email
            - data
        role:
          type: string
          enum:
            - verified_person
            - legal_representative
            - key_people
        label:
          type: string
        page:
          type: integer
          description: ページ番号（1から）。Word文書の場合は、変換後のPDFのページです。
        x:
          type: number
          description: 左端。ページ幅に対する割合で表します。
        'y':
          type: number
          description: ページの高さに対する割合で表した上端。
        width:
          type: number
          description: 幅。ページ幅に対する割合で指定します。
        height:
          type: number
          description: 高さです。ページの高さに対する比率で指定します。
        required:
          type: boolean
        value:
          nullable: true
          description: >-
            `text`、`email`、`full_name`、`date_signed`、`data`では文字列、`checkbox`ではブール値、署名またはイニシャルが適用されている場合は`true`です。空の場合は`null`です。
        display_value:
          type: string
          nullable: true
          description: >-
            ページに刻印された値。日付はフィールドの`date_format`形式、チェックボックスは`Yes`または`No`、署名またはイニシャルは`Signed`です。
        value_source:
          type: string
          nullable: true
          enum:
            - signer
            - identity
            - contact
            - company
            - session
            - metadata
            - api
            - signing_time
            - null
          description: >-
            値の出所です。`signer`（署名者が入力、チェック、または適用したもの）、`identity`（検証済みのID）、`contact`（検証済みのメールアドレスまたは電話番号）、`company`（検証済みの企業）、`session`（`vendor_data`）、`metadata`、`api`（`sign.field_values`）、または`signing_time`（署名日）のいずれかです。
        filled_at:
          type: string
          format: date-time
          nullable: true
        image_url:
          type: string
          nullable: true
          description: >-
            署名とイニシャルのみ：適用された画像のパス。[署名画像をダウンロードする](/ja/sessions-api/electronic-signature/download-field-image)を参照してください。
        value_unavailable_reason:
          type: string
          nullable: true
          enum:
            - source_empty
            - null
          description: >-
            事前入力フィールドの値がセッション内になく、`signature_field_data_missing_action`により署名者がそのまま署名できた場合は`source_empty`です。
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        お客様のアプリケーションのAPIキーです。Business ConsoleのDevelopers -> API
        keysで取得できます。プライマリキーはフルアクセス権を持ちます。名前付きキーにはスコープを設定できます。リソースごとのアクセス権（なし、読み取り、書き込み）、一部のワークフローまたは承認済みセッションへの限定、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.