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 .xml suffix or ?format=xml

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<SignDocumentEYPV2 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DaB.Imzager.Services.ServiceModel">
  <AgentMessage>String</AgentMessage>
  <AuthorizationID>String</AuthorizationID>
  <ClientKey>String</ClientKey>
  <DocumentId>0</DocumentId>
  <StampSSN>String</StampSSN>
  <UserSSN>String</UserSSN>
  <eypImzaType>ParafOzetiImza</eypImzaType>
  <stampYn>false</stampYn>
</SignDocumentEYPV2>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SignDocumentEYPResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DaB.Imzager.Services.ServiceModel">
  <ErrorMesage>String</ErrorMesage>
  <ServiceSuccessResult>false</ServiceSuccessResult>
  <Result>false</Result>
</SignDocumentEYPResponse>