DigiOffice API Services Services

<back to all web services

UploadFile

Requires Authentication
The following routes are available for this service:
POST/api/DMS/UploadFile
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class UploadFile
{
    open var RegistrationProfileID:UUID? = null
    open var NavigationPath:String? = null
    open var FileName:String? = null
    open var FileDate:Date? = null
    open var Description:String? = null
    open var DocumentUpload:Boolean? = null
    open var Source:String? = null
    open var MetaData:String? = null
    open var DocumentID:UUID? = null
    open var HoofdDocumentID:UUID? = null
    open var SubDocumentIDs:ArrayList<UUID>? = null
}

@DataContract
open class UploadFileResponse
{
    @DataMember
    open var DocumentId:UUID? = null

    @DataMember
    open var DocumentUploadId:Int? = null

    @DataMember
    open var DocumentNr:String? = null

    @DataMember
    open var Messages:InformationMessages? = null
}

open class InformationMessages : ArrayList<InformationMessageBase>(), IInformationMessages
{
}

open class InformationMessageBase : IInformationMessage
{
    override var Type:MessageType? = null
    override var Summary:String? = null
    override var FullMessage:String? = null
    override var FieldName:String? = null
    override var KeepOpen:Boolean? = null
}

enum class MessageType(val value:Int)
{
    Information(1),
    Warning(2),
    Error(3),
    Success(4),
}

Kotlin UploadFile 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 /api/DMS/UploadFile HTTP/1.1 
Host: test-do-services.klokgroep.nl 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	NavigationPath: String,
	FileName: String,
	FileDate: 0001-01-01,
	Description: String,
	DocumentUpload: False,
	Source: String,
	MetaData: String,
	DocumentID: 00000000-0000-0000-0000-000000000000,
	HoofdDocumentID: 00000000-0000-0000-0000-000000000000,
	SubDocumentIDs: 
	[
		00000000-0000-0000-0000-000000000000
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	DocumentId: 00000000-0000-0000-0000-000000000000,
	DocumentUploadId: 0,
	DocumentNr: String,
	Messages: 
	[
		{
			
		}
	]
}