Signature

post/api/signature

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/signature
  • Auth: none declared

Request body

documentKeystring nullable
securityContextIdstring uuid nullable
signatureType'Pdf' | 'Cms' | 'Xml'

Example request

{
  "pdfSignatureOptions": {
    "pageOptimization": {
      "pageOrientation": "Auto",
      "customPaperSize": {
        "width": 4.145608029883936,
        "height": 2.027123023002322
      },
      "paperSize": "Custom"
    },
    "measurementUnits": "Centimeters",
    "visualRepresentation": {
      "image": {
        "verticalAlign": "Top",
        "resource": {
          "mimeType": "mimeType",
          "url": "url",
          "content": "content"
        },
        "horizontalAlign": "Left",
        "opacity": 9
      },
      "text": {
        "container": {
          "top": 1.4658129805029452,
          "left": 6.027456183070403,
          "bottom": 5.637376656633329,
          "width": 2.3021358869347655,
          "right": 5.962133916683182,
          "height": 7.061401241503109
        },
        "horizontalAlign": "Left",
        "fontSize": 0.8008281904610115,
        "text": "text",
        "includeSigningTime": true
      },
      "position": {
        "auto": {
          "container": {
            "top": 1.4658129805029452,
            "left": 6.027456183070403,
            "bottom": 5.637376656633329,
            "width": 2.3021358869347655,
            "right": 5.962133916683182,
            "height": 7.061401241503109
          },
          "signatureRectangleSize": {
            "width": 4.145608029883936,
            "height": 2.027123023002322
          },
          "horizontalDirection": "LeftToRight",
          "verticalDirection": "TopDown",
          "rowSpacing": 7.386281948385884
        },
        "pageNumber": 3,
        "pageOptimization": {
          "pageOrientation": "Auto",
          "customPaperSize": {
            "width": 4.145608029883936,
            "height": 2.027123023002322
          },
          "paperSize": "Custom"
        },
        "manual": {
          "top": 1.4658129805029452,
          "left": 6.027456183070403,
          "bottom": 5.637376656633329,
          "width": 2.3021358869347655,
          "right": 5.962133916683182,
          "height": 7.061401241503109
        },
        "measurementUnits": "Centimeters"
      }
    }
  },
  "file": {
    "name": "name",
    "length": 0,
    "location": "location",
    "mimeType": "mimeType",
    "contentType": "contentType",
    "content": "content",
    "url": "url",
    "blobToken": "blobToken"
  },
  "documentKey": "documentKey",
  "certificate": {
    "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "content": "content"
  },
  "securityContextId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "signatureType": "Pdf",
  "xmlSignatureOptions": {
    "type": "XmlElement",
    "elementToSignId": "elementToSignId",
    "signatureElementLocation": {
      "insertionOption": "AppendChild",
      "xPath": "xPath",
      "namespaces": [
        {
          "prefix": "prefix",
          "uri": "uri"
        },
        {
          "prefix": "prefix",
          "uri": "uri"
        }
      ]
    }
  },
  "cmsSignatureOptions": {
    "detached": true,
    "dataFile": {
      "name": "name",
      "length": 0,
      "location": "location",
      "mimeType": "mimeType",
      "contentType": "contentType",
      "content": "content",
      "url": "url",
      "blobToken": "blobToken"
    },
    "dataHashes": [
      {
        "hexValue": "hexValue",
        "value": "value",
        "algorithm": "MD5"
      },
      {
        "hexValue": "hexValue",
        "value": "value",
        "algorithm": "MD5"
      }
    ]
  }
}

Response

Success

successboolean
failure'PdfAlreadySigned' | 'CorruptedPdf' | 'CertificateValidationFailed'
statestring nullable

Example response

{
  "toSignHash": {
    "hexValue": "hexValue",
    "value": "value",
    "algorithm": "MD5"
  },
  "validationResults": {
    "passedChecks": [
      {
        "detail": "detail",
        "type": "Success",
        "message": "message",
        "innerValidationResults": null
      },
      {
        "detail": "detail",
        "type": "Success",
        "message": "message",
        "innerValidationResults": null
      }
    ],
    "warnings": [
      {
        "detail": "detail",
        "type": "Success",
        "message": "message",
        "innerValidationResults": null
      },
      {
        "detail": "detail",
        "type": "Success",
        "message": "message",
        "innerValidationResults": null
      }
    ],
    "errors": [
      {
        "detail": "detail",
        "type": "Success",
        "message": "message",
        "innerValidationResults": null
      },
      {
        "detail": "detail",
        "type": "Success",
        "message": "message",
        "innerValidationResults": null
      }
    ]
  },
  "success": true,
  "failure": "PdfAlreadySigned",
  "certificate": {
    "serialNumber": "serialNumber",
    "issuerName": {
      "country": "country",
      "commonName": "commonName",
      "serialNumber": "serialNumber",
      "initials": "initials",
      "dnString": "dnString",
      "givenName": "givenName",
      "locality": "locality",
      "organizationUnit": "organizationUnit",
      "title": "title",
      "pseudonym": "pseudonym",
      "emailAddress": "emailAddress",
      "dnQualifier": "dnQualifier",
      "stateName": "stateName",
      "surname": "surname",
      "organization": "organization",
      "generationQualifier": "generationQualifier",
      "allValues": {
        "key": [
          "allValues",
          "allValues"
        ]
      }
    },
    "validityEnd": "2000-01-23T04:56:07.000+00:00",
    "thumbprint": "thumbprint",
    "pkiBrazil": {
      "rgEmissor": "rgEmissor",
      "oabNumero": "oabNumero",
      "rgNumero": "rgNumero",
      "companyName": "companyName",
      "cpf": "cpf",
      "oabUF": "oabUF",
      "dateOfBirth": "dateOfBirth",
      "rgEmissorUF": "rgEmissorUF",
      "cnpj": "cnpj",
      "responsavel": "responsavel",
      "certificateType": "Unknown"
    },
    "validityStart": "2000-01-23T04:56:07.000+00:00",
    "issuer": null,
    "binaryThumbprintSHA256": "binaryThumbprintSHA256",
    "emailAddress": "emailAddress",
    "pkiItaly": {
      "idCarta": "idCarta",
      "codiceFiscale": "codiceFiscale",
      "certificateType": "Undefined"
    },
    "organizationIdentifier": "organizationIdentifier",
    "issuerDisplayName": "issuerDisplayName",
    "organization": "organization",
    "subjectIdentifier": "subjectIdentifier",
    "subjectCommonName": "subjectCommonName",
    "thumbprintSHA256": "thumbprintSHA256",
    "subjectDisplayName": "subjectDisplayName",
    "subjectName": {
      "country": "country",
      "commonName": "commonName",
      "serialNumber": "serialNumber",
      "initials": "initials",
      "dnString": "dnString",
      "givenName": "givenName",
      "locality": "locality",
      "organizationUnit": "organizationUnit",
      "title": "title",
      "pseudonym": "pseudonym",
      "emailAddress": "emailAddress",
      "dnQualifier": "dnQualifier",
      "stateName": "stateName",
      "surname": "surname",
      "organization": "organization",
      "generationQualifier": "generationQualifier",
      "allValues": {
        "key": [
          "allValues",
          "allValues"
        ]
      }
    }
  },
  "state": "state"
}

Changes

No recorded changes to this operation across all 1 revision of this API.