tvpl.api

<back to all web services

ApprovedRequest

Requires Authentication
The following routes are available for this service:
POST/DocumentPolicy/Approved
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports tvpl.api.ServiceModel
Imports tvpl.data.Models

Namespace Global

    Namespace tvpl.api.ServiceModel

        Public Partial Class ApprovedRequest
            Implements IPost
            Public Overridable Property Id As Integer
            Public Overridable Property IsApproved As Nullable(Of Boolean)
            Public Overridable Property ApprovalComment As String
        End Class

        Public Partial Class ApprovedResponse
            Implements IResponseRequest
            Public Overridable Property UpdatedData As DocumentPolicy
            Public Overridable Property Code As Integer
            Public Overridable Property Message As String
        End Class
    End Namespace

    Namespace tvpl.data.Models

        Public Partial Class DocumentPolicy
            Inherits UpdateDocumentPolicyModel
            Public Overridable Property ApprovedDate As Nullable(Of Date)
            Public Overridable Property EstimatedDeadline As Nullable(Of Date)
            Public Overridable Property IsApproved As Boolean
            <Required>
            Public Overridable Property CreatedBy As Integer

            Public Overridable Property CreatedDate As Date
            Public Overridable Property DeletedAt As Nullable(Of Date)
            Public Overridable Property DeletedBy As Nullable(Of Integer)
            Public Overridable Property ApprovalComment As String
            Public Overridable Property IsDeleted As Nullable(Of Boolean)
            Public Overridable Property LastUpdateAt As Nullable(Of Date)
            Public Overridable Property UpdatedBy As Integer
        End Class

        Public Partial Class UpdateDocumentPolicyModel
            Public Overridable Property Id As Integer
            Public Overridable Property PolicyCode As String
            Public Overridable Property Title As String
            Public Overridable Property DocumentLink As String
            Public Overridable Property DocumentGroupId As Integer
            Public Overridable Property Description As String
            Public Overridable Property ApprovedBy As Nullable(Of Integer)
            <Required>
            Public Overridable Property DepartmentLeadId As Integer

            Public Overridable Property DepartmentCoId As Nullable(Of Integer)
        End Class
    End Namespace
End Namespace

VB.NET ApprovedRequest DTOs

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

HTTP + OTHER

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

POST /DocumentPolicy/Approved HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id":0,"isApproved":false,"approvalComment":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"updatedData":{"approvedDate":"0001-01-01T00:00:00.0000000+07:06","estimatedDeadline":"0001-01-01T00:00:00.0000000+07:06","isApproved":false,"createdBy":0,"createdDate":"0001-01-01T00:00:00.0000000+07:06","deletedAt":"0001-01-01T00:00:00.0000000+07:06","deletedBy":0,"approvalComment":"String","isDeleted":false,"lastUpdateAt":"0001-01-01T00:00:00.0000000+07:06","updatedBy":0,"id":0,"policyCode":"String","title":"String","documentLink":"String","documentGroupId":0,"description":"String","approvedBy":0,"departmentLeadId":0,"departmentCoId":0},"code":0,"message":"String"}