tvpl.api

<back to all web services

CreateDocumentReferenceRequest

Requires Authentication
Required role:super-admin
The following routes are available for this service:
POST/document-reference
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class CreateDocumentReferenceRequest
    {
        public Integer parentDocumentId = null;
        public String title = null;
        public String documentCode = null;
        public String referenceUrl = null;
        public String description = null;
        
        public Integer getParentDocumentId() { return parentDocumentId; }
        public CreateDocumentReferenceRequest setParentDocumentId(Integer value) { this.parentDocumentId = value; return this; }
        public String getTitle() { return title; }
        public CreateDocumentReferenceRequest setTitle(String value) { this.title = value; return this; }
        public String getDocumentCode() { return documentCode; }
        public CreateDocumentReferenceRequest setDocumentCode(String value) { this.documentCode = value; return this; }
        public String getReferenceUrl() { return referenceUrl; }
        public CreateDocumentReferenceRequest setReferenceUrl(String value) { this.referenceUrl = value; return this; }
        public String getDescription() { return description; }
        public CreateDocumentReferenceRequest setDescription(String value) { this.description = value; return this; }
    }

    public static class DocumentReferences
    {
        public Integer id = null;
        public Integer parentDocumentId = null;
        public String title = null;
        public String documentCode = null;
        public String referenceUrl = null;
        public String description = null;
        
        public Integer getId() { return id; }
        public DocumentReferences setId(Integer value) { this.id = value; return this; }
        public Integer getParentDocumentId() { return parentDocumentId; }
        public DocumentReferences setParentDocumentId(Integer value) { this.parentDocumentId = value; return this; }
        public String getTitle() { return title; }
        public DocumentReferences setTitle(String value) { this.title = value; return this; }
        public String getDocumentCode() { return documentCode; }
        public DocumentReferences setDocumentCode(String value) { this.documentCode = value; return this; }
        public String getReferenceUrl() { return referenceUrl; }
        public DocumentReferences setReferenceUrl(String value) { this.referenceUrl = value; return this; }
        public String getDescription() { return description; }
        public DocumentReferences setDescription(String value) { this.description = value; return this; }
    }

}

Java CreateDocumentReferenceRequest 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 /document-reference HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CreateDocumentReferenceRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
  <Description>String</Description>
  <DocumentCode>String</DocumentCode>
  <ParentDocumentId>0</ParentDocumentId>
  <ReferenceUrl>String</ReferenceUrl>
  <Title>String</Title>
</CreateDocumentReferenceRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<DocumentReferences xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
  <Description>String</Description>
  <DocumentCode>String</DocumentCode>
  <Id>0</Id>
  <ParentDocumentId>0</ParentDocumentId>
  <ReferenceUrl>String</ReferenceUrl>
  <Title>String</Title>
</DocumentReferences>