Send API V1
HammySendAPI WSDL letöltése
Send
Web service API
Kérés
Válasz
Minta
< soapenv:Envelope xmlns:soapenv = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:send = "http://send.api.hammy.dbx.hu/" >
< soapenv:Header />
< soapenv:Body >
< send:sendMail >
< request >
< clientHashKey >?</ clientHashKey >
< recipientAddress >emailaddress@dbx.hu</ recipientAddress >
< recipientName >NAME</ recipientName >
< mailSubject >Teszt levél tárgy</ mailSubject >
< mailBody >Teszt levél szöveg</ mailBody >
< fromAddress >norepy@dbx.hu</ fromAddress >
< fromName >NAME</ fromName >
< xmlData >
< DATA >
< contractNumber > 10000001 < /contractNumber >
< clientID > 9000001 < /clientID >
< /DATA >
</ xmlData >
< archivingExpected >false</ archivingExpected >
< certificationExpected >false</ certificationExpected >
</ request >
</ send:sendMail >
</ soapenv:Body >
</ soapenv:Envelope >
< soapenv:Envelope xmlns:soapenv = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:send = "http://send.api.hammy.dbx.hu/" >
< soapenv:Header />
< soapenv:Body >
< send:sendMail >
< request >
< clientHashKey >?</ clientHashKey >
< requestId >123</ requestId >
< partnerRef >partner1234</ partnerRef >
< messageType >TEST.MAIL</ messageType >
< messageTypeVersion >1</ messageTypeVersion >
< recipientAddress >emailaddress@dbx.hu</ recipientAddress >
< recipientName >NAME</ recipientName >
< fromAddress >norepy@dbx.hu</ fromAddress >
< fromName >NAME</ fromName >
< xmlData >
< DATA >
< contractNumber > 10000001 < /contractNumber >
< clientID > 9000001 < /clientID >
< /DATA >
</ xmlData >
< archivingExpected >false</ archivingExpected >
< certificationExpected >false</ certificationExpected >
</ request >
</ send:sendMail >
</ soapenv:Body >
</ soapenv:Envelope >
< soapenv:Envelope xmlns:soapenv = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:send = "http://send.api.hammy.dbx.hu/" >
< soapenv:Header />
< soapenv:Body >
< send:sendMail >
< request >
< clientHashKey >?</ clientHashKey >
< requestId >123</ requestId >
< partnerRef >partner1234</ partnerRef >
< messageType >TEST.MAIL</ messageType >
< messageTypeVersion >1</ messageTypeVersion >
< recipientAddress >emailaddress@dbx.hu</ recipientAddress >
< recipientName >NAME</ recipientName >
< ccRecipientAddress >cc_email_address@dbx.hu</ ccRecipientAddress >
< ccRecipientName >CC NAME</ ccRecipientName >
< fromAddress >norepy@dbx.hu</ fromAddress >
< fromName >NAME</ fromName >
< xmlData >
< DATA >
< contractNumber > 10000001 < /contractNumber >
< clientID > 9000001 < /clientID >
< /DATA >
</ xmlData >
< archivingExpected >false</ archivingExpected >
< certificationExpected >false</ certificationExpected >
< attachments >
< attachment >
< fileName >minta.pdf</ fileName >
< content >[base_64_content]</ content >
< documentType >SAMPLE1</ documentType >
< objectType >POLICY</ objectType >
< objectRef >123456789</ objectRef >
< archivingExpected >true</ archivingExpected >
< certificationExpected >false</ certificationExpected >
< deleteSourceExpected >false</ deleteSourceExpected >
< postableWithoutCertificate >true</ postableWithoutCertificate >
< properties >
< property >
< key >ATTACHMENT_SOURCE</ key >
< value >INLINE</ value >
< isMetaData >false</ isMetaData >
</ property >
< property >
< key >INTERNAL_FILE_NAME</ key >
< value >test.pdf</ value >
< isMetaData >false</ isMetaData >
</ property >
< property >
< key >SZERZODO_NEVE</ key >
< value >Béla</ value >
< isMetaData >true</ isMetaData >
</ property >
< property >
< key >ARCHIVE_TARGET</ key >
< value >DMS</ value >
< isMetaData >false</ isMetaData >
</ property >
</ properties >
</ attachment >
</ attachments >
< properties >
< property >
< key >AKARMI_PROPERTY</ key >
< value >egy valami</ value >
< isMetaData >false</ isMetaData >
</ property >
</ properties >
</ request >
</ send:sendMail >
</ soapenv:Body >
</ soapenv:Envelope >
< S:Envelope xmlns:S = "http://schemas.xmlsoap.org/soap/envelope/" >
< S:Body >
< ns2:sendMailResponse xmlns:ns2 = "http://send.api.hammy.dbx.hu/" >
< response >
< messageId >18</ messageId >
< status >
< code >0</ code >
< messages />
</ status >
</ response >
</ ns2:sendMailResponse >
</ S:Body >
</ S:Envelope >
REST API
REST API Info
Kérés
POST hammy/json/send/v1/send
multipart/form-data vagy multipart/mixed kérés.
multipart név: message
A csatolmányokat további partokban lehet megadni, a part neve a csatolmány referenciája.
Válasz
Minta
A lenti példa olyan emailre vonatkozik, amihez beküldött csatolmány tartozik. Ha csatolmány nélküli az email, akkor nem szükséges
multipart üzenetet küldeni. Ebben az esetben a Content-Type header az application/vnd.api+json vagy az application/json
valamelyike kell legyen, az üzenet body-ja pedig:
POST /hammy/json/send/v 1 /send?clientHashKey={ {clientHashKey }}&userName={ {userName }}
Authorization: JWT { {jwtToken }}
X-Client-Hash-Key: { {clientHashKey }}
X-User-Name: { {userName }}
content-type: multipart/form-data; boundary={ {boundary }}
{ {boundary }}
Content-Disposition: form-data; name= "message"
Content-Type: application/json
{
"data" : {
"type" : "sendRequest" ,
"id" : "dfjhdsfk" ,
"attributes" : {
"mailSubject" : "Teszt" ,
"mailBody" : "TesztTesztTeszt" ,
"recipientAddress" : "cimzett.neve@valahol.hu" ,
"recipientName" : "Dr. Címzett Neve" ,
"fromAddress" : "felado@valahonnan.com" ,
"fromName" : "Fel Adó"
},
"relationships" : {
"properties" : {
"data" : [ ]
},
"attachments" : {
"data" : [ {
"type" : "attachments" ,
"id" : "1"
} ]
}
}
},
"included" : [ {
"type" : "attachments" ,
"id" : "1" ,
"attributes" : {
"fileName" : "image.png" ,
"internalFileName" : "internal-image.png" ,
"archivingExpected" : true ,
"certificationExpected" : false ,
"contentAvailable" : false ,
"attachmentRef" : "{{attachmentPartNev}}" ,
"deleteSourceExpected" : false ,
"postableWithoutCertificate" : false
},
"relationships" : {
"properties" : {
"data" : [ {
"type" : "properties" ,
"id" : "1"
}, {
"type" : "properties" ,
"id" : "2"
}, {
"type" : "properties" ,
"id" : "3"
} ]
}
}
}, {
"type" : "properties" ,
"id" : "3" ,
"attributes" : {
"key" : "ARCHIVE_RELATIVE_PATH" ,
"value" : "/alma/" ,
"isMetaData" : false
}
}, {
"type" : "properties" ,
"id" : "2" ,
"attributes" : {
"key" : "ARCHIVE_TARGET" ,
"value" : "FS" ,
"isMetaData" : false
}
}, {
"type" : "properties" ,
"id" : "1" ,
"attributes" : {
"key" : "ATTACHMENT_SOURCE" ,
"value" : "INLINE" ,
"isMetaData" : false
}
} ]
}
{ {boundary }}
Content-Disposition: form-data; name= "{{attachmentPartNev}}"
Content-Type: application/octet-stream
[ BINÁRIS TARTALOM ]
{ {boundary }}
HTTP/ 1.1 200 OK
Authorization: JWT { {jwtToken }}
Content-Type: application/vnd.api+json
{
"data" : {
"type" : "sendResponse" ,
"id" : "122" ,
"attributes" : { }
},
"meta" : {
"total" : null ,
"params" : [ ],
"responseStatus" : {
"code" : 0 ,
"messages" : [ ]
}
}
}
Resend
Web service API
Kérés
Válasz
Minta
< soapenv:Envelope xmlns:soapenv = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:send = "http://send.api.hammy.dbx.hu/" >
< soapenv:Header />
< soapenv:Body >
< send:resendMail >
< request >
< clientHashKey >aa87cd4bcd3445bbc4</ clientHashKey >
< recipientAddress >address@dbx.hu</ recipientAddress >
< messageId >1111</ messageId >
< properties >
< property >
< key >AKARMI_PROPERTY</ key >
< value >egy valami</ value >
< isMetaData >false</ isMetaData >
</ property >
</ properties >
</ request >
</ send:resendMail >
</ soapenv:Body >
</ soapenv:Envelope >
< S:Envelope xmlns:S = "http://schemas.xmlsoap.org/soap/envelope/" >
< S:Body >
< ns2:resendMailResponse xmlns:ns2 = "http://send.api.hammy.dbx.hu/" >
< response >
< messageId >2222</ messageId >
< status >
< code >0</ code >
< messages />
</ status >
</ response >
</ ns2:resendMailResponse >
</ S:Body >
</ S:Envelope >
REST API
REST API Info
Kérés
POST hammy/json/send/v1/resend
Válasz
Minta
POST /hammy/json/send/v 1 /resend?clientHashKey={ {clientHashKey }}&userName={ {userName }}
Authorization: JWT { {jwtToken }}
X-Client-Hash-Key: { {clientHashKey }}
X-User-Name: { {userName }}
Content-Type: application/vnd.api+json
{
"data" : {
"type" : "resendRequest" ,
"id" : "akrami" ,
"attributes" : {
"recipientAddress" : "valaki.cime@valahol.com" ,
"messageId" : "{{messageId}}"
},
"relationships" : {
"properties" : {
"data" : [ {
"type" : "properties" ,
"id" : "1"
}, {
"type" : "properties" ,
"id" : "2"
}, {
"type" : "properties" ,
"id" : "3"
} ]
}
}
},
"included" : [
{
"type" : "properties" ,
"id" : "3" ,
"attributes" : {
"key" : "ALMA" ,
"value" : "starking" ,
"isMetaData" : false
}
}, {
"type" : "properties" ,
"id" : "2" ,
"attributes" : {
"key" : "KORTE" ,
"value" : "villany" ,
"isMetaData" : false
}
}, {
"type" : "properties" ,
"id" : "1" ,
"attributes" : {
"key" : "BARACK" ,
"value" : "őszi" ,
"isMetaData" : false
}
}
]
}
HTTP/ 1.1 200 OK
Authorization: JWT { {jwtToken }}
Content-Type: application/vnd.api+json
{
"data" : {
"type" : "resendResponse" ,
"attributes" : {}
},
"meta" : {
"total" : null ,
"params" : [],
"responseStatus" : {
"code" : 0 ,
"messages" : []
}
}
}
Utoljára frissítve