DigiOffice Gateway Web Services

<back to all web services

UploadFile

Requires Authentication
The following routes are available for this service:
POST/api/DMS/UploadFile
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 UploadFile:
    registration_profile_i_d: Optional[str] = None
    navigation_path: Optional[str] = None
    file_name: Optional[str] = None
    file_date: Optional[datetime.datetime] = None
    description: Optional[str] = None
    document_upload: bool = False
    source: Optional[str] = None
    meta_data: Optional[str] = None
    document_i_d: Optional[str] = None
    hoofd_document_i_d: Optional[str] = None
    sub_document_i_ds: Optional[List[str]] = None


class MessageType(IntEnum):
    INFORMATION = 1
    WARNING = 2
    ERROR = 3
    SUCCESS = 4


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class InformationMessageBase(IInformationMessage):
    type: Optional[MessageType] = None
    summary: Optional[str] = None
    full_message: Optional[str] = None
    field_name: Optional[str] = None
    keep_open: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class InformationMessages(List[InformationMessageBase], IInformationMessages):
    pass


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UploadFileResponse:
    document_id: Optional[str] = None
    document_upload_id: Optional[int] = None
    document_nr: Optional[str] = None
    messages: Optional[InformationMessages] = None

Python UploadFile 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 /api/DMS/UploadFile HTTP/1.1 
Host: test-dogw.klokgroep.nl 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<UploadFile xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DMS.Operations">
  <Description>String</Description>
  <DocumentID>00000000-0000-0000-0000-000000000000</DocumentID>
  <DocumentUpload>false</DocumentUpload>
  <FileDate>0001-01-01T00:00:00</FileDate>
  <FileName>String</FileName>
  <HoofdDocumentID>00000000-0000-0000-0000-000000000000</HoofdDocumentID>
  <MetaData>String</MetaData>
  <NavigationPath>String</NavigationPath>
  <RegistrationProfileID>00000000-0000-0000-0000-000000000000</RegistrationProfileID>
  <Source>String</Source>
  <SubDocumentIDs xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
  </SubDocumentIDs>
</UploadFile>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<UploadFileResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DMS.Operations">
  <DocumentId>00000000-0000-0000-0000-000000000000</DocumentId>
  <DocumentNr>String</DocumentNr>
  <DocumentUploadId>0</DocumentUploadId>
  <Messages xmlns:d2p1="http://schemas.datacontract.org/2004/07/IDB.Core.Diagnostics.Interfaces">
    <d2p1:InformationMessageBase i:nil="true" />
  </Messages>
</UploadFileResponse>