{"openapi":"3.0.0","info":{"title":"QES API","version":"2","description":"QES API.\n\nThis API uses endpoint-level versioning. The version is part of each operation path.\n\nThe ReadMe documentation version is independent of the QES API. This reference is published on the ReadMe 2.0 documentation version.\n\n**Authentication:** Create an access token with [Create access token](ref:create-access-token) in the Fourthline APIs reference. That endpoint is shared and is documented once. Send the token as `Authorization: Bearer <access_token>`.\n"},"servers":[{"url":"https://api.ext-sandbox.fourthline.com","description":"Main API host. The JSON workflow report is served at **`/v2/workflows/{workflowId}/report/json`** on this host.\n"}],"tags":[{"name":"Qualified Electronic Signature","description":"QES API. Endpoint paths use their own versions, including `/v1/` and `/v2/`. <br /><br />**Fourthline QTSP:** Get signature details → Authorize signature → Get signature status → Get signed document. Fourthline as the QTSP does not use OTP. <br /><br />**External QTSP** (Namirial or InfoCert): the same flow, plus the endpoints labeled **(External QTSP)**. Get signature OTP is Sandbox only, after Authorize signature, when `Signatures.status` is `confirmation_required`. Re-send OTP when the client did not receive it. Confirm signature submits the OTP. <br /><br />**Get QTSP agreement** is **InfoCert only**. It does not apply to Fourthline or Namirial as the QTSP."}],"components":{"parameters":{"authorization":{"name":"Authorization","in":"header","required":true,"description":"The `access_token` returned in your most recent [Create access token](ref:create-access-token) response.","schema":{"type":"string","default":"Bearer <access_token>"}},"cacheControl":{"name":"Cache-Control","in":"header","required":false,"description":"To have the response validated by the origin server instead of reusing stored content, we strongly recommend including this parameter and setting it to `no-cache`.","schema":{"type":"string","default":"no-cache"}}},"schemas":{"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"}}},"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"}}},"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"}}},"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)"}}},"ConfirmSignatureRequest":{"type":"object","description":"The request containing the one-time password.","required":["otp"],"properties":{"otp":{"type":"string","description":"One-time password from SMS. Sandbox testing: after [Authorize signature](ref:authorize-signature-documents), use [Get signature OTP](ref:get-signature-otp) instead of a real SMS.","example":"123456"}}},"SignatureAttemptAccepted":{"type":"object","description":"Authorization or confirmation accepted; processing continues asynchronously.","required":["attemptId"],"properties":{"attemptId":{"type":"string","format":"uuid","description":"The identifier for this authorization or confirmation attempt."}}},"QesErrorResponse":{"type":"object","description":"Qualified Electronic Signature error payload (`title`, `status`, `detail`, `traceId`).","required":["title","status","detail","traceId"],"properties":{"title":{"type":"string","description":"A short, human-readable error label (for example `Invalid Request`, `Document Mismatch`)."},"status":{"type":"integer","description":"The HTTP status code."},"detail":{"type":"string","description":"A human-readable explanation of the error."},"traceId":{"type":"string","description":"Correlation id for support and logging."}}},"SignatureDetailsResponse":{"type":"object","description":"Signature details including documents to sign, legal documents, clauses when applicable, and OTP settings.","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":"#/components/schemas/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":"#/components/schemas/SignatureLegalDocument"}},"clauses":{"type":"array","description":"InfoCert legal clauses to display for the client to accept, when applicable","items":{"$ref":"#/components/schemas/SignatureLegalClause"}},"otpSettings":{"$ref":"#/components/schemas/SignatureOtpSettings"}}},"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"}}},"SignatureReportResponse":{"type":"object","description":"Current signature status, messages, and document payloads","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":"#/components/schemas/SignatureReportMessage"}},"documentsToSign":{"type":"array","description":"Documents to sign, when still pending authorization","items":{"$ref":"#/components/schemas/SignatureDocumentSummary"}},"signedDocuments":{"type":"array","description":"Present when status is `signed`; each item may include base64-encoded content","items":{"$ref":"#/components/schemas/SignedDocumentPayload"}},"timestamp":{"type":"string","format":"date-time","description":"The timestamp of the report. <br /><br />Format: ISO 8601 UTC date and time"}}}}},"paths":{"/v2/workflows/{workflowId}/signatures/details":{"get":{"summary":"Get signature details","description":"Use this endpoint to retrieve signature details, including documents to sign, legal documents, and OTP settings.","operationId":"get-signature-details","tags":["Qualified Electronic Signature"],"parameters":[{"$ref":"#/components/parameters/authorization"},{"$ref":"#/components/parameters/cacheControl"},{"name":"workflowId","in":"path","required":true,"description":"The unique identifier of a signature already created. <br /><br />Format: uuid <br /><br />Example: `790f325a-48c9-4b82-bb53-c0ea128236f0`","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Signature details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureDetailsResponse"},"examples":{"ok":{"summary":"OK","value":{"clientId":"550e8400-e29b-41d4-a716-446655440000","verificationId":"550e8400-e29b-41d4-a716-446655440001","mobilePhoneNumber":"****1234","documentsToSign":[{"id":"550e8400-e29b-41d4-a716-446655440002","fileName":"document.pdf","displayName":"Contract Document"}],"legalDocuments":[{"id":"legal-doc-1","url":"https://example.com/legal-doc.pdf","text":"Legal document text","version":1}],"clauses":[{"id":"clause-1","text":"Important legal clause text","version":1}],"otpSettings":{"validation":"otp","length":6}}}}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QesErrorResponse"},"examples":{"invalidRequest":{"summary":"Invalid Request","value":{"title":"Invalid Request","status":400,"detail":"Invalid request parameters","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}}}}},"404":{"description":"The specified workflow/signature was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QesErrorResponse"},"examples":{"signatureNotFound":{"summary":"Signature Not Found","value":{"title":"Signature Not Found","status":404,"detail":"The specified workflow/signature was not found","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}}}}}}}},"/v2/workflows/{workflowId}/signatures/authorize":{"post":{"summary":"Authorize signature","description":"Use this endpoint to authorize documents for signing by validating document hashes. This starts the authorization process.","operationId":"authorize-signature-documents","tags":["Qualified Electronic Signature"],"parameters":[{"$ref":"#/components/parameters/authorization"},{"$ref":"#/components/parameters/cacheControl"},{"name":"workflowId","in":"path","required":true,"description":"The unique identifier of the workflow (signature) to authorize. <br /><br />Format: uuid <br /><br />Example: `790f325a-48c9-4b82-bb53-c0ea128236f0`","schema":{"type":"string","format":"uuid"}},{"name":"lang","in":"query","required":false,"description":"Optional. The purpose depends on the active QTSP provider: <br /><br />• **Namirial**: Language of the SMS one-time passcode (OTP) sent to the client. <br />• **InfoCert**: Language of the legal documents presented during signing. <br /><br />Format: ISO 639-1 alpha-2 <br />Enum: <br />• `cs`: Czech <br />• `de`: German <br />• `en`: English (default) <br />• `es`: Spanish <br />• `fi`: Finnish <br />• `fr`: French <br />• `it`: Italian <br />• `nl`: Dutch <br />• `pl`: Polish <br />• `sk`: Slovak.","schema":{"type":"string","enum":["cs","de","en","es","fi","fr","it","nl","pl","sk"]}}],"requestBody":{"required":true,"content":{"application/json":{"examples":{"Authorize Request":{"value":{"authorizedDocuments":[{"documentId":"550e8400-e29b-41d4-a716-446655440000","documentHash":"sha256-hash-of-document"}],"legalDocumentsAccepted":[{"id":"legal-doc-1","url":"https://example.com/legal-doc.pdf","text":"Legal document text content","version":1}]}}},"schema":{"type":"object","required":["authorizedDocuments"],"properties":{"authorizedDocuments":{"type":"array","description":"The documents to authorize with content hashes.","items":{"type":"object","required":["documentId","documentHash"],"properties":{"documentId":{"type":"string","format":"uuid","description":"The unique identifier of the document."},"documentHash":{"type":"string","description":"The hash of the document content (for example SHA-256)."}}}},"legalDocumentsAccepted":{"type":"array","description":"The legal documents the signer accepted (optional; each item requires `id` and `version`; `url` and `text` are optional).","items":{"type":"object","required":["id","version"],"properties":{"id":{"type":"string","description":"The unique identifier of the legal document."},"url":{"type":"string","format":"uri","description":"The URL of the legal document."},"text":{"type":"string","description":"The text content of the legal document."},"version":{"type":"integer","minimum":1,"description":"The version from 1 upward."}}}}}}}}},"responses":{"202":{"description":"The authorization request was accepted and processing started","content":{"application/json":{"examples":{"accepted":{"summary":"Accepted","value":{"attemptId":"550e8400-e29b-41d4-a716-446655440002"}}},"schema":{"$ref":"#/components/schemas/SignatureAttemptAccepted"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"examples":{"invalidRequest":{"summary":"Invalid Request","value":{"title":"Invalid Request","status":400,"detail":"Invalid request parameters","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"$ref":"#/components/schemas/QesErrorResponse"}}}},"404":{"description":"The specified workflow/signature was not found","content":{"application/json":{"examples":{"signatureNotFound":{"summary":"Signature Not Found","value":{"title":"Signature Not Found","status":404,"detail":"The specified workflow/signature was not found","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"$ref":"#/components/schemas/QesErrorResponse"}}}},"409":{"description":"The authorized documents do not match the documents to sign","content":{"application/json":{"examples":{"documentMismatch":{"summary":"Document Mismatch","value":{"title":"Document Mismatch","status":409,"detail":"The authorized documents do not match the documents to sign","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"$ref":"#/components/schemas/QesErrorResponse"}}}},"429":{"description":"The number of retry attempts has been exceeded","content":{"application/json":{"examples":{"attemptsExceeded":{"summary":"Attempts Exceeded","value":{"title":"Attempts Exceeded","status":429,"detail":"The number of retry attempts has been exceeded","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"$ref":"#/components/schemas/QesErrorResponse"}}}}}}},"/v1/signatures/{workflowId}/otp":{"get":{"summary":"Get signature OTP","description":"External QTSP only (Namirial or InfoCert). Fourthline as the QTSP does **not** use OTP. <br /><br />**Sandbox environment only:** Use this endpoint to retrieve the one-time passcode (OTP) for a test signature, after [Authorize signature](ref:authorize-signature-documents). <br /><br />Call this endpoint when `Signatures.status` is `confirmation_required`, then pass the OTP in [Confirm signature](ref:confirm-signature). <br /><br /><img src=\"https://files.readme.io/310d4d3-Inline_Caution.svg\" align=\"left\" alt=\"Important\" /> **Important:** Handle OTP data as sensitive information. This endpoint is for Sandbox testing and does **not** replace SMS OTP in Production.","operationId":"get-signature-otp","tags":["Qualified Electronic Signature"],"parameters":[{"$ref":"#/components/parameters/authorization"},{"$ref":"#/components/parameters/cacheControl"},{"name":"workflowId","in":"path","required":true,"description":"The unique identifier of the workflow (signature). <br /><br />Format: uuid <br /><br />Example: `790f325a-48c9-4b82-bb53-c0ea128236f0`","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OTP returned","content":{"application/json":{"examples":{"ok":{"summary":"OK","value":{"otp":"123456"}}},"schema":{"type":"object","properties":{"otp":{"type":"string"}}}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"examples":{"bad_request":{"summary":"Bad Request","value":{"title":"Invalid Request","status":400,"detail":"Invalid request parameters","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"type":"object"}}}},"404":{"description":"OTP not yet available for this signature","content":{"application/json":{"examples":{"not_found":{"summary":"Not Found","value":{"title":"OTP Not Available","status":404,"detail":"OTP not yet available for this signature","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"type":"object"}}}}}}},"/v2/workflows/{workflowId}/signatures/resendOtp":{"post":{"summary":"Re-send OTP (External QTSP)","description":"External QTSP only (Namirial or InfoCert). Fourthline as the QTSP does **not** use OTP. <br /><br />Use this endpoint to resend the one-time passcode (OTP) to the client’s mobile number.","operationId":"resend-signature-otp","tags":["Qualified Electronic Signature"],"parameters":[{"$ref":"#/components/parameters/authorization"},{"$ref":"#/components/parameters/cacheControl"},{"name":"workflowId","in":"path","required":true,"description":"The unique identifier of the workflow (signature). <br /><br />Format: uuid <br /><br />Example: `790f325a-48c9-4b82-bb53-c0ea128236f0`","schema":{"type":"string","format":"uuid"}},{"name":"lang","in":"query","required":false,"description":"The language used for the SMS OTP. <br /><br />Format: ISO 639-1 alpha-2","schema":{"type":"string"}}],"responses":{"202":{"description":"OTP send request accepted","content":{"application/json":{"examples":{"accepted":{"summary":"Accepted","value":{"message":"OTP sent successfully"}}},"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"The documents to sign have not been authorized","content":{"application/json":{"examples":{"bad_request":{"summary":"Bad Request","value":{"title":"Not Authorized","status":400,"detail":"The documents to sign have not been authorized","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"type":"object"}}}},"404":{"description":"The specified workflow/signature was not found","content":{"application/json":{"examples":{"not_found":{"summary":"Not Found","value":{"title":"Signature Not Found","status":404,"detail":"The specified workflow/signature was not found","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"type":"object"}}}},"422":{"description":"The certificate has expired, documents need to be authorized again","content":{"application/json":{"examples":{"unprocessable_entity":{"summary":"Unprocessable Entity","value":{"title":"Certificate Expired","status":422,"detail":"The certificate has expired, documents need to be authorized again","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"type":"object"}}}},"429":{"description":"The number of retry attempts has been exceeded","content":{"application/json":{"examples":{"too_many_requests":{"summary":"Too Many Requests","value":{"title":"Attempts Exceeded","status":429,"detail":"The number of retry attempts has been exceeded","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"type":"object"}}}}}}},"/v2/workflows/{workflowId}/signatures/confirm":{"post":{"summary":"Confirm signature (External QTSP)","description":"External QTSP only (Namirial or InfoCert). Fourthline as the QTSP does **not** use OTP. <br /><br />Use this endpoint to confirm signing using a one-time passcode (OTP).","operationId":"confirm-signature","tags":["Qualified Electronic Signature"],"parameters":[{"$ref":"#/components/parameters/authorization"},{"$ref":"#/components/parameters/cacheControl"},{"name":"workflowId","in":"path","required":true,"description":"The unique identifier of a signature already created. <br /><br />Format: uuid <br /><br />Example: `790f325a-48c9-4b82-bb53-c0ea128236f0`","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"description":"The request containing the one-time password.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmSignatureRequest"},"examples":{"confirmSignatureRequest":{"summary":"Confirm signature request","value":{"otp":"123456"}}}}}},"responses":{"202":{"description":"The confirmation request was accepted and processing started","content":{"application/json":{"examples":{"accepted":{"summary":"Accepted","value":{"attemptId":"550e8400-e29b-41d4-a716-446655440003"}}},"schema":{"$ref":"#/components/schemas/SignatureAttemptAccepted"}}}},"400":{"description":"The documents to sign have not been authorized","content":{"application/json":{"examples":{"notAuthorized":{"summary":"Not Authorized","value":{"title":"Not Authorized","status":400,"detail":"The documents to sign have not been authorized","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"$ref":"#/components/schemas/QesErrorResponse"}}}},"404":{"description":"The specified workflow/signature was not found","content":{"application/json":{"examples":{"signatureNotFound":{"summary":"Signature Not Found","value":{"title":"Signature Not Found","status":404,"detail":"The specified workflow/signature was not found","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"$ref":"#/components/schemas/QesErrorResponse"}}}},"409":{"description":"The one-time password does not match","content":{"application/json":{"examples":{"wrongOtp":{"summary":"Wrong OTP","value":{"title":"Wrong OTP","status":409,"detail":"The one-time password does not match","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"$ref":"#/components/schemas/QesErrorResponse"}}}},"422":{"description":"Error signing documents, please restart the signature","content":{"application/json":{"examples":{"signingError":{"summary":"Signing Error","value":{"title":"Signing Error","status":422,"detail":"Error signing documents, please restart the signature","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"$ref":"#/components/schemas/QesErrorResponse"}}}},"429":{"description":"The number of retry attempts has been exceeded","content":{"application/json":{"examples":{"attemptsExceeded":{"summary":"Attempts Exceeded","value":{"title":"Attempts Exceeded","status":429,"detail":"The number of retry attempts has been exceeded","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"$ref":"#/components/schemas/QesErrorResponse"}}}}}}},"/v2/signatures/{workflowId}/report":{"get":{"summary":"Get signature status","description":"Use this endpoint to retrieve the current signature status, and signed document.\nSigned document payloads are returned only if the status is `signed`.\n\nThe response includes signature data such as:\n* Signature status\n* Documents to sign\n* Signed documents\n","operationId":"get-signature-status","tags":["Qualified Electronic Signature"],"parameters":[{"$ref":"#/components/parameters/authorization"},{"$ref":"#/components/parameters/cacheControl"},{"name":"workflowId","in":"path","required":true,"description":"The unique identifier of the signature workflow. <br /><br />Format: uuid <br /><br />Example: `790f325a-48c9-4b82-bb53-c0ea128236f0`","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Signature report returned","content":{"application/json":{"examples":{"ok":{"summary":"OK","value":{"workflowId":"550e8400-e29b-41d4-a716-446655440001","status":"signed","messages":[{"description":"Signature completed successfully","statusCode":200,"attemptId":"550e8400-e29b-41d4-a716-446655440000"}],"documentsToSign":[{"id":"550e8400-e29b-41d4-a716-446655440002","fileName":"document.pdf","displayName":"Contract Document"}],"signedDocuments":[{"id":"550e8400-e29b-41d4-a716-446655440003","fileName":"signed_document.pdf","content":"[base64-encoded-content]"}],"timestamp":"2024-01-15T10:30:00Z"}}},"schema":{"$ref":"#/components/schemas/SignatureReportResponse"}}}},"400":{"description":"Request validation failed","content":{"application/json":{"examples":{"bad_request":{"summary":"Bad Request","value":{"title":"Invalid Request","status":400,"detail":"The documents to sign have not been authorized","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"type":"object"}}}},"404":{"description":"The specified workflow/signature was not found","content":{"application/json":{"examples":{"not_found":{"summary":"Not Found","value":{"title":"Signature Not Found","status":404,"detail":"The specified workflow/signature was not found","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"type":"object"}}}}}}},"/v1/signatures/{signatureId}/signedDocuments/{documentId}":{"get":{"summary":"Get signed document","description":"Use this endpoint to download each signed document. <br /><br /><img src=\"https://files.readme.io/310d4d3-Inline_Caution.svg\" align=\"left\" alt=\"Important\" /> **Important:** <br />• Before using this endpoint, see the <a href=\"https://docs.fourthline.com/v2.0/docs/qes-integration\">integration guide</a>. <br />• <code>signatureId</code> and <code>workflowId</code> are string identifiers that can be used interchangeably.","operationId":"get-signed-document","tags":["Qualified Electronic Signature"],"parameters":[{"name":"signatureId","in":"path","required":true,"description":"Our unique identifier for the signature. <br /><br />Format: uuid <br /><br />Example: `790f325a-48c9-4b82-bb53-c0ea128236f0` <br /><br /><img src=\"https://files.readme.io/8eb9022-Inline_Tip.svg\" align=\"left\"/>**Tip**: This is the **same** value as the `workflowId` returned in the [Create workflow](ref:create-workflow) response.","schema":{"type":"string","format":"uuid"}},{"name":"documentId","in":"path","required":true,"description":"The unique identifier of the signed document. Use the document id from [Get signature details](ref:get-signature-details) (`documentsToSign[].id`) or [Get signature status](ref:get-signature-status) (`signedDocuments`). <br /><br />Format: uuid <br /><br />Example: `ee974f24-5d27-439c-a849-88c2271b5765`","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/authorization"},{"$ref":"#/components/parameters/cacheControl"}],"responses":{"200":{"description":"Signed document returned","headers":{"Content-Type":{"schema":{"type":"string"},"example":"application/pdf"},"Content-Disposition":{"schema":{"type":"string"},"example":"attachment; filename=agreement1.pdf; filename*=UTF-8''agreement1.pdf"}},"content":{"application/pdf":{"schema":{"type":"string","format":"binary"},"examples":{"ok":{"summary":"OK","value":"[PDF file content]"}}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"examples":{"badRequest":{"summary":"Bad Request","value":{"status":400,"detail":"The signature status does not allow the operation","signatureStatus":"user_consent_required"}}},"schema":{"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code."},"detail":{"type":"string","description":"A human-readable explanation of the error."},"signatureStatus":{"type":"string","description":"The current Qualified Electronic Signature [product status](https://docs.fourthline.com/v2.0/docs/product-statuses#qualified-electronic-signature-statuses)."}}}}}},"404":{"description":"Signed document not found","content":{"application/json":{"examples":{"notFound":{"summary":"Not Found","value":{"title":"Not Found","status":404,"detail":"Signed document with signatureId bbb3ab7c-aaf4-4312-95ef-547a90ea9779 and documentId ee974f24-5d27-439c-a849-88c2271b5765 does not exist","traceId":"00-d76dab58e1457ff10204999075ef24e8-a9baf9b62cb6c8d5-00"}}},"schema":{"$ref":"#/components/schemas/QesErrorResponse"}}}}},"deprecated":false}},"/v2/workflows/{workflowId}/signatures/selfie":{"post":{"summary":"Upload signature selfie","description":"Use this endpoint to upload and validate a selfie to verify client eligibility.","operationId":"upload-signature-selfie","tags":["Qualified Electronic Signature"],"parameters":[{"$ref":"#/components/parameters/authorization"},{"$ref":"#/components/parameters/cacheControl"},{"name":"workflowId","in":"path","required":true,"description":"The unique identifier of the workflow (signature). <br /><br />Format: uuid <br /><br />Example: `790f325a-48c9-4b82-bb53-c0ea128236f0`","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["selfie"],"properties":{"selfie":{"type":"string","format":"binary","description":"Selfie image file."}}}}}},"responses":{"200":{"description":"Selfie validated","content":{"application/json":{"examples":{"ok":{"summary":"OK","value":{"message":"Selfie validated successfully"}}},"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Selfie is not a valid image","content":{"application/json":{"examples":{"bad_request":{"summary":"Bad Request","value":{"title":"Invalid Image","status":400,"detail":"Selfie is not a valid image","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"type":"object"}}}},"404":{"description":"The specified workflow/signature was not found","content":{"application/json":{"examples":{"not_found":{"summary":"Not Found","value":{"title":"Signature Not Found","status":404,"detail":"The specified workflow/signature was not found","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"type":"object"}}}},"422":{"description":"Selfie validation failed, try with a new selfie","content":{"application/json":{"examples":{"unprocessable_entity":{"summary":"Unprocessable Entity","value":{"title":"Invalid Selfie","status":422,"detail":"Selfie validation failed, try with a new selfie","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"type":"object"}}}}}}},"/v2/workflows/{workflowId}/signatures/qtspAgreement":{"get":{"summary":"Get QTSP agreement (InfoCert)","description":"InfoCert only. Use this endpoint to download the InfoCert QTSP agreement document. This endpoint does **not** apply to Fourthline or Namirial as the QTSP.","operationId":"get-qtsp-agreement","tags":["Qualified Electronic Signature"],"parameters":[{"$ref":"#/components/parameters/authorization"},{"$ref":"#/components/parameters/cacheControl"},{"name":"workflowId","in":"path","required":true,"description":"The unique identifier of a signature already created. <br /><br />Format: uuid <br /><br />Example: `790f325a-48c9-4b82-bb53-c0ea128236f0`","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"QTSP agreement document downloaded successfully","headers":{"Content-Type":{"schema":{"type":"string"},"example":"application/pdf"},"Content-Disposition":{"schema":{"type":"string"},"example":"attachment; filename=\"qtsp-agreement.pdf\""}},"content":{"application/pdf":{"schema":{"type":"string","format":"binary"},"examples":{"ok":{"summary":"OK","value":"[PDF file content]"}}}}},"204":{"description":"No QTSP agreement available for this signature","content":{"application/json":{"schema":{"type":"object","description":"Empty body. No QTSP agreement is available for this signature.","maxProperties":0},"examples":{"noAgreement":{"summary":"No Agreement","value":{}}}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QesErrorResponse"},"examples":{"invalidRequest":{"summary":"Invalid Request","value":{"title":"Invalid Request","status":400,"detail":"Invalid request parameters","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}}}}},"404":{"description":"The specified workflow/signature was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QesErrorResponse"},"examples":{"signatureNotFound":{"summary":"Signature Not Found","value":{"title":"Signature Not Found","status":404,"detail":"The specified workflow/signature was not found","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}}}}}}}},"/v2/workflows/{signatureId}/signatures/certificateInformation":{"get":{"summary":"Get certificate metadata","description":"Use this endpoint to return the certificate metadata generated for a signature after the signing process is completed. <br /><br /><img src=\"https://files.readme.io/310d4d3-Inline_Caution.svg\" align=\"left\" alt=\"Important\" /> **Important:** This endpoint can only be called when the signature [status](https://docs.fourthline.com/v2.0/docs/product-statuses#qualified-electronic-signature-statuses) is `signed`. Otherwise, the API returns a `400 Bad Request` response.","operationId":"get-certificate-metadata","tags":["Qualified Electronic Signature"],"parameters":[{"name":"signatureId","in":"path","required":true,"description":"Our unique identifier for the signature. <br /><br />Format: uuid string <br /><br />Example: `790f325a-48c9-4b82-bb53-c0ea128236f0` <br /><img src=\"https://files.readme.io/8eb9022-Inline_Tip.svg\" align=\"left\"/>**Tip:** This is the **same** value as the `workflowId` returned in the [Create workflow](ref:create-workflow) response.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/authorization"},{"$ref":"#/components/parameters/cacheControl"}],"responses":{"200":{"description":"The certificate metadata was retrieved successfully","content":{"application/json":{"examples":{"ok":{"summary":"OK","value":{"certificateId":"3182f97e-1ebf-47de-be5b-b9b93e76e2b5","certificateType":"LONG-LIVED","serialNumber":"402DB9E46A1060AE","createdDate":"2026-05-12T12:00:18.549627","certificateData":{"firstName":"John","middleName":"James","lastName":"Smith","phoneNumber":"+39 11111112345","email":"j.smith@example.com","documentNumber":"A00000000","documentType":"Passport","issuingCountry":"MYS","issuingDate":"2016-12-22","expirationDate":"2030-03-15"}}}},"schema":{"type":"object","properties":{"certificateId":{"type":"string","format":"uuid","nullable":true,"description":"The unique identifier of the certificate."},"certificateType":{"type":"string","nullable":true,"description":"The type of the certificate. <br /> Possible values `DISPOSABLE` or `LONG-LIVED`."},"serialNumber":{"type":"string","nullable":true,"description":"The serial number of the certificate."},"createdDate":{"type":"string","format":"date-time","nullable":true,"description":"The date and time when the certificate was created."},"certificateData":{"type":"object","description":"The certificate holder information.","properties":{"firstName":{"type":"string","description":"The client’s first name. <br /><br />Format: Alphabetical characters, spaces, hyphens, and apostrophes <br /><br />Example: `John`"},"middleName":{"type":"string","description":"The client’s middle name(s). <br /><br />Format: Alphabetical characters, spaces, hyphens, and apostrophes <br /><br />Example: `James`"},"lastName":{"type":"string","description":"The client’s last name. <br /><br />Format: Alphabetical characters, spaces, hyphens, and apostrophes <br /><br />Example: `Smith`"},"phoneNumber":{"type":"string","description":"The client’s mobile phone number, which you have ensured is valid. <br /><br />Format: `+prefixNumber phoneNumber` <br /><img src=\"https://files.readme.io/ad2486a-Inline_Note.svg\" align=\"left\"/> **Notes**: <br />• Always include a **space** between the prefix and phone number. <br />• The prefix can contain a maximum of **4** digits. <br /><br />Example: `+31 612345678`"},"email":{"type":"string","description":"The client’s email address. <br /><br />Format: Maximum 254 characters [_-a-zA-Z0-9.+]+@a-zA-Z0-9 <br /><br />Example: `j.smith@example.com`"},"documentNumber":{"type":"string","description":"The number of the client’s <Glossary>ID document</Glossary>."},"documentType":{"type":"string","description":"The type of ID document. <br /><br />Enum: <br />• `Passport` <br />• `National ID Card` <br />• `Driving License` <br />• `Paper ID` <br />• `Residence Permit`","enum":["Passport","National ID Card","Driving License","Paper ID","Residence Permit"]},"issuingCountry":{"type":"string","description":"The country that issues the ID documents. <br /><br />Format: ISO 3166-1 alpha-3"},"issuingDate":{"type":"string","description":"The date the ID document was issued. <br /><br />Format: YYYY-MM-DD <br /><br />Requirements: ID documents with an issue date. Otherwise optional for identity files without an issue date. <br />If **not** provided, the value returned is `0000-01-01`."},"expirationDate":{"type":"string","description":"The date the ID document expires. <br /><br />Format: YYYY-MM-DD <br /><br />Requirements: ID documents with an expiry date. Otherwise optional for identity files without an expiry date. <br />If **not** provided, the value returned is `0000-01-01`."}}}}}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"examples":{"badRequest":{"summary":"Bad Request","value":{"title":"Invalid Request","status":400,"detail":"The request failed because the signature is not in signed status or the request validation failed (for example, a missing tenant).","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"allOf":[{"$ref":"#/components/schemas/QesErrorResponse"},{"type":"object","description":"The request failed because the signature is not in `signed` status or the request validation failed (for example, a missing tenant)."}]}}}},"404":{"description":"Signature not found","content":{"application/json":{"examples":{"notFound":{"summary":"Not Found","value":{"title":"Signature Not Found","status":404,"detail":"No signature was found for the specified signatureId and tenant.","traceId":"00-7c3e8f2a1b4d5e6f7890abcdef123456-7890abcdef1234567-00"}}},"schema":{"allOf":[{"$ref":"#/components/schemas/QesErrorResponse"},{"type":"object","description":"No signature was found for the specified `signatureId` and `tenant`."}]}}}}},"deprecated":false}}},"x-readme":{"headers":[],"explorer-enabled":false,"proxy-enabled":true,"samples-enabled":true},"x-readme-fauxas":true}