ImzagerServices

<back to all web services

SignDocumentEYPV2

The following routes are available for this service:
All Verbs/SignDocumentEYPV2/
import Foundation
import ServiceStack

public class SignDocumentEYPV2 : Codable
{
    public var eypImzaType:EYPImzaType
    public var clientKey:String
    public var authorizationID:String
    public var userSSN:String
    public var agentMessage:String
    public var documentId:Int
    public var stampYn:Bool
    public var stampSSN:String

    required public init(){}
}

public enum EYPImzaType : Int, Codable
{
    case ParafOzetiImza = 1
    case PaketOzetiImza = 2
    case NihaiOzetMuhur = 3
}

public class SignDocumentEYPResponse : BaseResponse
{
    public var result:Bool

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

    private enum CodingKeys : String, CodingKey {
        case result
    }

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

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

public class BaseResponse : Codable
{
    public var serviceSuccessResult:Bool
    public var errorMesage:String

    required public init(){}
}


Swift SignDocumentEYPV2 DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /SignDocumentEYPV2/ HTTP/1.1 
Host: imzagerservices.eyyubiye.bel.tr 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"eypImzaType":"ParafOzetiImza","ClientKey":"String","AuthorizationID":"String","UserSSN":"String","AgentMessage":"String","DocumentId":0,"stampYn":false,"StampSSN":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Result":false,"ServiceSuccessResult":false,"ErrorMesage":"String"}