Portal

<back to all web services

BrowsePurchaseOrderVersion

The following routes are available for this service:
GET/user/{supplieruserid}/purchaseorder/{purchaseorderid}/purchaseorderversion/{purchaseorderversionid}
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Portal.ServiceDto
Imports Portal.Common

Namespace Global

    Namespace Portal.Common

        Public Enum PurchaseOrderDocumentType
            Draft = 0
            Comment = 1
        End Enum

        Public Enum ReviewStatus
            Draft = 0
            Commented = 1
            Accepted = 2
        End Enum
    End Namespace

    Namespace Portal.ServiceDto

        Public Partial Class BrowseFileResponseBase
            Public Overridable Property Id As Integer
            Public Overridable Property FileContentId As Integer
            Public Overridable Property FileName As String
            Public Overridable Property Size As Long
        End Class

        Public Partial Class BrowsePurchaseOrderVersion
            Inherits PurchaseOrderVersionBase
            Implements IGet
        End Class

        Public Partial Class BrowsePurchaseOrderVersionResponse
            Inherits ResponseBase
            Public Overridable Property PurchaseOrderVersion As PurchaseOrderVersionDetails
        End Class

        Public Partial Class PurchaseOrderBase
            Public Overridable Property PurchaseOrderId As Integer
            Public Overridable Property SupplierUserId As Integer
        End Class

        Public Partial Class PurchaseOrderFileSimple
            Inherits BrowseFileResponseBase
            Public Overridable Property PurchaseOrderVersionId As Integer
            Public Overridable Property DocumentType As PurchaseOrderDocumentType
        End Class

        Public Partial Class PurchaseOrderVersionBase
            Inherits PurchaseOrderBase
            Public Overridable Property PurchaseOrderVersionId As Integer
        End Class

        Public Partial Class PurchaseOrderVersionDetails
            Inherits PurchaseOrderVersionSimple
            Public Sub New()
                Meta = New Dictionary(Of String, String)
                PurchaseOrderFiles = New List(Of PurchaseOrderFileSimple)
            End Sub

            Public Overridable Property Meta As Dictionary(Of String, String)
            Public Overridable Property ViewingDateTime As Nullable(Of Date)
            Public Overridable Property ReviewingDateTime As Nullable(Of Date)
            Public Overridable Property PurchaseOrderFiles As List(Of PurchaseOrderFileSimple)
        End Class

        Public Partial Class PurchaseOrderVersionSimple
            Public Overridable Property Id As Integer
            Public Overridable Property PurchaseOrderId As Integer
            Public Overridable Property SupplierUserId As Integer
            Public Overridable Property Version As Integer
            Public Overridable Property IsViewed As Boolean
            Public Overridable Property Status As ReviewStatus
        End Class

        Public Partial Class ResponseBase
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class
    End Namespace
End Namespace

VB.NET BrowsePurchaseOrderVersion 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 /user/{supplieruserid}/purchaseorder/{purchaseorderid}/purchaseorderversion/{purchaseorderversionid} HTTP/1.1 
Host: szallitoiportal-be.veolia.hu 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"PurchaseOrderVersion":{"Meta":{"String":"String"},"ViewingDateTime":"0001-01-01T00:00:00.0000000","ReviewingDateTime":"0001-01-01T00:00:00.0000000","PurchaseOrderFiles":[{"PurchaseOrderVersionId":0,"DocumentType":0,"Id":0,"FileContentId":0,"FileName":"String","Size":0}],"Id":0,"PurchaseOrderId":0,"SupplierUserId":0,"Version":0,"IsViewed":false,"Status":0},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}