Email API
Liste ve Abone Yönetimi
Listeler, kullanıcıların abonelerini gruplandırdıkları yerdir.
Liste Servisleri
GET email/list-filter
Listeleri getirir.
- GET email/list-filter
Example request:
GET v1/email/list-filter/?ordering=title&page=1 HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json
- Query Parameters:
ordering – Birini kullanın
title,create_date. A dan ZtitleZ den A-titlepage – Sayfa numarası. default 1
- 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 { "count": 3, "next": "https://app.postacell.com.tr/api/v1/email/list-filter/?ordering=title&page=2", "previous": null, "results": [ { "id": "5fa29d777af8092595bcbac7", "title": "Müşteri Listesi", "user_id": 1, "valid": 1006, "update_date": "2020-11-04T12:24:23.609000Z", "create_date": "2020-11-04T12:24:23.609000Z" }, { "id": "5fa29d8d7af8092595bcbb21", "title": "Pazarlamacılar", "user_id": 1, "valid": 12000, "update_date": "2020-11-04T12:24:45.257000Z", "create_date": "2020-11-04T12:24:45.257000Z" }, { "id": "5fa29d8d7af8092595bcbb22", "title": "Yurt Dışı Genel Müdürler", "user_id": 1, "valid": 0, "update_date": "2020-11-04T12:24:45.501000Z", "create_date": "2020-11-04T12:24:45.501000Z" } ] }
- count:
Toplam data sayısı
- next:
Sonraki sayfanın linki
- previous:
Önceki sayfanın linki
- user_id:
Müşteri ID
- title:
Listenin başlığı
- valid:
Listenin içindeki geçerli abone sayısı
Not
title alanı içinde arama yapılabilir. Örnek : /v1/email/list-filter/?title=genel
GET email/list/(str:ObjectId)
- GET email/list/(str: ObjectId)
Liste detay
Example request:
GET v1/email/list/5fa3a57cfea360b650af1539 HTTP/1.1 Host: app.postacell.com.tr/api/
- Parameters:
ObjectId (str) – Liste unique 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": "5fa3a57cfea360b650af1539", "title": "Müşteri Listesi", "user_id": 1, "valid": 1700, "update_date": "2020-11-06T18:52:20.772755Z", "create_date": "2020-11-06T18:52:20.772797Z" }
- user_id:
Müşteri ID
- title:
Listenin başlığı
- valid:
Listenin içindeki geçerli abone sayısı
POST email/list
- POST email/list
Liste kaydeder.
Example request:
POST v1/email/list HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json, application/x-www-form-urlencoded, multipart/form-data
- Form Parameters:
title – required
- 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 201 Created Vary: Accept Content-Type: application/json { "id": "5fa59b6840a5c2a3a8fc5099", "title": "Müşteri Listesi", "user_id": 1, "valid": 0, "update_date": "2020-11-06T18:52:20.772755Z", "create_date": "2020-11-06T18:52:20.772797Z" }
- user_id:
Müşteri ID
- title:
Listenin başlığı
- valid:
Listenin içindeki geçerli abone sayısı
PATCH email/list/(str:ObjectId)
- PATCH email/list/(str: ObjectId)
Liste title alanının günceller.
Example request:
PATCH v1/email/list/5fa3a57cfea360b650af1539 HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json, application/x-www-form-urlencoded, multipart/form-data
- Parameters:
ObjectId (str) – Liste unique id
- Form Parameters:
title – required
- Request Headers:
Authorization – required OAuth token to authenticate. Bkz: Kimlik Doğrulama ve Token Alma
- Status Codes:
200 OK –
400 Bad Request – json object return
403 Forbidden – json object return
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "id": "5fa3a57cfea360b650af1539", "title": "Müşteri Listesi 1", "user_id": 1, "update_date": "2020-11-06T18:52:20.772755Z", "create_date": "2020-11-06T18:52:20.772797Z" }
- user_id:
Müşteri ID
- title:
Listenin başlığı
- valid:
Listenin içindeki geçerli abone sayısı
DELETE email/list/(str:ObjectId)
- DELETE email/list/(str: ObjectId)
Listeyi siler.
Example request:
DELETE v1/email/list/5fa3a57cfea360b650af1539 HTTP/1.1 Host: app.postacell.com.tr/api/
- Parameters:
ObjectId (str) – Liste unique id
- Request Headers:
Authorization – required OAuth token to authenticate. Bkz: Kimlik Doğrulama ve Token Alma
- Status Codes:
403 Forbidden – json object return
Example response:
HTTP/1.1 204 No Content
Not
Bir listeyi sildiğinizde içindeki aboneler silinmez.
GET email/counter/list/(str:ObjectId)
- GET email/counter/segment/(str: ObjectId)
ObjectId si gönderilen listenin abone status detaylarını getirir.
Example request:
GET v1/email/counter/list/600d5ef5c572db1443208c2e HTTP/1.1 Host: app.postacell.com.tr/api/
- Parameters:
ObjectId (str) – Liste unique 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": "active", "count": 3319 }, { "_id": "unsubscribed", "count": 1 }, { "_id": "spam_complaint", "count": 1 } ]
- _id:
Gelebilecek değerler :
active,unsubscribed,soft_bounce,hard_bounce,spam_complaint- count:
Listenin içindeki _id durumuna göre abone sayısı
Abone Servisleri
Kullanıcıların email adreslerini kayıt ettikleri yerdir.
GET email/subscribers-filter/
Aboneleri getirir. Parametre göndererek arama ve sıralama yapılabilir.
- GET email/subscribers-filter/
Example request:
GET v1/email/subscribers-filter HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json
- Query Parameters:
ordering – Birini kullanın
email,create_date. A dan ZemailZ den A-emailpage – Sayfa numarası. default 1
email – Email adresi
lists – Liste ObjectId. String olarak gönderilmelidir.
- 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 { "count": 22, "next": "https://app.postacell.com.tr/api/v1/email/subscribers-filter/?ordering=email&page=4", "previous": "https://app.postacell.com.tr/api/v1/email/subscribers-filter/?ordering=email&page=2", "results": [ { "id": "614724fb740710112251f140", "email": "[email protected]", "create_date": "2021-09-19T11:54:35.310000", "update_date": "2021-11-14T11:18:47.177000", "status": "active", "verify": 2 }, { "id": "6147255bc50c1253515629da", "email": "[email protected]", "create_date": "2021-09-19T11:56:11.905000", "update_date": "2021-09-23T11:43:32.456000", "status": "active", "verify": 2 }, { "id": "6147255bc50c1253515629dc", "email": "[email protected]", "create_date": "2021-09-19T11:56:11.926000", "update_date": "2021-09-23T11:43:32.467000", "status": "active", "verify": 2 }, { "id": "6147255bc50c1253515629de", "email": "[email protected]", "create_date": "2021-09-19T11:56:11.942000", "update_date": "2021-09-23T11:43:32.477000", "status": "active", "verify": 2 } ] }
- count:
Toplam data sayısı
- next:
Sonraki sayfanın linki
- previous:
Önceki sayfanın linki
- email:
Email adresi
- status:
Alabileceği değerler :
active,unsubscribed,soft_bounce,hard_bounce,spam_complaint- verify:
Email Verify durumu 1 = Email Geçerli Değil, 2 = Email Geçerli, 3 = Email Kontrol İçin Bekliyor
Not
Bu uç nokta’da email, status, lists parametresinde filtreleme yapılabilir.
Örn 1 : /v1/email/subscribers-filter/?email=gmail.com. İçinde gmail.com geçen tüm aboneler döner.
Örn 2 : /v1/email/subscribers-filter/?email=gmail.com&status=spam_complaint. İçinde gmail.com geçen ve status=spam_complaint durumundaki aboneler döner.
Örn 3 : /v1/email/subscribers-filter/?lists=5fa3057afea360b650af1536&status=spam_complaint. status=spam_complaint ve Liste ObjectId 5fa3057afea360b650af1536 ye kayıtlı aboneler döner.
Arama operatörleri aşağıdaki gibidir
email– %email%status– =lists– =
GET email/subscribers/(str:ObjectId)
- GET email/subscribers/(str: ObjectId)
Abone bilgilerini getirir.
Example request:
GET v1/email/subscribers/5fa6f6520ca622032cb90d8b HTTP/1.1 Host: app.postacell.com.tr/api/
- Parameters:
ObjectId (str) – Subscribers unique 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": "5fa6f6520ca622032cb90d8b", "email": "[email protected]", "first_name": "John", "last_name": "Doe", "phone": "", "create_date": "2020-11-27T12:12:18.248000Z", "update_date": "2020-11-27T12:12:18.248000Z", "status": "active", "user_id": 1, "verify": 2, "source": "manual", "source_ip": "52.58.5.37", "lists": [ { "id": "5fa3057afea360b650af1536", "title": "General Manager" }, { "id": "5fa2fe74fea360b650af152c", "title": "Northern Network Marketing" } ], "fields": [ { "value": "Bismarck State College", "field": { "id": "5fddfb903abcbbdfcc676696", "title": "School", "type": "text", "merge_tag": "school" } }, { "value": "29", "field": { "id": "5fe226a45c93d3d479d9f151", "title": "Age", "type": "number", "merge_tag": "age" } } ] }
- email:
Email adresi
- first_name:
Adı
- last_name:
Soyadı
- phone:
Telefon numarası
- status:
Alabileceği değerler :
active,unsubscribed,soft_bounce,hard_bounce,spam_complaint- verify:
Email Verify durumu 1 = Email Geçerli Değil, 2 = Email Geçerli, 3 = Email Kontrol İçin Bekliyor
- source_ip:
Kaydı gönderen IP adresi
- source:
Kayıt tipi
- user_id:
Kullanıcı id
- lists:
Aboneye bağlı liste veya listeler
- fields:
Aboneye özel alanları
POST email/subscribers
- POST email/subscribers
Abone yoksa kaydeder varsa günceller.
Not
Bu servis sadece
Accept: application/jsonveriyi kabul eder.Example request:
POST v1/email/subscribers HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json { "email": "[email protected]", "first_name": "John", "last_name": "Doe", "status": "active", "update": false, "lists": [ "613360a7f4f13a30fd4419d9", "6013ce49a6f33d3b1809da1d" ], "fields": [ { "value": "New G", "field": "613ef1081ee5c40e796387b8" } ] }
- Form Parameters:
email – required. Email adresi
first_name – Adı
last_name – Soyadı
phone – Telefon numarası
status – required. Alabileceği değerler :
active,unsubscribed,soft_bounce,hard_bounce,spam_complaintlists – Bir abone bir veya birden fazla listeye dahil edilebilir.
fields – Aboneye özel alanlardır. Değerler field ve value eşleştirmesi yapılarak gönderilir.
update – Parametrenin alabileceği değerler
true,false. true gönderilirse mevcut kayıt güncellenir.
- Request Headers:
Authorization – required OAuth token to authenticate. Bkz: Kimlik Doğrulama ve Token Alma
- Status Codes:
200 OK – Kayıt update olduysa döner
400 Bad Request – json object return
403 Forbidden – json object return
Example response:
HTTP/1.1 201 Created Vary: Accept Content-Type: application/json { "id": "613ef23d1ee5c40e796387bc", "email": "[email protected]", "first_name": "John", "last_name": "Doe", "phone": null, "create_date": "2021-09-13T06:39:57.349353Z", "update_date": "2021-09-13T06:39:57.349375Z", "status": "active", "source_ip": "192.168.80.1", "source": "manual", "verify": 2, "user_id": 56, "lists": [ "613360a7f4f13a30fd4419d9", "6013ce49a6f33d3b1809da1d" ], "fields": [ { "value": "New G", "field": "613ef1081ee5c40e796387b8" } ] }
- email:
Email adresi
- first_name:
Adı
- last_name:
Soyadı
- phone:
Telefon numarası
- status:
Emailin durumu. Parametrenin alabileceği değerler :
active,unsubscribed,soft_bounce,hard_bounce,spam_complaint- source_ip:
Kaydı gönderen IP adresi
- source:
Kayıt tipi
- user_id:
Kullanıcı id
- lists:
Aboneye bağlı liste veya listeler
- fields:
Aboneye özel alanları
POST email/subscribers/json
- POST email/subscribers/json
Asenkron olarak toplu abone kaydeder.
Veriler kuyruğa alınır ve arka planda işlenir.
Not
Bu servis sadece
Accept: application/jsonveriyi kabul eder.Gelen veri yapısı
listsvesubscribersanahtarlarını içermelidir.Example request:
POST v1/email/subscribers/json HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json { "lists": [ "613360a7f4f13a30fd4419d9", "6013ce49a6f33d3b1809da1d" ], "subscribers": [ { "email": "[email protected]", "first_name": "John", "last_name": "Doe", "status": "active", "update": false, "fields": [ { "value": "New G", "field": "613ef1081ee5c40e796387b8" } ] }, { "email": "[email protected]", "first_name": "Ahmet", "last_name": "Yilmaz", "status": "active", "update": false } ] }
- Form Parameters:
lists – required. Abone veya abonelerin ekleneceği liste ID’leri.
subscribers – required. Abone listesi.
email – required. Email adresi (subscribers içinde)
status – required. (subscribers içinde)
- Request Headers:
Authorization – required OAuth token to authenticate. Bkz: Kimlik Doğrulama ve Token Alma
- Status Codes:
202 Accepted – İşlem sıraya alındı
400 Bad Request – Hatalı istek formatı
Example response:
HTTP/1.1 202 Accepted Vary: Accept Content-Type: application/json { "id": 150, "status": "queued", "detail": "İşlem sıraya alındı." }
PATCH email/subscribers/(str:ObjectId)
- PATCH email/subscribers/(str: ObjectId)
Abone bilgilerini günceller.
Example request:
PATCH v1/email/subscribers/5fa6f6520ca622032cb90d8b HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json, application/x-www-form-urlencoded, multipart/form-data
- Parameters:
ObjectId (str) – Subscribers unique id
- Form Parameters:
first_name – Adı
last_name – Soyadı
phone – Telefon numarası
status – required. Parametrenin alabileceği değerler :
active,unsubscribed,soft_bounce,hard_bounce,spam_complaintlists – Bir abone bir veya birden fazla listeye dahil edilebilir.
fields – Aboneye özel alanlardır. Değerler field ve value eşleştirmesi yapılarak gönderilir.
- Request Headers:
Authorization – required OAuth token to authenticate. Bkz: Kimlik Doğrulama ve Token Alma
- Status Codes:
200 OK –
400 Bad Request – json object return
403 Forbidden – json object return
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "id": "5fa6f6520ca622032cb90d8b", "first_name": "John", "last_name": "Doe", "phone": "", "create_date": "2020-11-28T11:38:24.474705Z", "update_date": "2020-11-28T11:38:24.553445Z", "status": "active", "user_id": 1, "lists": [ "5fb0d22db8104d9af3a526be" ], "fields": [ { "value": "Bismarck State College", "field": "5fddfb903abcbbdfcc676696" }, { "value": "29", "field": "5fe226a45c93d3d479d9f151" } ] }
- email:
Email adresi
- first_name:
Adı
- last_name:
Soyadı
- phone:
Telefon numarası
- status:
Emailin durumu. Parametrenin alabileceği değerler :
active,unsubscribed,soft_bounce,hard_bounce,spam_complaint- source_ip:
Kaydı gönderen IP adresi
- source:
Kayıt tipi
- user_id:
Kullanıcı id
- lists:
Aboneye bağlı liste veya listeler
- fields:
Aboneye özel alanları
Not
Abone güncelleme işlemleri için POST email/subscribers servisini de kullanabilirsiniz. Ancak PATCH cok daha hızlıdır.
DELETE email/subscribers/(str:ObjectId)
- DELETE email/subscribers/(str: ObjectId)
Aboneyi siler.
Example request:
DELETE v1/email/subscribers/5fa6f6520ca622032cb90d8b HTTP/1.1 Host: app.postacell.com.tr/api/
- Parameters:
ObjectId (str) – Liste unique id
- 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 204 No Content
Özel Alanlar
Özel alanlar aboneler için extra alanlar tanımlamasını sağlar.
Örneğin abonelerin okullarını, doğum tarihlerini ve bir çok kişiselleştirilmiş alan burada oluşturulabilir.
GET email/fields
- GET email/fields
Kullanıcının özel alanlarını getirir.
Example request:
GET v1/email/fields HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json
- Parameters:
title – Özel alan adı
type (String) – Özel alanın tipi. Alabileceği değerler
text,number,datemerge_tag (String) – Otomatik oluşturulur.
- 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": "5fddb523d1dd03ee58307f85", "title": "Company", "type": "text", "merge_tag": "company" }, { "id": "5fddb75e67ee89d1695f1a86", "title": "School", "type": "text", "merge_tag": "school" } ]
GET email/fields/(str:ObjectId)
- GET email/list/(str: ObjectId)
ID’si gönderilen özel alanın bilgilerini getirir
Example request:
GET v1/email/fields/5fddb523d1dd03ee58307f85 HTTP/1.1 Host: app.postacell.com.tr/api/
- Parameters:
ObjectId (str) – Fields unique 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": "5fddb523d1dd03ee58307f85", "title": "Company", "type": "text", "merge_tag": "company" }
POST email/fields
- POST email/fields
Özel alan kaydeder.
Example request:
POST v1/email/fields HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json, application/x-www-form-urlencoded, multipart/form-data
- Form Parameters:
title – required
type – required. Alabileceği değerler
text,number,date
- Parameters:
merge_tag (String) – Otomatik oluşturulur.
- 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 201 Created Vary: Accept Content-Type: application/json { "id": "5fddc1ad6c7644c40040d9e4", "title": "Company", "type": "text", "merge_tag": "company" }
PATCH email/fields/(str:ObjectId)
- PATCH email/fields/(str: ObjectId)
Özel alan başlığını günceller.
Example request:
PATCH v1/email/fields/5fddc1ad6c7644c40040d9e4 HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json, application/x-www-form-urlencoded, multipart/form-data
- Parameters:
ObjectId (str) – Fields unique id
- Form Parameters:
title – required
- 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": "5fddc1ad6c7644c40040d9e4", "title": "Big Company", }
- Parameters:
ObjectId (str) – Fields unique id
- Form Parameters:
title – required
- Request Headers:
Authorization – required OAuth token to authenticate. Bkz: Kimlik Doğrulama ve Token Alma
- Status Codes:
200 OK – no error
403 Forbidden – return json obj
Not
Sadece title alanı güncellenebilir.
DELETE email/fields/(str:ObjectId)
- DELETE email/fields/(str: ObjectId)
Özel alanı siler.
Example request:
DELETE v1/email/fields/5fddc1ad6c7644c40040d9e4 HTTP/1.1 Host: app.postacell.com.tr/api/
- Parameters:
ObjectId (str) – Fields unique id
- Request Headers:
Authorization – required OAuth token to authenticate. Bkz: Kimlik Doğrulama ve Token Alma
- Status Codes:
403 Forbidden – json object return
Example response:
HTTP/1.1 204 No Content
Not
Bir özel alanı sildiğinizde, bağlı olduğu her yerden silinir.
Segment
Aboneler için detaylı filtreler oluşturur.
GET email/segment
- GET email/segment
Kullanıcının segment lerini getirir.
Example request:
GET v1/email/segment HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json
- Parameters:
title – Segment adı
matching – Arama nasıl yapılacak, or|and
lists – Hangi listelerde arama yapılacak. Buradaki ObjectId detaylarına GET email/list/(str:ObjectId) uç noktasından ulaşabilirsiniz.
segments –
rolearama biçimi,valuearanacak değer,custom_fieldAboneye ait sabit yada özel alan. Buradaki ObjectId detayına GET email/fields/(str:ObjectId) uç noktasından ulaşabilirsiniz.
- 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": "60110b6d90a31bfe4d082e5c", "title": "get domain", "matching": "or", "lists": [], "segments": [ { "field": null, "role": "ends_with", "value": ".de", "custom_field": "6006ac8171a4d90b9ed1ee8c" }, { "field": null, "role": "contains", "value": "tw", "custom_field": "6006ac8171a4d90b9ed1ee8c" }, { "field": null, "role": "contains", "value": ".ch", "custom_field": "6006ac8171a4d90b9ed1ee8c" } ], "create_date": "2021-01-27T06:42:53.129000Z" }, { "id": "60103cf0f57d0a30ca3048bc", "title": "get hotmail", "matching": "or", "lists": [], "segments": [ { "field": null, "role": "contains", "value": "hotmail", "custom_field": "6006ac8171a4d90b9ed1ee8c" } ], "create_date": "2021-01-26T16:01:52.742000Z" } ]
Not
email, first_name, last_name, phone alanları tüm kullanıcılar sabit olduğundan bunlara ait ObjectId ler de sabittir. Bu ObjectId ler sabittir ve değişmemektedir.
email = 6006ac8171a4d90b9ed1ee8c
first_name = 6006acc071a4d90b9ed1f2b9
last_name = 6006acc371a4d90b9ed1f2d3
phone = 6006acc671a4d90b9ed1f2fc
GET email/segment/(str:ObjectId)
- GET email/segment/(str: ObjectId)
Segment detay bilgisini getirir.
Example request:
GET v1/email/segment/60110b6d90a31bfe4d082e5c HTTP/1.1 Host: app.postacell.com.tr/api/
- Parameters:
title – Segment adı
matching – Arama nasıl yapılacak, or|and
lists – Hangi listelerde arama yapılacak. Buradaki ObjectId detaylarına GET email/list/(str:ObjectId) uç noktasından ulaşabilirsiniz.
segments –
rolearama biçimi,valuearanacak değer,custom_fieldAboneye ait sabit yada özel alan. Buradaki ObjectId detayına GET email/fields/(str:ObjectId) uç noktasından ulaşabilirsiniz.
- 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": "60110b6d90a31bfe4d082e5c", "title": "get domain", "matching": "or", "lists": [], "segments": [ { "field": null, "role": "ends_with", "value": ".de", "custom_field": "6006ac8171a4d90b9ed1ee8c" }, { "field": null, "role": "contains", "value": "tw", "custom_field": "6006ac8171a4d90b9ed1ee8c" }, { "field": null, "role": "contains", "value": ".ch", "custom_field": "6006ac8171a4d90b9ed1ee8c" } ], "create_date": "2021-01-27T06:42:53.129000Z" }
Bkz : GET email/segment uç noktasındaki not’a bakınız.
POST email/segment
- POST email/segment
Segment kaydeder.
Not
Bu servis sadece
Accept: application/jsonveriyi kabul eder.Example request:
POST v1/email/segment HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json
- Form Parameters:
title – required
matching – Alabileceği değerler
or,andlists – Birden fazla değer gönderilebilir. Değerler liste içinde gönderilmelidir. Örnek için bu endpoint sonundaki not’a bakınız.
segments – Birden fazla değer gönderilebilir. Değerler json içinde gönderilmelidir. Örnek için bu endpoint sonundaki not’a bakınız.
- Parameters:
field – Bu versiyonda bir etkisi yoktur.
nullgelir.create_date – Otomatik oluşturulur.
update_date – Otomatik oluşturulur.
- 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 201 Created Vary: Accept Content-Type: application/json { "id": "601158fbb1076b844eaa6146", "lists": [ "5ff00a759dfa6b567e436885", "600d5efbc572db1443208c2f" ], "title": "get country domain", "matching": "or", "create_date": "2021-01-27T12:13:47.958874Z", "update_date": "2021-01-27T12:13:47.958858Z", "segments": [ { "field": null, "role": "ends_with", "value": ".de", "custom_field": "6006ac8171a4d90b9ed1ee8c" }, { "field": null, "role": "contains", "value": "tw", "custom_field": "6006ac8171a4d90b9ed1ee8c" }, { "field": null, "role": "contains", "value": ".ch", "custom_field": "6006ac8171a4d90b9ed1ee8c" } ] }
Not
lists için örnek.
[
"5fa29d757af8092595bcbabe",
"5fa29d8f7af8092595bcbb28"
]
Listelere ait ObjectId değerlerine GET email/list-filter uç noktasından ulaşabilirsiniz.
segments için örnek
[
{
"role": "ends_with",
"value": ".de",
"custom_field": "6006ac8171a4d90b9ed1ee8c"
},
{
"role": "contains",
"value": "tw",
"custom_field": "6006ac8171a4d90b9ed1ee8c"
}
]
custom_field’e ait ObjectId değerlerine GET email/fields uç noktasından ulaşabilirsiniz.
role alanının alabileceği değerler şunlardır : is, is_not, contains, does_not_contain, starts_with, ends_with
is = Eşittir
is_not = Eşit Değil
contains = İçerir
does_not_contain = İçermiyor
starts_with = İle başlar
ends_with = İle biter
Tüyo
Örnek BODY Row
{
"title": "Yeni kayıt",
"matching": "or",
"lists": ["61a5bc347cbcc095471e598c", "61a4d2381961b82760ac456b"],
"segments": [
{
"role": "starts_with",
"value": ".de",
"custom_field": "6006ac8171a4d90b9ed1ee8c"
},
{
"role": "contains",
"value": "tw",
"custom_field": "6006ac8171a4d90b9ed1ee8c"
},
{
"role": "contains",
"value": ".ch",
"custom_field": "6006ac8171a4d90b9ed1ee8c"
}
]
}
PATCH email/segment/(str:ObjectId)
- PATCH email/segment/(str: ObjectId)
Segment günceller.
Not
Bu servis sadece
Accept: application/jsonveriyi kabul eder.Example request:
PATCH v1/email/segment/60110b6d90a31bfe4d082e5c HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json
- Form Parameters:
title – required
matching – Alabileceği değerler
or,andlists – Birden fazla değer gönderilebilir. Değerler liste içinde gönderilmelidir. Örnek için bu endpoint sonundaki not’a bakınız.
segments – Birden fazla değer gönderilebilir. Değerler json içinde gönderilmelidir. Örnek için bu endpoint sonundaki not’a bakınız.
- Parameters:
field – Bu versiyonda bir etkisi yoktur.
nullgelir.create_date – Otomatik oluşturulur.
update_date – Otomatik oluşturulur.
- 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 200 OK Vary: Accept Content-Type: application/json { "id": "60110b6d90a31bfe4d082e5c", "lists": [ "5ff00a759dfa6b567e436885", "600d5efbc572db1443208c2f" ], "title": "get country domain change", "matching": "or", "create_date": "2021-01-27T12:13:47.958874Z", "update_date": "2021-01-27T12:13:47.958858Z", "segments": [ { "field": null, "role": "ends_with", "value": ".de", "custom_field": "6006ac8171a4d90b9ed1ee8c" } ] }
Not
POST email/segment ‘daki nota bakınız
DELETE email/segment/(str:ObjectId)
- DELETE email/segment/(str: ObjectId)
Segment siler.
Example request:
DELETE v1/email/segment/60110b6d90a31bfe4d082e5c HTTP/1.1 Host: app.postacell.com.tr/api/
- Parameters:
ObjectId (str) – Segment unique id
- Request Headers:
Authorization – required OAuth token to authenticate. Bkz: Kimlik Doğrulama ve Token Alma
- Status Codes:
403 Forbidden – json object return
Example response:
HTTP/1.1 204 No Content
Not
Bir segmenti sildiğinizde içindeki aboneler silinmez
GET email/counter/segment/(str:ObjectId)
- GET email/counter/segment/(str: ObjectId)
ObjectId si gönderilen segmentin içinde kaç abone olduğunu gösterir.
Example request:
GET v1/email/counter/segment/600c503666f43efadd4235b4 HTTP/1.1 Host: app.postacell.com.tr/api/
- Parameters:
counter – Segmentin içindeki abone sayısı
- Request Headers:
Authorization – required OAuth token to authenticate. Bkz: Kimlik Doğrulama ve Token Alma
- Status Codes:
200 OK –
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "counter": 172555 }
Email Yönetimi
Kullanıcının email gönderim (kampanya, transactional email vb) ile ilgili tüm servisler buradadır.
Kampanya Gönderimi
Kullanıcının kampanya oluşturmasını, kampanyanın gönderilmesini ve sonrasında raporlanmasını sağlayan servisler.
GET email/cmp-filter
- GET email/cmp-filter
Kampanyaları listeler.
Example request:
GET v1/email/cmp-filter HTTP/1.1 Host: app.postacell.com.tr/api/
- Query Parameters:
ordering – Birini kullanın
title,create_date. A dan ZsubjectZ den A-subjectpage – Sayfa numarası. default 1
- 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 { "count": 30, "next": "http://domain/api/v1/email/cmp-filter?ordering=-created_date&page=2", "previous": null, "results": [ { "id": "614155c665f14d9fa8c97bc8", "subject": "Sign Up For Emails and Save 10%", "from_name": "Shoe Seller", "from_email": "[email protected]", "updated_date": "2021-09-15T02:32:35.052000Z", "created_date": "2021-09-15T02:09:10.511000Z", "status": "draft", }, { "id": "614155be65f14d9fa8c97bc7", "subject": "Shop The Best Sellers", "from_name": "Shoe Seller", "from_email": "[email protected]", "updated_date": "2021-09-15T02:09:01.285000Z", "created_date": "2021-09-15T02:09:01.285000Z", "status": "send", } ] }
- subject:
Kampanya başlığı
- from_name:
Gönderen adı
- from_email:
Gönderen email
- status:
Kampanyanın durumu. Parametrenin alabileceği değerler :
draft: Taslak,prepare: Hazırlanıyor,send: Gönderildi,scheduled: Planlanmış,sending: Gönderiliyor, ,pause: Durdurulmuş.
POST email/cmp
Kampanya gönderir.
- POST email/cmp
Kampanya gönderir.
Not
Bu servis sadece
Accept: application/jsonveriyi kabul eder.Example request:
POST v1/email/cmp HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json
- Form Parameters:
subject – required Kampanya başlığı
from_email – required. Gönderen email
from_name – required. Gönderen adı
reply_to – Yanıt adresi
lists – Liste. Liste veya segment den en az birinin gönderilmesi gerekir.
listeolarak bir den fazla liste gönderilebilir. Listelere ulaşabileceğiniz servis. Bkz: Liste Servislerisegments – Segment. Liste veya segment den en az birinin gönderilmesi gerekir.
stringolarak bir segment gönderilebilir. Segmentlere ulaşabileceğiniz servis. Bkz: Segmenthtml – required. Kampanyanın gövdesi.
htmlveyatextgönderebilirsiniz.send_later –
trueveyafalse. Defaultfalse. Zamanlanmış kampanya göndermek içintrueyapın.send_date – Zamanlanmış kampanyanın gönderilme zamanı. Datetime biçimi.
YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HH:MM|-HH:MM|Z]. Örn : 2021-06-30T10:00:00timezone – Zamanlanmış kampanyanın gönderileceği yerel saat. Geçerli timezone listesi için Bkz: GET timezone
- 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 201 Created Vary: Accept Content-Type: application/json { "subject": "Hello World", "from_name": "Atak SMS", "from_email": "[email protected]", "lists": [ "614873847712f82190c4a613" ], "segments": null, "reply_to": "[email protected]", "html": "<!DOCTYPE html><html><body><h2>HTML Links</h2><p>HTML links are defined with the a tag:</p><a href=\"https://www.w3schools.com\">This is a link</a></body></html>", "send_later": false, "send_date": null, "timezone": null }
GET email/cmp/get-identity-email
- GET email/cmp/get-identity-email
Email gönderilebilecek veriy işleminden geçmiş eposta adresleri.
Example request:
GET v1/email/cmp/get-identity-email HTTP/1.1 Host: app.postacell.com.tr/api/
- 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 { "email": [ "[email protected]", "[email protected]" ], "vendor": 2 }
- email:
Geçerli email adresleri
- vendor:
Email gönderim sağlayıcı
GET timezone
- GET timezone
Zaman dilimlerini listeler
Example request:
GET v1/timezone HTTP/1.1 Host: app.postacell.com.tr/api/
- 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 { "detail": [ "......." "Europe/Dublin", "Europe/Gibraltar", "Europe/Guernsey", "Europe/Helsinki", "Europe/Isle_of_Man", "Europe/Istanbul", "Europe/Jersey", "......." ] }
POST email/report/export
Rapor backend tarafında oluşturulur ve rapor tamamlandığında hesap sahibine email gönderilir. Bu işlem sırası ve rapor büyüklüğüne göre zaman alabilir.
Oluşturulan raporlar GET email/reports-export-filter servisinden kontrol edilebilir.
- POST email/report/export
Kampanya için rapor oluşturur
Example request:
POST v1/email/report/export HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json, application/x-www-form-urlencoded, multipart/form-data
- Form Parameters:
id – required. Kampanya ObjectId
rule – required. Parametreler.
openedAçılan,clickedTıklanan,subscribersKampanya gönderilen aboneler,bouncedHard ve Soft Bounce,unsubscribedAbonelikten çıkanlar,complaintŞikayetler
- 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 { "detail": { "id": "61474759d2e44cfb0af76644", "user_id": 13, "rule": "subscribers" } }
- user_id:
Müşteri ID
- id:
Kampanya ObjectId
- rule:
Talep edilen rapor kuralı
GET email/reports-export-filter
- GET email/reports-export-filter
Kampanya için oluşturulmuş raporların listesini getirir
Example request:
GET v1/email/reports-export-filter?cmp_id=616e5f79459fbb324f8a4122&ordering=-create_date&page=1 HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json
- Query Parameters:
cmp_id – Kampanyanın ObjectId si
ordering –
create_dateyada-create_datepage – Sayfa numarası. default 1
- 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 { "count": 6, "next": null, "previous": null, "results": [ { "cmp_id": "616e5f79459fbb324f8a4122", "file": "https://pstcll.s3.amazonaws.com/media/public/user/13/export/616e5f79459fbb324f8a4122/742421083.csv", "rule": "complaint", "create_date": "2022-06-15T08:07:37.901940Z" }, { "cmp_id": "616e5f79459fbb324f8a4122", "file": "https://pstcll.s3.amazonaws.com/media/public/user/13/export/616e5f79459fbb324f8a4122/62238C08D.csv", "rule": "unsubscribed", "create_date": "2022-06-15T08:07:34.439869Z" }, { "cmp_id": "616e5f79459fbb324f8a4122", "file": "https://pstcll.s3.amazonaws.com/media/public/user/13/export/616e5f79459fbb324f8a4122/832C198FD5.csv", "rule": "bounced", "create_date": "2022-06-15T08:07:30.725162Z" }, { "cmp_id": "616e5f79459fbb324f8a4122", "file": "https://pstcll.s3.amazonaws.com/media/public/user/13/export/616e5f79459fbb324f8a4122/8DB1C983DF.csv", "rule": "subscribers", "create_date": "2022-06-15T08:07:29.804449Z" }, { "cmp_id": "616e5f79459fbb324f8a4122", "file": "https://pstcll.s3.amazonaws.com/media/public/user/13/export/616e5f79459fbb324f8a4122/9B19D98CE.csv", "rule": "clicked", "create_date": "2022-06-15T08:07:25.151234Z" }, { "cmp_id": "616e5f79459fbb324f8a4122", "file": "https://pstcll.s3.amazonaws.com/media/public/user/13/export/616e5f79459fbb324f8a4122/A9C409A72.csv", "rule": "opened", "create_date": "2022-06-15T08:02:13.357054Z" } ] }
- count:
Toplam data sayısı
- next:
Sonraki sayfanın linki
- previous:
Önceki sayfanın linki
- cmp_id:
Kampanya ObjectId
- file:
İndirilecek dosyanın linki
- rule:
openedAçılan,clickedTıklanan,subscribersKampanya gönderilen aboneler,bouncedHard ve Soft Bounce,unsubscribedAbonelikten çıkanlar,complaintŞikayetler
Transactional Email
İşlemsel e-posta (transactional email) gönderilir.
POST email/transactional/send
- POST email/transactional/send
Transactional email gönderir.
Example request:
POST v1/email/transactional/send HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json, application/x-www-form-urlencoded, multipart/form-data
- Form Parameters:
subject – Type = string required Email’in konusu.
from_name – Type = string required Email’i gönderen kişi/kurum vb.
from_email – Type = string required Email’i gönderen email adresi.
to_email – Type = array required Kime To
to_cc – Type = array Bilgi. Cc
to_bcc – Type = array Gizli. Bcc
reply_to – Type = string Email geri bildirim adresi. Reply to
text – Type = string Text içerik
html – Type = string required HTML içerik
attachments – Type = array Dosya. Bu alanın açıklamaları aşağıya eklenmiştir.
- 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": "61cec16027ffa71c2b61c115" }
attachments Type = array Emaile dosya ekler.
- name:
Type = string required Dosya adı. Dosya uzantısı mutlaka yazılmalıdır. Örn : extre.doc
- content:
Type = string required Base64 ile kodlanmış dosya içeriği.
Aşağıdaki örnekte iki adet dosya emaile eklenmiştir.
"attachments" : [ { "name" : "bu bir pdf dosyasıdır.pdf", "content" : "JVBERi0xLjMKJcTl8uXrp/Og0MTGCjMgMCBvYmoKPDwgL... etc" }, { "name" : "ms_world_dosyası.docx", "content" : "UEsDBBQABgAIAAAAIQDfpNJsWgEAACAFAAATAAgCW0N... etc" } ]
GET email/transactional/send/(str:ObjectId)
- GET email/transactional/send/(str: ObjectId)
Gönderilen Transactional email detaylarını getirir.
Example request:
GET v1/email/transactional/send/61cef4df29f12eb62510ca23 HTTP/1.1 Host: app.postacell.com.tr/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": "Atak SMS", "from_email": "[email protected]", "reply_to": "[email protected]", "to_email": [ "[email protected]", "[email protected]" ], "to_cc": [ "[email protected]" ], "to_bcc": [ "[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>", "text": "Hello world", "attachments_s3": [ { "name": "mars.jpg", "url": "https://pstcll.s3.amazonaws.com/media/private/email_attachments/13/2022/45/95d9_mars.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA4PIQJXZ6DKWXITOJ%2F20221108%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221108T115733Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=5888345c7da9b3b920d73a8af3970e9b6ff213e2a284f8c90d58d675d8387eb9", "size": 1737558 }, { "name": "sertifika.pdf", "url": "https://pstcll.s3.amazonaws.com/media/private/email_attachments/13/2022/45/5cc2_sertifika.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA4PIQJXZ6DKWXITOJ%2F20221108%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20221108T115733Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=321119ed81c0a4cb2e08fc971b2845127399a7fcdc4d8c58203af4ed20ecf7e1", "size": 194933 }, ], "source_ip": "172.23.0.1", "result": "send", "hard" : false, "ses_return": { "data": { "message_id": "c7458a41778f3f074c9462018bb962db" }, "message": "OK", "status": "success" }, "created_date": "2021-12-31T08:37:40.791000Z", "updated_date": "2021-12-31T08:37:40.791000Z" }
- source_ip:
Gönderen IP adresi
- attachments_s3:
Dosya gönderildiyse dolu olarak gelir. Array içinde 3 değer vardır.
name: Dosya ismi,url: Dosyanın download adresi.size: Dosya boyutu (Byte).- result:
waiting: Bekliyor ,send: Gönderildi,reject: Red edildi- hard:
Default :
false. Hard Bounce’a düşmüş emailtrueile gösterilir.- ses_return:
json data içerir.
result=sendveresult=rejectdurumlarında dolu gelir.- created_date:
Oluşturma tarihi
- updated_date:
Son işlem tarihi
Not
Dosyalar emaile ek olarak gönderilir. Ancak depolanmaları Amazon S3 üzerinde private alanda bulunmaktadır. url de görünen linkin bir saat geçerliliği vardır. Uç nokta her çalıştığında link de değişmektedir.
GET email/transactional
- GET email/transactional
İki tarih aralığında gönderilen transactional emailleri listeler
Example request:
GET v1/email/transactional?ordering=-created_date&created_date=2021-12-19,2022-01-18 HTTP/1.1 Host: app.postacell.com.tr/api/ Accept: application/json
- Query Parameters:
ordering – Eskiden yeniye
created_dateYeniden eskiye-created_datecreated_date – İlk tarih,son tarih (Örn. 2021-12-19,2022-01-18)
page – Sayfa numarası. default 1
- 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 { "count": 65512, "total_pages": 1230, "page" : 1 "results": [ { "id": "61e67c29f0e1998bbcd6525f", "subject": "Merhaba Dünya", "from_email": "Atak SMS", "result": "send", "created_date": "2022-01-18T08:36:57.719000Z", "updated_date": "2022-01-18T08:36:58.068000Z" }, { "id": "61e674c1f0e1998bbcd6525e", "subject": "Merhaba dünya nasılsın dünya selam sana dünya uzun başlık selam sana", "from_email": "Atak SMS", "result": "reject", "created_date": "2022-01-18T08:05:21.271000Z", "updated_date": "2022-01-18T08:05:21.271000Z" } ] }
- count:
Toplam data sayısı
- total_pages:
Toplam sayfa sayısı (1 sayfa’da 50 kayıt vardır)
- page:
Listelenen sayfa
- subject:
Email’in konusu
- from_email:
Email’i gönderen email adresi.
- result:
waiting: Bekliyor ,send: Gönderildi,reject: Red edildi- 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: app.postacell.com.tr/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 =
clickedolması durumunda dolu gelir. Email içinde bulunan ve tıklama gerçekleştirilen linkin URL’sidir.- hard:
ses_status =
bouncedolması durumunda dolu gelir. False ve True iki değer alır.false: Soft Bounce,trueHard Bounce- bounce_type:
ses_status =
bouncedolması durumunda dolu gelir.SOFTBOUNCEveHARDBOUNCEdeğerlerini alır.- diagnostic_code:
ses_status =
bouncedolması 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 Hard Bonuce oranını getirir.
Example request:
GET v1/email/transactional/bounce HTTP/1.1 Host: app.postacell.com.tr/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_email" : 83, "total_email" : 37502, "today": "2022-01-20T08:02:41.901891", "before_date": "2022-01-13T08:02:41.901891" }
- bonunce_email:
Hard Bounce sayısıdır.
- total_email:
Toplam gönderilen email sayısı.
- today:
Şimdiki zaman
- before_date:
7 gün önceki zaman
Not
Tarihler UTC’dir.