DigiOffice Gateway Web Services

<back to all web services

AddDocumentByEmailMessageId

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 MetaDataField:
    id: Optional[str] = None
    document_veld_i_d: Optional[str] = None
    name: Optional[str] = None
    label: Optional[str] = None
    datatype: Optional[str] = None
    print_label: Optional[str] = None
    entity: Optional[str] = None
    print_value: Optional[str] = None
    registration_value: Optional[str] = None
    sp_site_column_name: Optional[str] = None
    shadow_name: Optional[str] = None
    shadow_datatype: Optional[str] = None
    shadow_s_p_site_column_name: Optional[str] = None
    shadow_s_p_site_column_registration_value: Optional[str] = None
    shadow_registration_value: Optional[str] = None
    is_key_field: Optional[bool] = None
    kopieren_bij_nieuwe_versie: Optional[bool] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Bookmark:
    remove_last_break: Optional[bool] = None
    replace_on_change: Optional[bool] = None
    is_dynamic: Optional[bool] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Mailings:
    pass


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AttachmentMailing:
    pass


class IInformationMessages:
    pass


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DocumentResponse:
    document_i_d: Optional[str] = None
    document_nr: Optional[str] = None
    root_document_i_d: Optional[str] = None
    meta_data: Optional[List[MetaDataField]] = None
    bookmarks: Optional[List[Bookmark]] = None
    mailings: Optional[Mailings] = None
    attachments_mailings: Optional[List[AttachmentMailing]] = None
    messages: Optional[IInformationMessages] = None
    source_document_path: Optional[str] = None
    destination_document_path: Optional[str] = None
    share_point_content_type_name: Optional[str] = None
    zip_attachments: Optional[bool] = None


class DocInfoSilentMode(str, Enum):
    OFF = 'Off'
    ALLOW_USER_INTERACTION = 'AllowUserInteraction'
    DO_NOT_ALLOW_USER_INTERACTION = 'DoNotAllowUserInteraction'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AddDocument:
    registration_profile_i_d: Optional[str] = None
    document_i_d: Optional[str] = None
    root_document_i_d: Optional[str] = None
    assign_to_user_i_d: Optional[int] = None
    assign_to_group_i_d: Optional[int] = None
    meta_data: Optional[List[MetaDataField]] = None
    mailings: Optional[Mailings] = None
    attachments_mailings: Optional[List[AttachmentMailing]] = None
    file_i_d: Optional[str] = None
    silent_mode: Optional[DocInfoSilentMode] = None
    update_storage_system: Optional[bool] = None
    message_queue_id: Optional[int] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AddDocumentByEmailMessageId:
    item_id: Optional[str] = None
    ews_url: Optional[str] = None
    token: Optional[str] = None
    document_id: Optional[str] = None
    document_to_add: Optional[AddDocument] = None

Python AddDocumentByEmailMessageId DTOs

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

HTTP + CSV

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

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

{"ItemId":"String","EwsUrl":"String","Token":"String","DocumentId":"String","documentToAdd":{"RegistrationProfileID":"00000000-0000-0000-0000-000000000000","DocumentID":"00000000-0000-0000-0000-000000000000","RootDocumentID":"00000000-0000-0000-0000-000000000000","AssignToUserID":0,"AssignToGroupID":0,"MetaData":[{"ID":"00000000-0000-0000-0000-000000000000","DocumentVeldID":"00000000-0000-0000-0000-000000000000","Name":"String","Label":"String","Datatype":"String","PrintLabel":"String","Entity":"String","PrintValue":"String","RegistrationValue":"String","SPSiteColumnName":"String","ShadowName":"String","ShadowDatatype":"String","ShadowSPSiteColumnName":"String","ShadowSPSiteColumnRegistrationValue":"String","ShadowRegistrationValue":"String","IsKeyField":false,"KopierenBijNieuweVersie":false}],"Mailings":{},"AttachmentsMailings":[{}],"FileID":"00000000-0000-0000-0000-000000000000","SilentMode":"Off","updateStorageSystem":false,"MessageQueueId":0}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"DocumentID":"00000000-0000-0000-0000-000000000000","DocumentNr":"String","RootDocumentID":"00000000-0000-0000-0000-000000000000","MetaData":[{"ID":"00000000-0000-0000-0000-000000000000","DocumentVeldID":"00000000-0000-0000-0000-000000000000","Name":"String","Label":"String","Datatype":"String","PrintLabel":"String","Entity":"String","PrintValue":"String","RegistrationValue":"String","SPSiteColumnName":"String","ShadowName":"String","ShadowDatatype":"String","ShadowSPSiteColumnName":"String","ShadowSPSiteColumnRegistrationValue":"String","ShadowRegistrationValue":"String","IsKeyField":false,"KopierenBijNieuweVersie":false}],"Bookmarks":[{"RemoveLastBreak":false,"ReplaceOnChange":false,"IsDynamic":false}],"Mailings":{},"AttachmentsMailings":[{}],"Messages":null,"SourceDocumentPath":"String","DestinationDocumentPath":"String","SharePointContentTypeName":"String","ZIPAttachments":false}