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 .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	fileId: 0,
	originalFileId: 0,
	workflowId: 0,
	stepId: 0,
	subDocumentId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	code: 0,
	message: String,
	signedFile: 
	{
		id: 0,
		uploadedFile: String,
		subDocumentId: 0,
		stepId: 0,
		code: 0,
		fileName: String,
		filekey: String,
		fileUrl: String,
		checksum: String,
		eTag: String,
		fileSize: 0
	},
	signLog: 
	{
		id: 0,
		documentId: 0,
		subDocumentId: 0,
		stepId: 0,
		fileId: 0,
		signProvider: String,
		certSerial: String,
		isSuccess: False,
		signMessage: String,
		signBy: 0,
		requestId: 00000000000000000000000000000000,
		originalFileId: 0,
		effectBeginDate: "0001-01-01T00:00:00.0000000+07:06",
		effectEndDate: "0001-01-01T00:00:00.0000000+07:06"
	}
}