Portal

<back to all web services

BrowseContractVersion

Requires Authentication
The following routes are available for this service:
GET/user/{supplieruserid}/contract/{contractid}/contractversion/{contractversionid}
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Portal.ServiceDto;
using Portal.Common;

namespace Portal.Common
{
    public enum ContractDocumentType
    {
        Draft = 0,
        Comment = 1,
    }

    public enum ReviewStatus
    {
        Draft = 0,
        Commented = 1,
        Accepted = 2,
    }

}

namespace Portal.ServiceDto
{
    public partial class BrowseContractVersion
        : ContractVersionBase, IGet
    {
    }

    public partial class BrowseContractVersionResponse
        : ResponseBase
    {
        public virtual ContractVersionDetails ContractVersion { get; set; }
    }

    public partial class BrowseFileResponseBase
    {
        public virtual int Id { get; set; }
        public virtual int FileContentId { get; set; }
        public virtual string FileName { get; set; }
        public virtual long Size { get; set; }
    }

    public partial class ContractBase
    {
        public virtual int SupplierUserId { get; set; }
        public virtual int ContractId { get; set; }
    }

    public partial class ContractFileSimple
        : BrowseFileResponseBase
    {
        public virtual int ContractVersionId { get; set; }
        public virtual ContractDocumentType DocumentType { get; set; }
    }

    public partial class ContractVersionBase
        : ContractBase
    {
        public virtual int ContractVersionId { get; set; }
    }

    public partial class ContractVersionDetails
        : ContractVersionSimple
    {
        public ContractVersionDetails()
        {
            Meta = new Dictionary<string, string>{};
            ContractFiles = new List<ContractFileSimple>{};
        }

        public virtual Dictionary<string, string> Meta { get; set; }
        public virtual DateTime? ViewingDateTime { get; set; }
        public virtual DateTime? ReviewingDateTime { get; set; }
        public virtual List<ContractFileSimple> ContractFiles { get; set; }
    }

    public partial class ContractVersionSimple
    {
        public virtual int Id { get; set; }
        public virtual int ContractId { get; set; }
        public virtual int Version { get; set; }
        public virtual bool IsViewed { get; set; }
        public virtual ReviewStatus Status { get; set; }
    }

    public partial class ResponseBase
    {
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

}

C# BrowseContractVersion DTOs

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

HTTP + JSV

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

GET /user/{supplieruserid}/contract/{contractid}/contractversion/{contractversionid} HTTP/1.1 
Host: szallitoiportal-be.veolia.hu 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ContractVersion: 
	{
		Meta: 
		{
			String: String
		},
		ViewingDateTime: 0001-01-01,
		ReviewingDateTime: 0001-01-01,
		ContractFiles: 
		[
			{
				ContractVersionId: 0,
				DocumentType: 0,
				Id: 0,
				FileContentId: 0,
				FileName: String,
				Size: 0
			}
		],
		Id: 0,
		ContractId: 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
		}
	}
}