tvpl.api

<back to all web services

UpdateCategoryRequest

Requires Authentication
Required role:super-admin
The following routes are available for this service:
POST/category/update
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
Imports tvpl.data.Constant

Namespace Global

    Namespace tvpl.api.ServiceModel

        Public Partial Class CreateCategoryResponse
            Implements IResponseRequest
            Public Overridable Property Id As Long
            Public Overridable Property Code As Integer
            Public Overridable Property Message As String
        End Class

        Public Partial Class UpdateCategoryRequest
            Inherits CreateCategoryModel
            Public Overridable Property Id As Integer
            Public Overridable Property IsDeleted As Nullable(Of Boolean)
        End Class
    End Namespace

    Namespace tvpl.data.Constant

        Public Enum CategoryTypes
            Department
            PartyGroup
            DocGroup
            DocType
            IssuingAgency
            Status
            Subjects
            Workflow
        End Enum
    End Namespace

    Namespace tvpl.data.Models

        Public Partial Class CreateCategoryModel
            Public Sub New()
                ChildList = New List(Of Integer)
            End Sub

            Public Overridable Property Name As String
            Public Overridable Property Description As String
            Public Overridable Property Type As CategoryTypes
            Public Overridable Property IsParty As Boolean
            <Ignore>
            Public Overridable Property ChildList As List(Of Integer)
        End Class
    End Namespace
End Namespace

VB.NET UpdateCategoryRequest DTOs

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

HTTP + CSV

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

POST /category/update HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"id":0,"isDeleted":false,"name":"String","description":"String","type":"Department","isParty":false,"childList":[0]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"id":0,"code":0,"message":"String"}