DOCUMENTATION

Get P7s file of the document

Name: ObterP7SDoc

The purpose of this function is to export the files after all the signatures/approvals have been collected.

  • If the document has a signature in CADES format , the following files will be exported:
    • Original File;
    • File with watermark and protocol that contains all approvals and signatures(with and without digital certification);
    • File with .P7S extension, which is the file that contains the digitally signed packet. That is, contains the file or hashcode of the signed file and all digital certificates that signed it.
  • If the document has a signature in PADES format , the following files will be exported:
    • Original file with all signatures with digital certificate. The signed packet is the original file itself;
    • File with watermark and protocol that contains all approvals and signatures(with and without digital certification).

Input format:

  • Using reference:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<documentoeletronico>
        <sessao>XXXX</sessao> 
        <docto_sistema_codigo>10</docto_sistema_codigo>
        <referencia>XX</referencia>
        <arquivo_original>S</arquivo_original>
        <arquivo_protocolo>S</arquivo_protocolo>
</documentoeletronico>
  • Using passcode:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<documentoeletronico>
        <sessao>XXXX</sessao> 
        <docto_sistema_codigo>10</docto_sistema_codigo>
        <passcode>RKILF-FG4FR-TCDEW-57RFE</passcode>
        <arquivo_original>S</arquivo_original>
        <arquivo_protocolo>S</arquivo_protocolo>
</documentoeletronico>
Parameter Format Required Description
sessao Text Y Registered access key for your company.
docto_sistema_codigo Númerico Y Type of document: (if not informed, assumes value 5)
5 - Electronic Contract;
10 - Digital Report.
referencia Text Y Document reference.
passcode Text Y Document passcode. Passcode is the identification of a document generated by the QualiSign Portal.
arquivo_original Text Y Indicates whether you also want the original file (S-Yes, N-No).
arquivo_protocolo Text Y Indicates whether you also want the Protocol (S-Yes, N-No)
If the file is a PDF, will return a PDF file containing the original file with a footer indicating that it was digitally signed on the last page of the document, the protocol.
In case of other formats, it will only return the PDF with the protocol.

Output format:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<documentoeletronico>
        <CodErro />
        <MsgErro />
        <P7SBase64></P7SBase64> 
            <ArquivoOriginalBase64></ArquivoOriginalBase64> 
            <NomeArquivo></NomeArquivo>
            <ArquivoProtocoloBase64></ArquivoProtocoloBase64>
        <NomeArquivoProtocolo></NomeArquivoProtocolo>
        <observações>
            <observação></observação>
        <observações>
</documentoeletronico>
Parameter Format Decription
CodErro Numeric Error code (See Error Codes).
MsgErro Text Error message.
P7SBase64 Text Conteúdo do arquivo P7S em Base 64 (quando assinado com certificado digital).
ArquivoOriginalBase64 Text Base64 P7S file content (when signed with digital certificate).
NomeArquivo Text Name of original stored file.
ArquivoProtocoloBase64 Text Signature protocol or when it is PDF, the file containing the footer indicating that it was signed electronically and containing the protocol as the last page (in Base64).
NomeArquivoprotocolo Text File name containing the protocol.
observacao Text Warning message regarding the export process, when one of the artifacts is not available. Because it is possible to export documents that do not necessarily have digital signature (p7s file), or that do not have original file, this TAG can return the following messages:

 

·        “There is no p7s for this document”;

·        “Original file not stored in the portal”.