tvpl.api

<back to all web services

SignatureRequest

Requires Authentication
The following routes are available for this service:
POST/Signature
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class SignatureRequest
    {
        public Integer fileId = null;
        public Integer originalFileId = null;
        public Integer workflowId = null;
        public Integer stepId = null;
        public Integer subDocumentId = null;
        
        public Integer getFileId() { return fileId; }
        public SignatureRequest setFileId(Integer value) { this.fileId = value; return this; }
        public Integer getOriginalFileId() { return originalFileId; }
        public SignatureRequest setOriginalFileId(Integer value) { this.originalFileId = value; return this; }
        public Integer getWorkflowId() { return workflowId; }
        public SignatureRequest setWorkflowId(Integer value) { this.workflowId = value; return this; }
        public Integer getStepId() { return stepId; }
        public SignatureRequest setStepId(Integer value) { this.stepId = value; return this; }
        public Integer getSubDocumentId() { return subDocumentId; }
        public SignatureRequest setSubDocumentId(Integer value) { this.subDocumentId = value; return this; }
    }

    public static class SignatureResponse implements IResponseRequest
    {
        public Integer code = null;
        public String message = null;
        public UploadedFiles signedFile = null;
        public DocumentSignLog signLog = null;
        
        public Integer getCode() { return code; }
        public SignatureResponse setCode(Integer value) { this.code = value; return this; }
        public String getMessage() { return message; }
        public SignatureResponse setMessage(String value) { this.message = value; return this; }
        public UploadedFiles getSignedFile() { return signedFile; }
        public SignatureResponse setSignedFile(UploadedFiles value) { this.signedFile = value; return this; }
        public DocumentSignLog getSignLog() { return signLog; }
        public SignatureResponse setSignLog(DocumentSignLog value) { this.signLog = value; return this; }
    }

    public static class UploadedFiles extends BasicUploadedFile
    {
        public Long id = null;
        public String uploadedFile = null;
        public Integer subDocumentId = null;
        public Integer stepId = null;
        public Integer code = null;
        
        public Long getId() { return id; }
        public UploadedFiles setId(Long value) { this.id = value; return this; }
        public String getUploadedFile() { return uploadedFile; }
        public UploadedFiles setUploadedFile(String value) { this.uploadedFile = value; return this; }
        public Integer getSubDocumentId() { return subDocumentId; }
        public UploadedFiles setSubDocumentId(Integer value) { this.subDocumentId = value; return this; }
        public Integer getStepId() { return stepId; }
        public UploadedFiles setStepId(Integer value) { this.stepId = value; return this; }
        public Integer getCode() { return code; }
        public UploadedFiles setCode(Integer value) { this.code = value; return this; }
    }

    public static class BasicUploadedFile
    {
        public String fileName = null;
        public String filekey = null;
        public String fileUrl = null;
        public String checksum = null;
        public String eTag = null;
        public Long fileSize = null;
        
        public String getFileName() { return fileName; }
        public BasicUploadedFile setFileName(String value) { this.fileName = value; return this; }
        public String getFilekey() { return filekey; }
        public BasicUploadedFile setFilekey(String value) { this.filekey = value; return this; }
        public String getFileUrl() { return fileUrl; }
        public BasicUploadedFile setFileUrl(String value) { this.fileUrl = value; return this; }
        public String getChecksum() { return checksum; }
        public BasicUploadedFile setChecksum(String value) { this.checksum = value; return this; }
        public String getETag() { return eTag; }
        public BasicUploadedFile setETag(String value) { this.eTag = value; return this; }
        public Long getFileSize() { return fileSize; }
        public BasicUploadedFile setFileSize(Long value) { this.fileSize = value; return this; }
    }

    public static class DocumentSignLog
    {
        public Long id = null;
        public Long documentId = null;
        public Long subDocumentId = null;
        public Integer stepId = null;
        public Long fileId = null;
        @StringLength(50)
        public String signProvider = null;

        @StringLength(100)
        public String certSerial = null;

        public Boolean isSuccess = null;
        @StringLength(500)
        public String signMessage = null;

        public Long signBy = null;
        public Date signAt = null;
        public UUID requestId = null;
        public Integer originalFileId = null;
        public Date effectBeginDate = null;
        public Date effectEndDate = null;
        
        public Long getId() { return id; }
        public DocumentSignLog setId(Long value) { this.id = value; return this; }
        public Long getDocumentId() { return documentId; }
        public DocumentSignLog setDocumentId(Long value) { this.documentId = value; return this; }
        public Long getSubDocumentId() { return subDocumentId; }
        public DocumentSignLog setSubDocumentId(Long value) { this.subDocumentId = value; return this; }
        public Integer getStepId() { return stepId; }
        public DocumentSignLog setStepId(Integer value) { this.stepId = value; return this; }
        public Long getFileId() { return fileId; }
        public DocumentSignLog setFileId(Long value) { this.fileId = value; return this; }
        public String getSignProvider() { return signProvider; }
        public DocumentSignLog setSignProvider(String value) { this.signProvider = value; return this; }
        public String getCertSerial() { return certSerial; }
        public DocumentSignLog setCertSerial(String value) { this.certSerial = value; return this; }
        public Boolean getIsSuccess() { return isSuccess; }
        public DocumentSignLog setIsSuccess(Boolean value) { this.isSuccess = value; return this; }
        public String getSignMessage() { return signMessage; }
        public DocumentSignLog setSignMessage(String value) { this.signMessage = value; return this; }
        public Long getSignBy() { return signBy; }
        public DocumentSignLog setSignBy(Long value) { this.signBy = value; return this; }
        public Date getSignAt() { return signAt; }
        public DocumentSignLog setSignAt(Date value) { this.signAt = value; return this; }
        public UUID getRequestId() { return requestId; }
        public DocumentSignLog setRequestId(UUID value) { this.requestId = value; return this; }
        public Integer getOriginalFileId() { return originalFileId; }
        public DocumentSignLog setOriginalFileId(Integer value) { this.originalFileId = value; return this; }
        public Date getEffectBeginDate() { return effectBeginDate; }
        public DocumentSignLog setEffectBeginDate(Date value) { this.effectBeginDate = value; return this; }
        public Date getEffectEndDate() { return effectEndDate; }
        public DocumentSignLog setEffectEndDate(Date value) { this.effectEndDate = value; return this; }
    }

}

Java SignatureRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /Signature HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<SignatureRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
  <FileId>0</FileId>
  <OriginalFileId>0</OriginalFileId>
  <StepId>0</StepId>
  <SubDocumentId>0</SubDocumentId>
  <WorkflowId>0</WorkflowId>
</SignatureRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SignatureResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
  <Code>0</Code>
  <Message>String</Message>
  <SignLog xmlns:d2p1="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
    <d2p1:CertSerial>String</d2p1:CertSerial>
    <d2p1:DocumentId>0</d2p1:DocumentId>
    <d2p1:EffectBeginDate>0001-01-01T00:00:00</d2p1:EffectBeginDate>
    <d2p1:EffectEndDate>0001-01-01T00:00:00</d2p1:EffectEndDate>
    <d2p1:FileId>0</d2p1:FileId>
    <d2p1:Id>0</d2p1:Id>
    <d2p1:IsSuccess>false</d2p1:IsSuccess>
    <d2p1:OriginalFileId>0</d2p1:OriginalFileId>
    <d2p1:RequestId>00000000-0000-0000-0000-000000000000</d2p1:RequestId>
    <d2p1:SignAt>0001-01-01T00:00:00</d2p1:SignAt>
    <d2p1:SignBy>0</d2p1:SignBy>
    <d2p1:SignMessage>String</d2p1:SignMessage>
    <d2p1:SignProvider>String</d2p1:SignProvider>
    <d2p1:StepId>0</d2p1:StepId>
    <d2p1:SubDocumentId>0</d2p1:SubDocumentId>
  </SignLog>
  <SignedFile xmlns:d2p1="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
    <d2p1:Checksum>String</d2p1:Checksum>
    <d2p1:ETag>String</d2p1:ETag>
    <d2p1:FileName>String</d2p1:FileName>
    <d2p1:FileSize>0</d2p1:FileSize>
    <d2p1:FileUrl>String</d2p1:FileUrl>
    <d2p1:Filekey>String</d2p1:Filekey>
    <d2p1:Code>0</d2p1:Code>
    <d2p1:Id>0</d2p1:Id>
    <d2p1:StepId>0</d2p1:StepId>
    <d2p1:SubDocumentId>0</d2p1:SubDocumentId>
    <d2p1:UploadedFile>String</d2p1:UploadedFile>
  </SignedFile>
</SignatureResponse>