Portal

<back to all web services

BrowseContractByVeoliaAdmin

Requires Authentication
Required role:VeoliaAdmin
The following routes are available for this service:
GET/contract/{contractid}
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ResponseBase:
    response_status: Optional[ResponseStatus] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ModifyRequestBase(IConcurrencyStamp):
    concurrency_stamp: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ModifyContractBase(ModifyRequestBase):
    tender_user_id: Optional[int] = None
    contract_identifier: Optional[str] = None
    supplier_user_id: int = 0
    buyer: Optional[str] = None
    subject: Optional[str] = None
    confirmation_deadline: datetime.datetime = datetime.datetime(1, 1, 1)


class ReviewStatus(IntEnum):
    DRAFT = 0
    COMMENTED = 1
    ACCEPTED = 2


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ContractVersionSimple:
    id: int = 0
    contract_id: int = 0
    version: int = 0
    is_viewed: bool = False
    status: Optional[ReviewStatus] = None


class TenderType(IntEnum):
    PRIVATE = 0
    PUBLIC = 1


class TenderStatus(IntEnum):
    FIRST_ROUND = 0
    SECOND_ROUND = 1
    THIRD_ROUND = 2
    SUCCESSFUL = 3
    UN_SUCCESSFUL = 4
    REVOKED = 5


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TenderBase:
    tender_identifier: Optional[str] = None
    tender_type: Optional[TenderType] = None
    subject: Optional[str] = None
    procurement_contact: Optional[str] = None
    procurement_contact_email: Optional[str] = None
    procurement_contact_phone: Optional[str] = None
    professional_contact: Optional[str] = None
    professional_contact_email: Optional[str] = None
    professional_contact_phone: Optional[str] = None
    result: Optional[str] = None
    status: Optional[TenderStatus] = None


class ProcedureType(IntEnum):
    COMPETITION = 0
    SIMPLIFIED = 1


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BrowseFileResponseBase:
    id: int = 0
    file_content_id: int = 0
    file_name: Optional[str] = None
    size: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TenderFileDetails(BrowseFileResponseBase):
    tender_id: int = 0
    document_type: Optional[str] = None
    is_tender_announcement: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TenderRoundSimple:
    id: int = 0
    name: Optional[str] = None
    is_question_enabled: bool = False
    question_deadline: Optional[datetime.datetime] = None
    answer_deadline: Optional[datetime.datetime] = None
    submission_deadline: datetime.datetime = datetime.datetime(1, 1, 1)
    is_supplementary_enabled: bool = False
    supplementary_request_deadline: Optional[datetime.datetime] = None
    supplementary_deadline: Optional[datetime.datetime] = None
    announcement_date_time: datetime.datetime = datetime.datetime(1, 1, 1)
    status: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TenderDetails(TenderBase, IConcurrencyStamp):
    id: int = 0
    starter_tender_round_id: Optional[int] = None
    procedure_type: Optional[ProcedureType] = None
    meta: Optional[Dict[str, str]] = None
    tender_files: Optional[List[TenderFileDetails]] = None
    tender_rounds: Optional[List[TenderRoundSimple]] = None
    concurrency_stamp: Optional[str] = None
    is_procurement_enabled: bool = False
    is_compliance_enabled: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ContractDetails(ModifyContractBase):
    id: int = 0
    cancellation_date_time: Optional[datetime.datetime] = None
    is_cancelled: bool = False
    meta: Optional[Dict[str, str]] = None
    contract_versions: Optional[List[ContractVersionSimple]] = None
    tender: Optional[TenderDetails] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BrowseContractResponse(ResponseBase):
    contract: Optional[ContractDetails] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BrowseContractByVeoliaAdmin(IGet):
    contract_id: int = 0

Python BrowseContractByVeoliaAdmin 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 /contract/{contractid} HTTP/1.1 
Host: szallitoiportal-be.veolia.hu 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Contract: 
	{
		Id: 0,
		CancellationDateTime: 0001-01-01,
		IsCancelled: False,
		Meta: 
		{
			String: String
		},
		ContractVersions: 
		[
			{
				Id: 0,
				ContractId: 0,
				Version: 0,
				IsViewed: False,
				Status: 0
			}
		],
		Tender: 
		{
			Id: 0,
			StarterTenderRoundId: 0,
			ProcedureType: 0,
			Meta: 
			{
				String: String
			},
			TenderFiles: 
			[
				{
					TenderId: 0,
					DocumentType: String,
					IsTenderAnnouncement: False,
					Id: 0,
					FileContentId: 0,
					FileName: String,
					Size: 0
				}
			],
			TenderRounds: 
			[
				{
					Id: 0,
					Name: String,
					IsQuestionEnabled: False,
					QuestionDeadline: 0001-01-01,
					AnswerDeadline: 0001-01-01,
					SubmissionDeadline: 0001-01-01,
					IsSupplementaryEnabled: False,
					SupplementaryRequestDeadline: 0001-01-01,
					SupplementaryDeadline: 0001-01-01,
					AnnouncementDateTime: 0001-01-01,
					Status: 0
				}
			],
			ConcurrencyStamp: String,
			IsProcurementEnabled: False,
			IsComplianceEnabled: False,
			TenderIdentifier: String,
			TenderType: 0,
			Subject: String,
			ProcurementContact: String,
			ProcurementContactEmail: String,
			ProcurementContactPhone: String,
			ProfessionalContact: String,
			ProfessionalContactEmail: String,
			ProfessionalContactPhone: String,
			Result: String,
			Status: 0
		},
		TenderUserId: 0,
		ContractIdentifier: String,
		SupplierUserId: 0,
		Buyer: String,
		Subject: String,
		ConfirmationDeadline: 0001-01-01,
		ConcurrencyStamp: String
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}