LianaMailer REST API

Reports

Server

Who received, opened and clicked sent deliveries, how the links performed, and tell-a-friend data. For paged lists of the openers and clickers of a delivery, see the v3 Delivery reports.


Get delivery report

POST
https://rest.lianamailer.com/api
/v1/getDeliveryReport

Returns the counts and details of one delivery, such as contacts, delivered and bounced messages, unsubscriptions, SMS counts, its mailing list, and the archive and RSS feeds where it is shown. Returns an error if the delivery does not exist or is not yours. For the sending progress of several deliveries, use getDeliveryStatuses.

Get delivery report › Request Body

id
​DeliveryId · required

Delivery ID.

Example: 10

Get delivery report › Responses

OK

succeed
​boolean

Response status.

Example: true
​DeliveryReport

Get delivery openers or non-openers

POST
https://rest.lianamailer.com/api
/v1/getTrackingOpenInfo

Returns the contacts who opened a delivery, with their open time and number of opens. With opened set to 0, returns the contacts who did not open it, with the contact ID and email address only. A delivery that does not exist or is not yours returns an empty array. For paged lists with contact properties, use the v3 deliveries/{delivery_id}/openers endpoint.

Get delivery openers or non-openers › Request Body

id
​DeliveryId · required

Delivery ID.

Example: 10
opened
​GetOpenersOrNon

Return openers (1) or non-openers (0). Defaults to 1.

Example: 0

Get delivery openers or non-openers › Responses

OK

succeed
​boolean

Response status.

Example: true
​OpenerData[]

Array of delivery openers.


POST
https://rest.lianamailer.com/api
/v1/getLinkData

Returns the tracked links in the mail of a delivery with their click and clicker counts. getMailLinkData returns the same data by mail ID. To see who clicked a link, pass its link_id to getTrackingLinkInfo.

Get delivery links › Request Body

id
​DeliveryId · required

Delivery ID.

Example: 10

Get delivery links › Responses

OK

succeed
​boolean

Response status.

Example: true
​object[]

POST
https://rest.lianamailer.com/api
/v1/getTrackingLinkInfo

Returns the contacts who clicked a link, with their first click time and number of clicks. With summary set to 1, returns the clickers by the hour of their first click instead. To find link IDs, use getLinkData. For paged lists of the clickers of a whole delivery, use the v3 deliveries/{delivery_id}/clickers endpoint.

id
​LinkId · required

Link ID.

Example: 600
summary
​LinkSummary

Return an hourly click summary (1) instead of individual clicks (0). Defaults to 0.

Example: 0

OK

succeed
​boolean

Response status.

Example: true
​array

Array of link clickers, or with summary set to 1, the clicks by hour.


Get clicks since time

POST
https://rest.lianamailer.com/api
/v1/getClickers

Returns link clicks made by your active contacts after the from time, in all mailings, with the contact's email address, SMS number and properties.

Returns 100 clicks per call. When next_offset is not null, call again with it as offset to get the next page. For the clickers of one delivery, use the v3 deliveries/{delivery_id}/clickers endpoint.

Get clicks since time › Request Body

from
​FromDate · required

Start date and time as YYYY-MM-DD HH:MM:SS. getUnsubscriptions accepts only YYYY-MM-DD.

Example: 2019-12-20 14:00:00
offset
​Offset

Number of results to skip.

Example: 100

Get clicks since time › Responses

OK

succeed
​boolean

Response status.

Example: true
​object

Get delivery contacts as CSV

POST
https://rest.lianamailer.com/api
/v1/getDeliveryMembersConditional

Returns the contacts of a delivery that match condition as CSV text separated by semicolons. The rows have the email address and SMS number of each contact and a column for each contact property. For rows without properties, use getDeliveryMembersConditionalLess, and for event dates, getDeliveryMembersOverTime. For paged lists of openers and clickers, use the v3 deliveries/{delivery_id}/openers and deliveries/{delivery_id}/clickers endpoints.

Get delivery contacts as CSV › Request Body

id
​DeliveryId · required

Delivery ID.

Example: 10
condition
​DeliveryMemberCondition · enum

Contact group to return. Omitted or unsupported values return all delivery contacts.

Enum values:
openers
smsreceived
noopeners
clickers
bounced
unsubscribed
delivered
undelivered
Example: clickers
translations
​DeliveryMemberTranslation

Custom CSV column headers, mapping default header names to new ones.

Example: {"sms":"phone_number"}
extra
​integer

Link ID for the clickers condition, to return only the clickers of that link.

Example: 12

Get delivery contacts as CSV › Responses

OK

succeed
​boolean

Response status.

Example: true
result
​DeliveryMembersCsv

Delivery contacts in CSV format.

Example: "email";"sms";"format";"extra";"prop"

Get delivery contacts without properties

POST
https://rest.lianamailer.com/api
/v1/getDeliveryMembersConditionalLess

Returns the contacts of a delivery that match condition as an array of rows, without contact properties. The first row has the column names, which depend on the condition. Most rows identify the contact by ID only. For email addresses and properties, use getDeliveryMembersConditional.

Get delivery contacts without properties › Request Body

id
​DeliveryId · required

Delivery ID.

Example: 10
condition
​DeliveryMemberCondition · enum

Contact group to return. Omitted or unsupported values return all delivery contacts.

Enum values:
openers
smsreceived
noopeners
clickers
bounced
unsubscribed
delivered
undelivered
Example: clickers

For the clickers and taflinkclickers conditions, link ID to return clickers of one link only. Accepts a string or an integer.

Example: 12

Get delivery contacts without properties › Responses

OK

succeed
​boolean

Response status.

Example: true
result
​array

Returns an array of arrays. The first contains header fields and the rest contain contact information.

Example: [["member","format","extra"],[20001,1,null],[20002,1,"member forget"]]

Get delivery contacts with dates as CSV

POST
https://rest.lianamailer.com/api
/v1/getDeliveryMembersOverTime

Returns the contacts of a delivery that match condition as CSV text separated by semicolons, with a date for each row, such as the open time or the latest click time. The columns are always email, sms, date, format, extra1 and extra2, without contact properties. Only the clickers, openers, noopeners, delivered, success, bounced and bad conditions are supported. Other values return all contacts of the delivery.

Get delivery contacts with dates as CSV › Request Body

id
​DeliveryId · required

Delivery ID.

Example: 10
condition
​DeliveryMemberCondition · enum

Contact group to return. Omitted or unsupported values return all delivery contacts.

Enum values:
openers
smsreceived
noopeners
clickers
bounced
unsubscribed
delivered
undelivered
Example: clickers

For the clickers condition, comma-separated link IDs to return clickers of those links only.

Example: 104,106

Get delivery contacts with dates as CSV › Responses

OK

succeed
​boolean

Response status.

Example: true

Delivery contacts in CSV format.

Example: "email";"sms";"date";"format";"extra1";"extra2"

Get mail opens

POST
https://rest.lianamailer.com/api
/v1/getMailOpenTrackingData

Returns the open data of a mail, with the open time, browser and location details, and the contact ID and email address. With from, only opens after that time are returned, so you can fetch new opens since your last request. For the openers of a delivery with open counts, use getTrackingOpenInfo, and for opens in all deliveries, the v3 events endpoint.

Get mail opens › Request Body

id
​MailId · required

Mail ID.

Example: 20
from
​FromDate

Start date and time as YYYY-MM-DD HH:MM:SS. getUnsubscriptions accepts only YYYY-MM-DD.

Example: 2019-12-20 14:00:00

Get mail opens › Responses

OK

succeed
​boolean

Response status.

Example: true
​MailOpenObject[]

POST
https://rest.lianamailer.com/api
/v1/getMailLinkTrackingData

Returns the link click data of a mail as CSV text separated by semicolons, with the click time, browser and location details, and the contact ID and email address. With from, only clicks after that time are returned, so you can fetch new clicks since your last request. Returns an empty string if there are no clicks. For clickers with click counts, use getTrackingLinkInfo, and for clicks in all deliveries, the v3 events endpoint.

id
​MailId · required

Mail ID.

Example: 20
from
​FromDate

Start date and time as YYYY-MM-DD HH:MM:SS. getUnsubscriptions accepts only YYYY-MM-DD.

Example: 2019-12-20 14:00:00

OK

succeed
​boolean

Response status.

Example: true
result
​string

Mail link tracking data in CSV format.

Example: link_id;clicked_at;useragent;acceptlanguage;remote_addr;hostname;continent_code;org_name;country_code;country_code3;country_name;region;city;postal_code;latitude;longitude;dma_code;area_code;member_id;member_email

Get tell-a-friend data

POST
https://rest.lianamailer.com/api
/v1/getTellafriendData

Returns the tell-a-friend totals, clicks and messages sent to friends of a delivery.

Get tell-a-friend data › Request Body

delivery_id
​DeliveryId · required

Delivery ID.

Example: 10

Get tell-a-friend data › Responses

OK

succeed
​boolean

Response status.

Example: true
​array · minItems: 3 · maxItems: 3

Tell-a-friend data as an array of three items, in this order:

  1. The totals of the delivery, as an object.
  2. The clicks, newest first, as an array of objects.
  3. The messages sent to friends, newest first, as an array of objects.

false if the delivery has no tell-a-friend data or is not yours.

Example: [{"delivery_id":10,"sent":3,"sent_by_member":2,"sent_by_member_recipient":1,"subscriptions":1,"clicks":3,"clickers":2},[{"delivery_id":10,"member":20000,"sender_email":"sender@example.com","clicked_at":"2020-01-13 08:50:29.723545","clicked_time":3,"useragent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36","acceptlanguage":"en-US,en;q=0.9,fi;q=0.8","browser":"chrome","os":"nt","os_version":"10","remote_addr":"127.0.0.1","hostname":"string","continent_code":"string","org_name":"string","country_code":"string","country_code3":"string","country_name":"string","region":"string","city":"string","postal_code":"string","latitude":"string","longitude":"string","dma_code":"string","area_code":"string","referer":"string"}],[{"id":5004,"delivery_id":10,"member":1002,"sent_at":"2020-01-13 08:55:40.111231","sender_email":"telling-a-friend@example.com","sender_name":"Example Name","sender_remote_addr":"127.0.0.1","subject":"Example subject.","body":"Thought this might be of interest to you.","useragent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36","acceptlanguage":"en-US,en;q=0.9,fi;q=0.8","browser":"chrome","browser_version":"80.0.3987.122","os":"nt","os_version":"10","remote_addr":"127.0.0.1","hostname":"string","continent_code":"string","org_name":"string","country_code":"string","country_code3":"string","country_name":"string","region":"string","city":"string","postal_code":"string","latitude":"string","longitude":"string","dma_code":"string","area_code":"string","referer":"string"}]]