{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fourthline/json-schema/fourthline-signature-report-response-schema.json",
  "title": "SignatureReportResponse",
  "description": "Current signature status, messages, and document payloads",
  "x-generated": "2026-12-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fourthline-qes-api-openapi.yml#/components/schemas/SignatureReportResponse",
  "type": "object",
  "properties": {
    "workflowId": {
      "type": "string",
      "format": "uuid",
      "description": "The unique identifier of the workflow (signature). <br /><br />Format: uuid <br /><br />Example: `790f325a-48c9-4b82-bb53-c0ea128236f0`"
    },
    "status": {
      "type": "string",
      "description": "The current QES product status (for example `signed`, `user_consent_required`). See [Product statuses](https://docs.fourthline.com/v2.0/docs/product-statuses#qualified-electronic-signature-statuses)"
    },
    "messages": {
      "type": "array",
      "description": "Status or error messages for this signature",
      "items": {
        "$ref": "#/$defs/SignatureReportMessage"
      }
    },
    "documentsToSign": {
      "type": "array",
      "description": "Documents to sign, when still pending authorization",
      "items": {
        "$ref": "#/$defs/SignatureDocumentSummary"
      }
    },
    "signedDocuments": {
      "type": "array",
      "description": "Present when status is `signed`; each item may include base64-encoded content",
      "items": {
        "$ref": "#/$defs/SignedDocumentPayload"
      }
    },
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp of the report. <br /><br />Format: ISO 8601 UTC date and time"
    }
  },
  "$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"
        }
      }
    },
    "SignatureReportMessage": {
      "type": "object",
      "description": "A status or error message on the signature report",
      "properties": {
        "description": {
          "type": "string",
          "description": "A human-readable description of the message"
        },
        "statusCode": {
          "type": "integer",
          "description": "The numeric status code for this message"
        },
        "attemptId": {
          "type": "string",
          "format": "uuid",
          "description": "The identifier of the related authorization or confirmation attempt, when present. <br /><br />Format: uuid"
        }
      }
    },
    "SignedDocumentPayload": {
      "type": "object",
      "description": "A signed document returned when the signature status is `signed`",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The unique identifier of the signed document, matching the metadata `id` from upload. <br /><br />Format: uuid"
        },
        "fileName": {
          "type": "string",
          "description": "The filename of the signed document"
        },
        "content": {
          "type": "string",
          "description": "Base64-encoded file bytes when returned"
        }
      }
    }
  }
}