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 .xml suffix or ?format=xml

HTTP + XML

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

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

<RegisterDocument xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Document.Operations">
  <DocumentId>00000000-0000-0000-0000-000000000000</DocumentId>
  <DocumentUploadId>String</DocumentUploadId>
  <HasUnsavedChangesInDocument>false</HasUnsavedChangesInDocument>
  <IsOpenedFromNonDMSLocation>false</IsOpenedFromNonDMSLocation>
  <Processes xmlns:d2p1="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Workflow">
    <d2p1:Process>
      <d2p1:Coordinator>String</d2p1:Coordinator>
      <d2p1:Description>String</d2p1:Description>
      <d2p1:ID>0</d2p1:ID>
      <d2p1:Note>String</d2p1:Note>
      <d2p1:Title>String</d2p1:Title>
      <d2p1:Transitions>
        <d2p1:Transition>
          <d2p1:DelayDate>0001-01-01T00:00:00</d2p1:DelayDate>
          <d2p1:DelayReason>String</d2p1:DelayReason>
          <d2p1:GroupIDs xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:int>0</d6p1:int>
          </d2p1:GroupIDs>
          <d2p1:ID>00000000-0000-0000-0000-000000000000</d2p1:ID>
          <d2p1:Reason>String</d2p1:Reason>
          <d2p1:UserIDs xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:int>0</d6p1:int>
          </d2p1:UserIDs>
        </d2p1:Transition>
      </d2p1:Transitions>
      <d2p1:Urgent>false</d2p1:Urgent>
    </d2p1:Process>
  </Processes>
  <RegistrationProfileID>00000000-0000-0000-0000-000000000000</RegistrationProfileID>
  <StandardDocumentID>00000000-0000-0000-0000-000000000000</StandardDocumentID>
  <Values xmlns:d2p1="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Registrationprofile">
    <d2p1:RegistrationValue>
      <d2p1:Key>00000000-0000-0000-0000-000000000000</d2p1:Key>
      <d2p1:ShadowValue>String</d2p1:ShadowValue>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:RegistrationValue>
  </Values>
</RegisterDocument>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<RegisterDocumentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Document.Operations">
  <DocumentId>00000000-0000-0000-0000-000000000000</DocumentId>
  <DocumentVariables xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
  <ErrorMessages xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </ErrorMessages>
  <IsCorporateIdentity>false</IsCorporateIdentity>
  <IsSucces>false</IsSucces>
  <Ooxml>String</Ooxml>
</RegisterDocumentResponse>