Email data exchange via Traffic

General system information


Depending on the agreement between you and NESS, your account can have either a monthly quota for sending e-mails (post-payment agreements) or an e-mail volume limit (pre-payment agreements) depending on the volume paid. The monthly quota volume is set by mutual agreement and is intended primarily for safety reasons, in order to prevent situations when in the result of accidental (or intentional) operations an excessive amount of e-mails is being sent.


API information


All data should be given in HTTP POST requests. Basic address to which the data is

sent, is https://traffic.sales.lv/API:1.0/, but depending on the required action, a command name is being added to the address. Full address is written also in every command description.


Sending e-mails


Address to which the request should be sent:

' https://traffic.sales.lv/API:1.0/Email/Send/


Parameters:


  • APIKey (string): API key allocated to you
  • From (string): sender’s address code (it is created when you add a new sender’s address in our system). This code is being used to avoid necessity to specify separately the sender’s name and address as well as to facilitate accounting of the sent letters.
  • To (string/JSON array): either one recipient’s address (string) or a massive with many addresses in JSON format. It is recommended to send up to 1000 addresses in one request.
  • Subject (string): Subject text
  • Content (JSON object): JSON object with two parameters:
  • HTML (string): HTML version content
  • Plain (string): Text version content


If any of content versions is not specified, it will be created automatically, for example, if HTML version is not being sent (parameter Content -> HTML), it will be automatically created from the text version, and vice versa.


To insert an unsubscription link into e-mail content which would be automatically processed by our system, it should be indicated as follows: “[unsubscribe]” (without quotation marks). It will be replaced by a link which is unique for every recipient, and which will add the recipient’s name to the list of unsubscribed users, and these users would not be able to send letters from our system anymore. In case of a random error, it will be possible to remove them from this list.


In reply text a shipment identifier will be handed out - this applies to the whole e-mail sending system together. For example, if you send an e-mail with 50 recipients in one API call, you will receive one number which will identify e-mail sending to all 50 addresses together but in every next call the shipment identifier will be changed.


Reports on the opening of an e-mail, clicks, etc.


At the moment when a sent e-mail letter has been opened, a user has clicked on one of the links in the letter, a user has refused to continue receiving e-mails or if a letter is returned back, these events are being processed in our system and, if needed, it is possible to forward them to your system.

For this purpose, we should get information from you about the address, to which the data is to be sent (data are being sent in HTTP request form, so the address should be in HTTP or HTTPS format), and, if there are any restrictions from your side on receiving data from any specified IP addresses, please visit our IP addresses for more detail.


Reports to the address specified by you are sent as HTTP POST requests with the following parameters:


  • Address (string): E-mail address to which that information relates.
  • Batch (int): E-mail sending identifier which is returned back after sending e-mails to us. (see the previous sections).
  • Event (string): what event this notification does concern - possible options:
  • Open: Recipient has opened the e-mail letter. This event can only be fixed if the recipient has allowed viewing images in the letter and he views the full (HTML) version of the letter. It means that the number of really opened letters will be bigger.
  • Click: Recipient has opened the letter and clicked on a link inside the e-mail letter content. In this case the link of the respective address is being sent by the additional parameter URL.
  • Dropped: It is impossible to send the letter (the address to which the e-mail is sent has already been returned back)
  • Deferred: Delayed delivery of a letter. It usually happens if the recipient’s e-mail server can not receive the e-mail at once and/or requests to send it later.
  • Bounce: Letter has been returned back; it has been impossible to deliver it (incorrect address, non-existing user, etc.)
  • Spam: Recipient has flagged the letter as a spam (Most of the e-mail servers are not sending such notifications, so the real count of flagged letters could be bigger)
  • URL (string): If this notification is about a click in the e-mail, then this parameter contains the clicked address.
  • Reason (string): If this notification is about a returned letter, then this parameter contains text from the returned letter about the reason of return.


Updated on: 23/03/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!