{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fourthline/json-schema/fourthline-signature-details-response-schema.json",
  "title": "SignatureDetailsResponse",
  "description": "Signature details including documents to sign, legal documents, clauses when applicable, and OTP settings.",
  "x-generated": "2026-12-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fourthline-qes-api-openapi.yml#/components/schemas/SignatureDetailsResponse",
  "type": "object",
  "properties": {
    "clientId": {
      "type": "string",
      "format": "uuid",
      "description": "The unique client id assigned to the client by Fourthline. <br /><br />Format: uuid <br /><br />Example: `baa2bf19-5258-47ec-b428-276d3f045820`"
    },
    "verificationId": {
      "type": "string",
      "format": "uuid",
      "description": "The unique identifier of the related Identity Verification case. <br /><br />Format: uuid <br /><br />Example: `790f325a-48c9-4b82-bb53-c0ea128236f0`"
    },
    "mobilePhoneNumber": {
      "type": "string",
      "description": "The masked mobile number for display"
    },
    "documentsToSign": {
      "type": "array",
      "description": "The documents for the client to review and approve before signing",
      "items": {
        "$ref": "#/$defs/SignatureDocumentSummary"
      }
    },
    "legalDocuments": {
      "type": "array",
      "description": "The [QTSP legal conditions](https://docs.fourthline.com/v2.0/docs/qes-overview) to display for the client to review and accept",
      "items": {
        "$ref": "#/$defs/SignatureLegalDocument"
      }
    },
    "clauses": {
      "type": "array",
      "description": "InfoCert legal clauses to display for the client to accept, when applicable",
      "items": {
        "$ref": "#/$defs/SignatureLegalClause"
      }
    },
    "otpSettings": {
      "$ref": "#/$defs/SignatureOtpSettings"
    }
  },
  "$defs": {
    "SignatureDocumentSummary": {
      "type": "object",
      "description": "A document to sign returned by QES endpoints",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The unique identifier of the document to sign, matching the metadata `id` from [Upload client document](ref:upload-client-document). <br /><br />Format: uuid <br /><br />Example: `790f325a-48c9-4b82-bb53-c0ea128236f0`"
        },
        "fileName": {
          "type": "string",
          "description": "The filename of the document to sign"
        },
        "displayName": {
          "type": "string",
          "description": "The filename to display to the client on the document approval screen in your user interface"
        }
      }
    },
    "SignatureLegalClause": {
      "type": "object",
      "description": "An InfoCert legal clause for the client to accept on the document approval screen",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier of the legal clause"
        },
        "text": {
          "type": "string",
          "description": "The text to display with an acceptance checkbox for the client"
        },
        "version": {
          "type": "integer",
          "description": "The version of the legal clause. <br /><br />Format: int32"
        }
      }
    },
    "SignatureLegalDocument": {
      "type": "object",
      "description": "A QTSP legal conditions document for the client to review and accept",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier of the legal document, returned in [Get signature details](ref:get-signature-details). Pass this value in [Authorize signature](ref:authorize-signature-documents) as `legalDocumentsAccepted[].id`"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "The URL where the legal document is stored"
        },
        "text": {
          "type": "string",
          "description": "The text content of the legal document, when returned inline instead of a URL"
        },
        "version": {
          "type": "integer",
          "description": "The version of the legal document. <br /><br />Format: int32"
        }
      }
    },
    "SignatureOtpSettings": {
      "type": "object",
      "description": "One-time passcode (OTP) settings for signature confirmation",
      "properties": {
        "validation": {
          "type": "string",
          "description": "The validation type applied to the one-time passcode"
        },
        "length": {
          "type": "integer",
          "description": "The number of digits in the one-time passcode (for example `6` or `8`, depending on QTSP)"
        }
      }
    }
  }
}