DigiOffice Gateway Web Services

<back to all web services

RegisterDocument

Requires Authentication
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 RegisterDocumentResponse:
    is_succes: Optional[bool] = None
    document_id: Optional[str] = None
    error_messages: Optional[List[str]] = None
    ooxml: Optional[str] = None
    # @ApiMember(Description="Is it a corporate identity document?", IsRequired=true)
    is_corporate_identity: bool = False
    """
    Is it a corporate identity document?
    """


    document_variables: Optional[Dict[str, str]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RegistrationValue:
    key: Optional[str] = None
    value: Optional[str] = None
    shadow_value: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Transition:
    id: Optional[str] = None
    reason: Optional[str] = None
    delay_date: Optional[datetime.datetime] = None
    delay_reason: Optional[str] = None
    user_i_ds: Optional[List[int]] = None
    group_i_ds: Optional[List[int]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Process:
    id: Optional[int] = None
    title: Optional[str] = None
    description: Optional[str] = None
    note: Optional[str] = None
    coordinator: Optional[str] = None
    urgent: Optional[bool] = None
    transitions: Optional[List[Transition]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RegisterDocument:
    registration_profile_i_d: Optional[str] = None
    values: Optional[List[RegistrationValue]] = None
    processes: Optional[List[Process]] = None
    document_upload_id: Optional[str] = None
    document_id: Optional[str] = None
    standard_document_i_d: Optional[str] = None
    has_unsaved_changes_in_document: Optional[bool] = None
    is_opened_from_non_d_m_s_location: Optional[bool] = None

Python RegisterDocument 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.

POST /jsv/reply/RegisterDocument HTTP/1.1 
Host: digiofficeapigateway.deltares.nl 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Values: 
	[
		{
			Value: String,
			ShadowValue: String
		}
	],
	Processes: 
	[
		{
			ID: 0,
			Title: String,
			Description: String,
			Note: String,
			Coordinator: String,
			Urgent: False,
			Transitions: 
			[
				{
					Reason: String,
					DelayDate: 0001-01-01,
					DelayReason: String,
					UserIDs: 
					[
						0
					],
					GroupIDs: 
					[
						0
					]
				}
			]
		}
	],
	DocumentUploadId: String,
	DocumentId: 00000000-0000-0000-0000-000000000000,
	StandardDocumentID: 00000000-0000-0000-0000-000000000000,
	HasUnsavedChangesInDocument: False,
	IsOpenedFromNonDMSLocation: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	IsSucces: False,
	ErrorMessages: 
	[
		String
	],
	Ooxml: String,
	IsCorporateIdentity: False
}