UNIMSG.ORG integration API is designed solely as the SOAP web service. It has simple integration tools for integration by the programming languages that support SOAP.
Using the HTTP Post method, SOAP headers can be created and integrated by the programmer via the programming languages which do not support SOAP but have internet access.
For the application languages with SOAP support, the address is as the below for accessing wsdl file: http//serveraddress/api?wsdl
If no address is specified for the integrated service, default will be in serveraddress = stargate.unimsg.org format. Integration address will be referred to as stargate.unimsg.org in this document.
The address for sending the correct format XML statement –including the SOAP headers- for the application languages without the SOAP support is: http://stargate.unimsg.org/api
In order to get the most out of the application and consider its abilities and limits, it is crucial to read the below function details. In addition to the explanations below, initial project samples are given to help the programmer who will be dealing with integration.
UniMsg API has 4 functions: Userinfo, sendmail, reportbydate and reportbypacketid.
Userinfo:
Returns the user name, credit balance and the address list for sending e-mail. Returns a value from userinforeturn class.
The following shows the variables necessary for userinfo function to work:
Field Name | Type | Mandatory | Description |
username | String | Y | Username defined in the system |
vendorcode | String | Y | Sub dealer code defined in the system |
password | String | Y | Password defined in the system |
userinforeturn values are as below:
Field Name | Type | Description |
successes | boolean | Returns a true or false value to show whether the operation is successful. |
errcode | int | Gets a value other than 0 if the operation is unsuccessful. |
errdescription | String | Gives the detailed error message if the operation is unsuccessful. |
credit | int | Gives the credit balance of the user if the operation is successful. |
fullname | String | Gives the company name information if the operation is successful. |
contactname | String | Gives the contact person name information of the user if the operation is successful. |
addresspack[] | maddress | Contains the e-mail addresses of the user if the operation is successful |
maddress class is as below:
Field Name | Type | Description |
mailaddress | String | E-mail address |
sendername | String | Display name |
sendmail:
It is the function used for sending e-mail. Returns a value from sendmailreturn class.
The following shows the variables necessary for sendmail function to work:
Field Name | Type | Mandatory | Description |
username | String | Y | Username defined in the system |
vendorcode | String | Y | Sub dealer code defined in the system |
password | String | Y | Password defined in the system |
description | String | Y | Description field defining sending mail. Maximum of 200 characters. |
mailsubject | String | Y | Subject field of the mail to display on recipient's side. Maximum of 200 characters. |
mailaddress | String | Y | E-mail address to send the messages from. Defined by the System Administrators. More than one sender name can be defined. But only one of these definitions must be given. |
mailtemplate | String | Y | Content of the message to send. Text or html data are allowed. If it is necessary to send receiver specific fields, the field name that will be given in "innerdata" input object must be specified in the e-mail as @@fieldname@@ format. As an example, if variables like name and surname were given in the innerdata field, typing "Hello @@name@@ @@ surname@@" into the e-mail will cause parsing of these fields and sending to each of the recipients. If it is necessary to add pictures to the message and if this picture is hosted at an http server, it will be sufficient to quote the URL of the picture. If the picture is hosted at a local computer and the customer does not have an http server, the pictures must be located within the images[] file string. If the names of the pictures can be quoted in the message as @@filename@@ format, the picture addresses will be changed in an appropriate way to display them. As an example, |
mailfieldname | String | Y | Name of the field where the e-mail addresses of the e-mail recipients are kept. Those must me specified in the innerdata class. |
innerdata | String[][] | Y | Innerdata field. It is a 2 dimensional string for e-mail addresses and custom field to display in e-mail. String is designed as a grid and the first line of the grid symbolizes variable names and the other lines symbolize the data. |
images | file[] | N | As explained in the Mailtemplate section, refers to the images that the customer will add to the e-mail in case that the customer does not have an http server or the image is not hosted at the http server. Each of the images can have a maximum of 200 Kb size and in total, a maximum of 10 pictures must be input. |
attachments | file[] | N | String for the files if the purpose is to send e-mail with attachments. Each of the file can have a maximum of 200 Kb size and in total, a maximum of 5 files can be attached. |
startdate | String | N | Date field for sending future dated e-mails. The format is "YYYY-MM-DD HH-MM-SS". Example: "2012-06-01 13:00:00" |
When Sendmail function is called, the returned senmailreturn class will be containing the following variables:
Field Name | Type | Description |
successes | boolean | Returns a true or false value to show whether the operation is successful. |
errcode | int | Gets a value other than 0 if the operation is unsuccessful. |
errdescription | String | Gives the detailed error message if the operation is unsuccessful. |
packetid | String | Refers to the singular value for reporting the e-mail sent if the operation is successful. |
reportbydate:
It is the report for listing the messages sent by package within a specified period of time. When the function is called, a value in reportbydatereturn class will be returned.
The following shows the variables necessary for sendmail function to work:
Field Name | Type | Mandatory | Description |
username | String | Y | Username defined in the system |
vendorcode | String | Y | Sub dealer code defined in the system |
password | String | Y | Password defined in the system |
firstdate | String | Y | Starting date for the report. |
lastdate | String | Y | Ending date for the report. |
When function is called, the returned reportbydatereturn class will be containing the following variables:
Field Name | Type | Description |
successes | boolean | Returns a true or false value to show whether the operation is successful. |
errcode | int | Gets a value other than 0 if the operation is unsuccessful. |
errdescription | String | Gives the detailed error message if the operation is unsuccessful. |
packetreport[] | packetreport | Contains a string in packetreport class if the operation is successful. |
packetreport class is as the following:
Field Name | Type | Description |
packetid | String | Singular symbol for the package |
mailaddress | String | Sender e-mail address |
sendername | String | Display name of the sender e-mail address at the recipient's side |
senddate | String | Date of sending to the system |
startdate | String | Date that the e-mails started to be sent to the recipients |
description | String | Description of the e-mail campaign |
mailsubject | String | Display value for the subject in the e-mails sent |
mailcount | int | Recipient's e-mail address |
status | int | Status of the e-mail package: |
reportbypacketid:
It is the function which lists in detail the status of the e-mail sent, whether it is read, clicked and opted out. Returns a value in reportbypacketidreturn class.
The following shows the variables necessary for reportbypacketid function to work:
Field Name | Type | Mandatory | Description |
username | String | Y | Username defined in the system |
vendorcode | String | Y | Sub dealer code defined in the system |
password | String | Y | Password defined in the system |
packetid | String | Y | Singular statement symbolizing the e-mail sending package |
Reportbypacketidreturn class is as the following: :
Field Name | Type | Description |
successes | boolean | Returns a true or false value to show whether the operation is successful. |
errcode | int | Gets a value other than 0 if the operation is unsuccessful. |
errdescription | String | Gives the detailed error message if the operation is unsuccessful. |
emailreport[] | emailreport | Class that contains the report for sending status, list of recipients and their reading status. |
readreport[] | readreport | Class that contains the list of reading dates and IP addresses of the people who read the message. |
linkreport[] | linkreport | Class that contains when the links are clicked and in which e-mails these are clicked. |
unsubscribereport[] | unsubscribereport | Class that contains the list of the people who want to opt out. |
emailreport class is as the following:
Field Name | Type | Description |
messageid | String | Singular statement of the e-mail sent |
String | Sender e-mail address | |
status | int | Status of the e-mail sent. |
returncode | String | If status is 3, contains the SMTP error code |
returnvalue | String | If status is 3, contains the SMTP error message |
readcount | int | If status is 2, contains the read count |
createdate | String | Date that the e-mail is created |
senddate | String | Date that the e-mail is sent |
lastreaddate | String | Last reading date |
readreport class is as the following:
Field Name | Type | Description |
messageid | String | Singular statement of the e-mail sent |
String | Sender e-mail address | |
readdate | String | Date that the message is read |
readip | String | IP that read |
linkreport class is as the following:
Field Name | Type | Description |
messageid | String | Singular statement of the e-mail sent |
String | Sender e-mail address | |
url | String | URL clicked |
clickdate | String | Date clicked |
unsubscribereport class is as the following:
Field Name | Type | Description |
messageid | String | Singular statement of the e-mail sent |
String | Sender e-mail address | |
requestdate | String | Date of opt out request |
Sample UniMsg Bulk E-Mail API Codes
Get A Test AccountI Have a Project! |