DigiOffice Gateway Web Services

<back to all web services

AddDocumentByEmailMessageId

Requires Authentication
import Foundation
import ServiceStack

public class AddDocumentByEmailMessageId : Codable
{
    public var itemId:String?
    public var ewsUrl:String?
    public var token:String?
    public var documentId:String?
    public var documentToAdd:AddDocument?

    required public init(){}
}

public class AddDocument : Codable
{
    public var registrationProfileID:String?
    public var documentID:String?
    public var rootDocumentID:String?
    public var assignToUserID:Int?
    public var assignToGroupID:Int?
    public var metaData:[MetaDataField] = []
    public var mailings:Mailings?
    public var attachmentsMailings:[AttachmentMailing] = []
    public var fileID:String?
    public var silentMode:DocInfoSilentMode?
    public var updateStorageSystem:Bool?
    public var messageQueueId:Int?

    required public init(){}
}

// @DataContract
public class MetaDataField : Codable
{
    // @DataMember
    public var id:String?

    // @DataMember
    public var documentVeldID:String?

    // @DataMember
    public var name:String?

    // @DataMember
    public var label:String?

    // @DataMember
    public var datatype:String?

    // @DataMember
    public var printLabel:String?

    // @DataMember
    public var entity:String?

    // @DataMember
    public var printValue:String?

    // @DataMember
    public var registrationValue:String?

    // @DataMember
    public var spSiteColumnName:String?

    // @DataMember
    public var shadowName:String?

    // @DataMember
    public var shadowDatatype:String?

    // @DataMember
    public var shadowSPSiteColumnName:String?

    // @DataMember
    public var shadowSPSiteColumnRegistrationValue:String?

    // @DataMember
    public var shadowRegistrationValue:String?

    // @DataMember
    public var isKeyField:Bool?

    // @DataMember
    public var kopierenBijNieuweVersie:Bool?

    required public init(){}
}

public class Mailings : Codable
{
    required public init(){}
}

public class AttachmentMailing : Codable
{
    required public init(){}
}

public enum DocInfoSilentMode : String, Codable
{
    case Off
    case AllowUserInteraction
    case DoNotAllowUserInteraction
}

public class DocumentResponse : Codable
{
    public var documentID:String?
    public var documentNr:String?
    public var rootDocumentID:String?
    public var metaData:[MetaDataField] = []
    public var bookmarks:[Bookmark] = []
    public var mailings:Mailings?
    public var attachmentsMailings:[AttachmentMailing] = []
    //messages:IInformationMessages ignored. Swift doesn't support interface properties
    public var sourceDocumentPath:String?
    public var destinationDocumentPath:String?
    public var sharePointContentTypeName:String?
    public var zipAttachments:Bool?

    required public init(){}
}

public class Bookmark : Codable
{
    public var removeLastBreak:Bool?
    public var replaceOnChange:Bool?
    public var isDynamic:Bool?

    required public init(){}
}

public protocol IInformationMessages
{
}


Swift 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}