DigiOffice Gateway Web Services

<back to all web services

GetRegistrationProfileDetailsFromEmailDraft

Requires Authentication
import Foundation
import ServiceStack

public class GetRegistrationProfileDetailsFromEmailDraft : Codable
{
    public var pidTag:String?
    public var isOffice365Context:Bool?

    required public init(){}
}

public class RegistrationprofileDetails : Registrationprofile
{
    public var steps:[RegistrationprofileStep] = []
    public var messages:[InformationMessageBase] = []
    public var readOnly:Bool?

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

    private enum CodingKeys : String, CodingKey {
        case steps
        case messages
        case readOnly
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        steps = try container.decodeIfPresent([RegistrationprofileStep].self, forKey: .steps) ?? []
        messages = try container.decodeIfPresent([InformationMessageBase].self, forKey: .messages) ?? []
        readOnly = try container.decodeIfPresent(Bool.self, forKey: .readOnly)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if steps.count > 0 { try container.encode(steps, forKey: .steps) }
        if messages.count > 0 { try container.encode(messages, forKey: .messages) }
        if readOnly != nil { try container.encode(readOnly, forKey: .readOnly) }
    }
}

public class Registrationprofile : Codable
{
    public var id:String?
    public var name:String?
    public var hint:String?
    public var order:Int?
    public var registerAutomatically:Bool?
    public var registerInBackground:Bool?
    public var thumbnailUrl:String?
    public var progCode:String?
    public var versionControlType:Int?
    public var woPlaceLogo:Int?
    public var woPrinterBins:String?
    public var selectAllFiles:Bool?

    required public init(){}
}

public class RegistrationprofileStep : Codable
{
    public var id:String?
    public var name:String?
    public var order:Int?
    public var layout:RegistrationprofileStepLayout?
    public var groups:[RegistrationprofileGroup] = []

    required public init(){}
}

public enum RegistrationprofileStepLayout : String, Codable
{
    case OneColumn_12
    case TwoColumn_6_6
    case TwoColumn_7_5
    case ThreeColumn_4_4_4
}

public class RegistrationprofileGroup : Codable
{
    public var id:String?
    public var name:String?
    public var label:String?
    public var order:Int?
    public var columnIndex:Int?
    public var fields:[RegistrationprofileField] = []
    public var labelLayoutType:Int?

    required public init(){}
}

public class RegistrationprofileField : Codable
{
    public var id:String?
    public var documentFieldID:String?
    public var label:String?
    public var userControlType:String?
    public var userControlProperties:[SerializableKeyValuePair<String,Object>] = []
    public var hint:String?
    public var order:Int?
    public var hasDependableFields:Bool?
    public var entityName:String?
    public var state:RegistrationProfileFieldStateBase?

    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(){}
}

public class InformationMessageBase : IInformationMessage, Codable
{
    public var type:MessageType?
    public var summary:String?
    public var fullMessage:String?
    public var fieldName:String?
    public var keepOpen:Bool?

    required public init(){}
}

public enum MessageType : Int, Codable
{
    case Information = 1
    case Warning = 2
    case Error = 3
    case Success = 4
}


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

{
	PidTag: String,
	IsOffice365Context: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Steps: 
	[
		{
			Name: String,
			Order: 0,
			Layout: OneColumn_12,
			Groups: 
			[
				{
					Name: String,
					Label: String,
					Order: 0,
					ColumnIndex: 0,
					Fields: 
					[
						{
							Label: String,
							UserControlType: String,
							UserControlProperties: 
							[
								{
									
								}
							],
							Hint: String,
							Order: 0,
							HasDependableFields: False,
							EntityName: String,
							State: 
							{
								Required: False,
								Visible: False,
								Readonly: False
							}
						}
					],
					LabelLayoutType: 0
				}
			]
		}
	],
	Messages: 
	[
		{
			
		}
	],
	ReadOnly: False,
	Name: String,
	Hint: String,
	Order: 0,
	RegisterAutomatically: False,
	RegisterInBackground: False,
	ThumbnailUrl: String,
	ProgCode: String,
	VersionControlType: 0,
	WOPlaceLogo: 0,
	WOPrinterBins: String,
	SelectAllFiles: False
}