DigiOffice Gateway Web Services

<back to all web services

UploadFile

Requires Authentication
The following routes are available for this service:
POST/api/DMS/UploadFile
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports IDB.API.DMS.Operations
Imports IDB.Diagnostics
Imports IDB.Core.Diagnostics.Interfaces
Imports IDB.Core.Diagnostics

Namespace Global

    Namespace IDB.API.DMS.Operations

        Public Partial Class UploadFile
            Public Overridable Property RegistrationProfileID As Guid
            Public Overridable Property NavigationPath As String
            Public Overridable Property FileName As String
            Public Overridable Property FileDate As Date?
            Public Overridable Property Description As String
            Public Overridable Property DocumentUpload As Boolean
            Public Overridable Property Source As String
            Public Overridable Property MetaData As String
            Public Overridable Property DocumentID As Guid?
            Public Overridable Property HoofdDocumentID As Guid?
            Public Overridable Property SubDocumentIDs As List(Of Guid)
        End Class

        <DataContract>
        Public Partial Class UploadFileResponse
            <DataMember>
            Public Overridable Property DocumentId As Guid?

            <DataMember>
            Public Overridable Property DocumentUploadId As Integer?

            <DataMember>
            Public Overridable Property DocumentNr As String

            <DataMember>
            Public Overridable Property Messages As InformationMessages
        End Class
    End Namespace

    Namespace IDB.Core.Diagnostics

        Public Enum MessageType
            Information = 1
            Warning = 2
            [Error] = 3
            Success = 4
        End Enum
    End Namespace

    Namespace IDB.Core.Diagnostics.Interfaces

        Public Partial Class InformationMessageBase
            Implements IInformationMessage
            Public Overridable Property Type As MessageType Implements IInformationMessage.Type
            Public Overridable Property Summary As String Implements IInformationMessage.Summary
            Public Overridable Property FullMessage As String Implements IInformationMessage.FullMessage
            Public Overridable Property FieldName As String Implements IInformationMessage.FieldName
            Public Overridable Property KeepOpen As Boolean Implements IInformationMessage.KeepOpen
        End Class
    End Namespace

    Namespace IDB.Diagnostics

        Public Partial Class InformationMessages
            Inherits List(Of InformationMessageBase)
            Implements IInformationMessages
        End Class
    End Namespace
End Namespace

VB.NET 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: 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>