Transactional Email
İşlemsel e-posta (transactional email) göndermek için bu uç noktalar kullanılır.
POST email/transactional/send
- POST email/transactional/send
Transactional email gönderir.
Example request:
POST v1/email/transactional/send HTTP/1.1 Host: api.izinver.net/api/ Accept: application/json, application/x-www-form-urlencoded, multipart/form-data
- Form Parameters
subject – required Email’in konusu
from_name – required Email’i gönderen kişi/kurum vb.
from_email – required Email’i gönderen email adresi. Dikkat email adresinin onaylı olması gerekmektedir.
to_email – required Email’in gideceği adres.
reply_to – Email geri bildirim adresi
html – required HTML içerik
- Request Headers
Authorization – required OAuth token to authenticate. Bkz: Kimlik Doğrulama ve Token Alma
- Status Codes
400 Bad Request – json object return
403 Forbidden – json object return
Example response:
HTTP/1.1 202 Accepted Vary: Accept Content-Type: application/json { "id": "628b58020a595ab01a41eccf" }
GET email/transactional/send/(str:ObjectId)
- GET email/transactional/send/(str: ObjectId)
Gönderilen email’in detaylarını getirir
Example request:
GET v1/email/transactional/send/628b8ab615629a83a4bdb1ab HTTP/1.1 Host: api.izinver.net/api/ Accept: application/json
- Parameters
ObjectId (str) – POST email/transactional/send sonucunda return edilen ID
- Request Headers
Authorization – required OAuth token to authenticate. Bkz: Kimlik Doğrulama ve Token Alma
- Status Codes
200 OK –
403 Forbidden – json object return
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "id": "61cec15427ffa71c2b61c114", "subject": "Hello World", "from_name": "İzinver", "from_email": "[email protected]", "reply_to": "[email protected]", "html": "<!DOCTYPE html>\n<html>\n<body>\n\n<h2>HTML Images</h2>\n<p>HTML images are defined with the img tag:</p>\n\n<img src=\"https://www.w3schools.com/html/w3schools.jpg\" alt=\"W3Schools.com\" width=\"104\" height=\"142\">\n\n</body>\n</html>", "to_email": "[email protected]", "source_ip": "172.23.0.1", "result": "send", "hard" : false, "ses_return": { "message": { "ResponseMetadata": { "RequestId": "1d9a4c87-a7d9-454c-a748-43ff3692f7f0", "HTTPStatusCode": 200, "HTTPHeaders": { "date": "Mon, 23 May 2022 13:23:03 GMT", "content-type": "application/json", "content-length": "76", "connection": "keep-alive", "x-amzn-requestid": "1d9a4c87-a7d9-454c-a748-43ff3692f7f0" }, "RetryAttempts": 0 }, "MessageId": "01010180f115dc79-d3087880-2c93-4879-9438-55d98fa27244-000000" }, "status_code": 202 }, "created_date": "2021-12-31T08:37:40.791000Z", "updated_date": "2021-12-31T08:37:40.791000Z" }
- source_ip
Gönderen IP adresi
- result
waiting
: Bekliyor ,send
: Gönderildi,reject
: Red edildi- hard
Default :
false
. Hard Bounce’a düşmüş emailtrue
ile gösterilir.- ses_return
json data içerir.
result=send
veresult=reject
durumlarında dolu gelir.- created_date
Oluşturma tarihi
- updated_date
Son işlem tarihi
GET email/transactional/report/(str:ObjectId)
- GET email/transactional/report/(str: ObjectId)
Transactional email raporlarını getirir.
Example request:
GET v1/email/transactional/report/61cef4df29f12eb62510ca23 HTTP/1.1 Host: api.izinver.net/api/ Accept: application/json
- Parameters
ObjectId (str) – POST email/transactional/send sonucunda return edilen ID
- Request Headers
Authorization – required OAuth token to authenticate. Bkz: Kimlik Doğrulama ve Token Alma
- Status Codes
200 OK –
403 Forbidden – json object return
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json [ { "ses_status": "clicked", "created_at": "2022-01-18T08:38:08.363000Z", "ipAddress": "85.99.22.65", "useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15", "link": "https://www.w3schools.com", "hard": null, "bounce_type": null, "diagnostic_code": null }, { "ses_status": "opened", "created_at": "2022-01-18T08:37:28.993000Z", "ipAddress": "172.225.38.16", "useragent": "Mozilla/5.0", "link": null, "hard": null, "bounce_type": null, "diagnostic_code": null } ]
- ses_status
opened
: Açılma (Email açılmıştır),clicked
: Tıklama (Email içindeki bir link tıklanmıştır)bounced
: Email bounce düşmüştürcomplaint
: Email şikayet edilmiştir.- created_at
Oluşturma tarihi
- ipAddress
İşlemi gönderen IP adresi
- useragent
İşlemi gerçekleştiren tarayıcı ve diğer detay bilgiler.
- link
ses_status =
clicked
olması durumunda dolu gelir. Email içinde bulunan ve tıklama gerçekleştirilen linkin URL’sidir.- hard
ses_status =
bounced
olması durumunda dolu gelir. False ve True iki değer alır.false
: Soft Bounce,true
Hard Bounce- bounce_type
ses_status =
bounced
olması durumunda dolu gelir.SOFTBOUNCE
veHARDBOUNCE
değerlerini alır.- diagnostic_code
ses_status =
bounced
olması durumunda dolu gelir. Bounce düşen emailin nedeni burada yazar.
GET email/transactional/bounce
- GET email/transactional/bounce
Son 7 günde gönderilen email sayısını ve bonuce oranını getirir. True/False toplamı gönderim sayısıdır. True = Hard Bounce Hesaplama result=send durumundaki emailler sayılarak yapılır.
Example request:
GET v1/email/transactional/bounce HTTP/1.1 Host: api.izinver.net/api/ Accept: application/json
- Request Headers
Authorization – required OAuth token to authenticate. Bkz: Kimlik Doğrulama ve Token Alma
- Status Codes
200 OK –
403 Forbidden – json object return
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "bounce": [ { "_id": false, "count": 6 }, { "_id": true, "count": 3 } ], "today": "2022-01-20T08:02:41.901891", "before_date": "2022-01-13T08:02:41.901891" }
- bonunce
true
Hard Bounce sayısıdır.true
+false
7 gün içinde gönderile toplam email sayısıdır. Bonuce boş gelirse son 7 gün içinde email gönderimi yapılmamıştır.- today
Şimdiki zaman
- before_date
7 gün önceki zaman
Not
Tarihler UTC’dir.