tvpl.api

<back to all web services

SearchTemplateRequest

Requires Authentication
The following routes are available for this service:
GET/document-template/search
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using tvpl.api.ServiceModel;
using tvpl.data.Models;

namespace tvpl.api.ServiceModel
{
    public partial class PagingRequest
    {
        public virtual int Page { get; set; }
        public virtual int Limit { get; set; }
    }

    public partial class SearchDocumentTemplateResponse
        : IResponseRequest
    {
        public SearchDocumentTemplateResponse()
        {
            Data = new List<DocumentTemplate>{};
        }

        public virtual int Code { get; set; }
        public virtual string Message { get; set; }
        public virtual List<DocumentTemplate> Data { get; set; }
        public virtual long TotalCount { get; set; }
    }

    public partial class SearchTemplateRequest
        : PagingRequest
    {
        public virtual string Title { get; set; }
        public virtual bool? IsActive { get; set; }
    }

}

namespace tvpl.data.Models
{
    public partial class DocumentTemplate
    {
        public virtual int Id { get; set; }
        [Required]
        public virtual string Title { get; set; }

        public virtual string Description { get; set; }
        public virtual bool IsActive { get; set; }
        public virtual string FileKey { get; set; }
        public virtual string FileUrl { get; set; }
        public virtual string FileName { get; set; }
        public virtual long? FileSize { get; set; }
    }

}

C# SearchTemplateRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /document-template/search HTTP/1.1 
Host: qlcn-api.vsmlab.vn 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"code":0,"message":"String","data":[{"id":0,"title":"String","description":"String","isActive":false,"fileKey":"String","fileUrl":"String","fileName":"String","fileSize":0}],"totalCount":0}