DigiOffice Gateway Web Services

<back to all web services

UpdateDraftCorporateIdentityMail

Requires Authentication
import Foundation
import ServiceStack

public class UpdateDraftCorporateIdentityMail : CreateDraftCorporateIdentityMail
{
    public var emailHtml:String?

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case emailHtml
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        emailHtml = try container.decodeIfPresent(String.self, forKey: .emailHtml)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if emailHtml != nil { try container.encode(emailHtml, forKey: .emailHtml) }
    }
}

public class CreateDraftCorporateIdentityMail : Outlook365Properties
{
    public var registrationProfileID:String?
    public var values:[RegistrationValue] = []
    public var processes:[Process] = []
    public var documentUploadId:String?
    public var messageQueueId:String?
    public var replyEmailHtml:String?

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case registrationProfileID
        case values
        case processes
        case documentUploadId
        case messageQueueId
        case replyEmailHtml
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        registrationProfileID = try container.decodeIfPresent(String.self, forKey: .registrationProfileID)
        values = try container.decodeIfPresent([RegistrationValue].self, forKey: .values) ?? []
        processes = try container.decodeIfPresent([Process].self, forKey: .processes) ?? []
        documentUploadId = try container.decodeIfPresent(String.self, forKey: .documentUploadId)
        messageQueueId = try container.decodeIfPresent(String.self, forKey: .messageQueueId)
        replyEmailHtml = try container.decodeIfPresent(String.self, forKey: .replyEmailHtml)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if registrationProfileID != nil { try container.encode(registrationProfileID, forKey: .registrationProfileID) }
        if values.count > 0 { try container.encode(values, forKey: .values) }
        if processes.count > 0 { try container.encode(processes, forKey: .processes) }
        if documentUploadId != nil { try container.encode(documentUploadId, forKey: .documentUploadId) }
        if messageQueueId != nil { try container.encode(messageQueueId, forKey: .messageQueueId) }
        if replyEmailHtml != nil { try container.encode(replyEmailHtml, forKey: .replyEmailHtml) }
    }
}

public class Outlook365Properties : Codable
{
    public var pidTag:String?
    public var itemId:String?
    public var ewsUrl:String?
    public var token:String?

    required public init(){}
}

public class RegistrationValue : Codable
{
    public var key:String?
    public var value:String?
    public var shadowValue:String?

    required public init(){}
}

public class Process : Codable
{
    public var id:Int?
    public var title:String?
    public var Description:String?
    public var note:String?
    public var coordinator:String?
    public var urgent:Bool?
    public var transitions:[Transition] = []

    required public init(){}
}

public class Transition : Codable
{
    public var id:String?
    public var reason:String?
    public var delayDate:Date?
    public var delayReason:String?
    public var userIDs:[Int] = []
    public var groupIDs:[Int] = []

    required public init(){}
}

public class CorporateIdentityMail : Codable
{
    public var documentId:String?
    public var emailHtml:String?
    public var isRegistered:Bool?
    public var documentNr:String?
    public var values:[RegistrationProfileFieldStateBase] = []
    public var registrationProfileID:String?
    public var registerAutomatically:Bool?

    required public init(){}
}

public class RegistrationProfileFieldStateBase : Codable
{
    public var documentFieldID:String?
    public var required:Bool?
    public var visible:Bool?
    public var readonly:Bool?

    required public init(){}
}


Swift UpdateDraftCorporateIdentityMail 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/UpdateDraftCorporateIdentityMail HTTP/1.1 
Host: digiofficeapigateway.deltares.nl 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"EmailHtml":"String","RegistrationProfileID":"00000000-0000-0000-0000-000000000000","Values":[{"Key":"00000000-0000-0000-0000-000000000000","Value":"String","ShadowValue":"String"}],"Processes":[{"ID":0,"Title":"String","Description":"String","Note":"String","Coordinator":"String","Urgent":false,"Transitions":[{"ID":"00000000-0000-0000-0000-000000000000","Reason":"String","DelayDate":"0001-01-01T00:00:00.0000000","DelayReason":"String","UserIDs":[0],"GroupIDs":[0]}]}],"DocumentUploadId":"String","MessageQueueId":"String","ReplyEmailHtml":"String","PidTag":"String","ItemId":"String","EwsUrl":"String","Token":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"DocumentId":"00000000-0000-0000-0000-000000000000","EmailHtml":"String","IsRegistered":false,"DocumentNr":"String","Values":[{"DocumentFieldID":"00000000-0000-0000-0000-000000000000","Required":false,"Visible":false,"Readonly":false}],"RegistrationProfileID":"00000000-0000-0000-0000-000000000000","RegisterAutomatically":false}