ITPishon OMICard email-delivery platform: developer API reference.
Table of contents
- Overview
- Two API families
- Base URLs
- Authentication
- Request and response formats
- RESTful API
- Email (RESTful v1,
/api/v1/Email) - WebAPI (
.aspx) endpoints - Email (WebAPI / Email.aspx)
- Customer
- Group
- NewsLetter
- ListManager (administrator accounts only)
- Report
- ManageReport
- ReSendEmail
- Subscribe
- Unsubscribe
- TaskManager
- Status
- Directory / Folder API
- SMTP Relay / Outlook Setup
Overview
Two API families
The OMICard platform exposes two distinct API families. They use different base paths, request styles, authentication mechanisms, and response formats. Read the family note at the top of each section before integrating.
| Family | Base path | Request style | Auth | Response |
|---|---|---|---|---|
| RESTful API (v1) | /api/v1/<Resource> |
JSON body, HTTP method per resource (e.g. POST) | HTTP Basic header: Authorization: Basic base64(LoginName:Password) |
JSON |
WebAPI (.aspx) |
/WebAPI/<Resource>.aspx |
GET or POST form parameters (method decided by Web.config) |
ManagerLoginName + ManagerPassword request parameters |
XML (default), CSV, or file download |
In addition, OMICard offers a non-HTTP Directory / Folder ("hot folder") interface (jobs submitted by writing files into structured network directories; our engineers set it up with your team, and it needs engineering on both sides) and an SMTP relay service. Both are documented at the end of this reference.
Base URLs
Replace the host with your account's API host.
| RESTful API | WebAPI (.aspx) |
|
|---|---|---|
| Hosted API | https://api.itpison.com/api/v1/<Resource> |
https://api.itpison.com/WebAPI/<Resource>.aspx |
The RESTful overview gives the request URL template as https://[API host address]/api/v1/Email.
Authentication
RESTful API (v1), HTTP Basic authentication via the Authorization header:
Authorization: Basic base64_encode(LoginName:Password)
Example header: Authorization: Basic UGVnZ3kuZmVuZzo=
WebAPI (.aspx), credentials are passed as request parameters on every call:
ManagerLoginName, API (management) accountManagerPassword, API (management) password
Request and response formats
RESTful API (v1), JSON. Requests send Content-Type: application/json; charset=utf-8; responses return Content-Type: application/json; charset=utf-8. Calls and return values use Unicode encoding.
WebAPI (.aspx), calls and return values use Unicode encoding. The return message can be delivered in three ways:
- XML, the return message is generated as XML in the page content.
- CSV, the return message is generated as CSV on the page.
- File download, a file data stream is produced (
Content-Disposition: attachment).
After a WebAPI call, the response can be redirected to a specified URL:
ReferUrl, redirect the return message content to the specified URL.SuccessfulUrl, if no error occurred, redirect the return message to the specified URL.FailedUrl, if an error occurred (ErrorCode > 0), redirect to the specified URL.
Merge keywords usable in the redirect URL's return message:
| Keyword | Available when the return message contains |
|---|---|
%omisquerystring% |
(all return-message field contents) |
%errorcode% |
ErrorCode |
%errormsg% |
ErrorMSG |
%launchid% |
LaunchID |
%userid% |
UserID |
%customerid% |
CustomerID |
%reportpath% |
ReportPath |
%jobid% |
JobID |
Document conventions (WebAPI):
- In the source, underlined text indicates an input parameter field name.
[PostedFile], this field's upload content uses the formatinput type="file".- Field names and field content are generally case-insensitive, but where required they remain case-sensitive (e.g. password content, English-name content).
- GET can only pass parameters; if a file must be uploaded, POST must be used.
RESTful API
Email (RESTful v1, /api/v1/Email)
Purpose: Send email.
HTTP method: POST
Authentication required: Yes.
Request URL: https://[API host address]/api/v1/Email
Request URI parameters: None.
Request headers
| Name | Value | Type | Required | Notes |
|---|---|---|---|---|
Content-Type |
application/json; charset=utf-8 |
string | Yes | |
Authorization |
Basic base64_encode(LoginName:Password) |
string | Yes | System login account/password. Example: Basic UGVnZ3kuZmVuZzo= |
Request body, Task attributes
| Name | Type | Required | Description |
|---|---|---|---|
JobName |
string | Yes | Task name. Example: Birthday card. |
RefNumber |
string | No | Reference number. |
Priority |
integer | No | Task priority. The larger the value, the higher the priority. Example: 0. |
LaunchType |
integer | Yes | Task type. 0: formal send; 4: test send; 10: small-volume send; 60: OTP. Example: 0. |
JobOption |
integer | No | Task options. Example: 0. See the JobOption code list. |
ListOption |
integer | No | Email list options. Example: 0. See the ListOption code list. |
MaxLaunchCount |
integer | No | Maximum send count. Example: 1. |
CharacterSetID |
integer | No | Email language/character set. Example: 112. See the language list. |
StartTime |
string | No | Task start time. Format: yyyy-MM-dd hh:mm:ss. Example: 2020-12-25 23:59:30. |
ExpireTime |
string | No | Task validity deadline. Format: yyyy-MM-dd hh:mm:ss. Example: 2020-12-28 18:00:00. |
TrackingExpireTime |
integer | No | Tracking cut-off time, in seconds. Default: 15 days (1296000). Example: 1296000. |
Request body, Email attributes
| Name | Type | Required | Description |
|---|---|---|---|
Subject |
string | Yes | Email subject. |
From |
string | No | Sender display name. |
FromAddress |
string | No | Sender email address. |
ReplyName |
string | No | Reply name. |
ReplyAddress |
string | No | Reply-to email address. |
Importance |
integer | No | Email importance. 0: low; 1: normal; 2: high. Example: 1. |
Request body, Email list
The list can come from multiple sources at once (e.g. both List and CSVList may have values).
| Name | Type | Required | Description |
|---|---|---|---|
List |
Object[] | No | List content array. See ListClass. |
CSVList |
string | No | List content in simple or matched format. Simple format: comma-separated, e.g. a@a.com,b@b.com,c@c.com. Matched format: standard CSV, e.g. a header row Name,Point,EmailAddress followed by data rows. |
CSVListUrl |
String[] | No | Remote URL(s) of the list file. Example: https://edm.itpison.com/12.csv or \\192.168.100.1\12.csv. |
b64CSVList |
Object[] | No | base64-encoded list file (.CSV, .TXT, .ZIP). For .ZIP: compress the list file into a ZIP, then base64-encode it. See b64FileClass. |
Request body, Email content
▲ Exactly one of the following is required.
| Name | Type | Required | Description |
|---|---|---|---|
Content |
string | ▲ One required | Email HTML content. |
ContentUrl |
string | ▲ One required | Remote URL of the email content (.HTML, .PHP, .ASP, .ASPX). Example: https://edm.itpison.com/12.htm or \\192.168.100.1\12.htm. |
b64Content |
Object | ▲ One required | base64-encoded email content file (.HTML, .HTM, .ZIP). For .ZIP: compress the email content HTML file and image files into a ZIP, then base64-encode it. See b64FileClass. |
Request body, Attachments
| Name | Type | Required | Description |
|---|---|---|---|
b64Attachment |
Object[] | No | base64-encoded attachment file(s). See b64FileClass. Example: [ { "FileName":"a.pdf", "Content":"(base64-encoded string)" }, { "FileName":"b.pdf", "Content":"(base64-encoded string)" } ] |
Parameter definitions
b64FileClass
| Name | Type | Required | Description |
|---|---|---|---|
FileName |
string | Yes | File name. Example: header.png. |
Content |
string | Yes | base64-encoded file content. |
ListClass
| Name | Type | Required | Description |
|---|---|---|---|
EmailAddress |
string | Yes | Recipient email address. |
| (custom field) | string | No | Auto-merges with %custom field% placeholders in the email body. Case-sensitive. |
Simple List example:
[
{ "EmailAddress":"a@a.com" },
{ "EmailAddress":"b@b.com" },
{ "EmailAddress":"c@c.com" }
]
Matched List example (with custom merge fields):
[
{ "EmailAddress":"a@a.com", "Name":"A", "Point":100 },
{ "EmailAddress":"b@b.com", "Name":"B", "Point":95 },
{ "EmailAddress":"c@c.com", "Name":"C", "Point":150 }
]
Email body using the merge fields:
Dear %Name%,
Your member points this period: %Point%.
(Translation of the body: "Dear Mr./Ms. %Name%, hello, your member points this period: %Point%.")
JobOption code list
Codes are combined with OR (added together). For example, to enable "dynamic function merge" (16) and "automatically grab the Title as the subject" (2048): 16 + 2048 gives JobOption=2064.
| JobOption | Description |
|---|---|
| 1 | Perform bounce resend. |
| 2 | Dynamically merge the email body. |
| 8 | [Content option] Convert HTML to plain-text format. |
| 16 | Dynamic function merge. |
| 32 | Custom merge delimiter. |
| 64 | Perform content processing. |
| 128 | Back up the sent email content. |
| 256 | Audit-back up the sent email content. |
| 512 | [Content option] Convert email content to Unicode. |
| 1024 | [Content option] Add the base URL (<base>) to the web page content (do not use if the page contains anchors). |
| 2048 | Automatically grab the Title as the subject. |
| 8192 | [Content option] Automatically adjust the email language to match the email body language. |
ListOption code list
Codes are combined with OR (added together). For example, to enable "remove duplicates from the list" (64) and "automatically detect whether the list content is UNICODE" (4096): 64 + 4096 gives ListOption=4160.
| ListOption | Description |
|---|---|
| 1 | Keep the email To header. |
| 2 | Keep the email Cc header. |
| 8 | [List processing] Automatically correct the list. |
| 16 | Ignore the special function of double quotes ("") in CSV/TXT files. |
| 32 | [List processing] Remove the unsubscribe list. |
| 64 | [List processing] Remove duplicates from the list. |
| 128 | [List processing] Remove the blacklist. |
| 256 | [List processing] Remove the whitelist. |
| 512 | [List processing] Remove the known-bounce list. |
| 1024 | Sample, then send only the sampled list. |
| 2048 | Sample, then send the entire list. |
| 4096 | Automatically detect whether the list content is UNICODE. |
| 8192 | Not add list column To to list. |
| 16384 | Not add list column CC to list. |
| 32768 | Not add list column BCC to list. |
| 65536 | Do not filter any list (note: not even the system black/white lists are filtered). |
Language list (CharacterSetID)
The RESTful v2.0 source includes the same language/character-set table used by the WebAPI Email endpoint (IDs 0-119). See Appendix 1: Language / character set list under the WebAPI Email section. Common values: 17 = Traditional Chinese (Big5); 112 = Unicode (UTF-8); 117 = English (Western European ISO).
Response
Response headers
| Name | Content |
|---|---|
Content-Type |
application/json; charset=utf-8 |
Response body, returned only when HTTP Status Code = 200, in JSON format.
| Name | Type | Description |
|---|---|---|
LaunchID |
integer | Task ID. |
ErrorCode |
integer | Error code. See the response error code list. |
ErrorMessage |
string | Error message. See the response error code list. |
Response error code list
| ErrorCode | ErrorMessage | Description |
|---|---|---|
| 0 | (blank) | Request created successfully; ErrorMessage content is blank. |
| 100 | Exception | Internal error, e.g. an I/O read/write error. |
| 102 | Incorrect Request | A required field's content is missing. |
| 103 | LoginName or Password failed | Account/password invalid or does not exist. |
| 900 | IP not allow | The requesting source IP is not authorized. |
| 901 | Login blocked | Too many login errors; try again later. |
| 1000 | License Failure | License invalid or expired. |
Example
Request
Request URL:
https://[API host address]/api/v1/Email
Headers:
Connection: Keep-Alive
Accept-Encoding: gzip, deflate
Host: [API host address]
LoginName: Basic UGVnZ3kuZmVuZzo=
Request content:
{
"JobName":"Birthday card",
"LaunchType":0,
"Subject":"Test email subject",
"List":[
{
"EmailAddress":"a@a.com",
"Name":"A",
"Point":100
},
{
"EmailAddress":"b@b.com",
"Name":"B",
"Point":95
},
{
"EmailAddress":"c@c.com",
"Name":"C",
"Point":150
}
],
"CSVList":"Name,Point,EmailAddress\r\nX,100,x@x.com\r\nY,90,y@y.com\r\nZ,150,z@z.com",
"Content":"Dear %Name%,<br />Your member points this period: %Point%."
}
Response
{
"LaunchID": 2501,
"ErrorCode": 0,
"ErrorMessage": ""
}
WebAPI (.aspx) endpoints
The endpoints in this family are called at /WebAPI/<Resource>.aspx, accept GET or POST form parameters (decided by Web.config), authenticate with ManagerLoginName + ManagerPassword, and return XML/CSV/file output. See Request and response formats for the shared conventions (return modes, redirect URLs, merge keywords, document conventions) that apply to every endpoint below.
Email (WebAPI / Email.aspx)
Call URLs
https://api.itpison.com/WebAPI/Email.aspx
Outline definition
- The API can be called using GET or POST; the method used is decided by
Web.config. - Calls and return values are encoded using Unicode encoding.
The return message can be returned in three ways:
1. XML: generate the return message in XML format in the web page content.
2. CSV: generate the return message in CSV format on the web page.
3. File download: generate a file data stream (Content-Disposition: attachment).
After the API call, redirect to a specified URL:
1. ReferUrl: redirect the return message content to the specified URL.
2. SuccessfulUrl: if no error occurred, redirect the return message to the specified URL.
3. FailedUrl: if an error occurred (ErrorCode > 0), redirect to the specified URL.
Merge keywords for the return message when redirecting to a specified URL:
1. %omisquerystring%, all return message field contents.
2. %errorcode%, usable when the return message contains ErrorCode.
3. %errormsg%, usable when the return message contains ErrorMSG.
4. %launchid%, usable when the return message contains LaunchID.
5. %userid%, usable when the return message contains UserID.
6. %customerid%, usable when the return message contains CustomerID.
7. %reportpath%, usable when the return message contains ReportPath.
8. %jobid%, usable when the return message contains JobID.
About this document:
1. Underlined text: in the documentation, underlined text indicates that this is the name of an input parameter field.
2. [PostedFile]: the upload content format for this field is input type="file".
3. Field names and field contents are generally case-insensitive, but where required they remain case-sensitive, for example, the password field content and the name (English) field content.
4. GET can only pass parameters; if a file must be uploaded, the POST method must be used.
Function
Send email.
Required fields
ManagerLoginName, API management account.ManagerPassword, API management password.ContentorContentUrlorHtmlEmailContentFileorTextEmailContentFileorTextContentorTextContentUrl, the email content.
Parameter reference
Task management
| Parameter | Type | Required | Description |
|---|---|---|---|
JobName |
string | No | Task name. |
RefNumber |
string | No | Reference number. |
RefInfo |
string | No | Task reference notes. |
ExtUser |
string | No | Sending account. |
Priority |
int | No | Task priority. |
LaunchType |
int | No | Task type (0: formal send, 1: trigger task, 4: test send, 10: small-volume task). (Note 1) |
JobOption |
int | No | Task options. (Note 2) |
MailImportance |
int | No | Email importance, 0: low, 1: normal, 2: high. |
MaxLaunchCount |
int | No | Maximum send count. |
CharacterSetID |
int | No | Email language/character set (see Appendix 1 for the full list). |
StartTime |
datetime | No | Task start time (format: yyyy-MM-dd hh:mm:ss). |
LaunchExpireTime |
datetime | No | Task validity deadline (format: yyyy-MM-dd hh:mm:ss). |
TrackingExpireTime |
int | No | Tracking cut-off time (default 15 days = 1296000). (Note 10) |
BeginPendTime |
string | No | Pause-sending start time (format: hh:mm). |
EndPendTime |
string | No | Pause-sending end time (format: hh:mm). |
Subject
| Parameter | Type | Required | Description |
|---|---|---|---|
Subject |
string | No | Email subject. |
SubjectFile |
[PostedFile] | No | Upload a text file containing the subject content. |
Preview text
| Parameter | Type | Required | Description |
|---|---|---|---|
PreviewText |
string | No | Preview text. |
HiddenPreviewText |
string | No | The PreviewText is not displayed in the email body. |
Note: choose one of the above.
Sender
| Parameter | Type | Required | Description |
|---|---|---|---|
From |
string | No | Sender display name. |
EmailFromAddress |
string | No | Sender email address. |
SenderNameFile |
[PostedFile] | No | Upload a text file containing the sender display name. |
Reply (reply mailbox and display name)
| Parameter | Type | Required | Description |
|---|---|---|---|
ReplyName |
string | No | Reply name. |
ReplyAddress |
string | No | Reply-to email address. |
ReplyDisplayContentFile |
[PostedFile] | No | Upload a text file containing the reply name. |
Recipient
| Parameter | Type | Required | Description |
|---|---|---|---|
To |
string | No | Default recipient display name. |
ToDisplayContentFile |
[PostedFile] | No | Upload a text file containing the default recipient display name. |
Email list
| Parameter | Type | Required | Description |
|---|---|---|---|
ListOption |
int | No | Email list options. (Note 3) |
EmailList |
string | No | Email list content. |
EmailListFilePath |
string | No | Email list file path (e.g. D:\temp\Contact.txt). (Note 4) |
EmailListFile |
[PostedFile] | No | Upload an email list file. |
EmailUrl |
string | No | Remote URL of the email list. |
EmailListGroupID |
string | No | Email list drawn from members of the specified GroupID in the system member database; multiple GroupIDs use CSV format (e.g. 33,56,74,76). |
EmailListNewsLetterID |
string | No | Email list drawn from members of the specified NewsletterID in the system member database; multiple NewsletterIDs use CSV format (e.g. 33,56,74,76). |
EmailListCusParam?? |
string | No | N is blank or a number 1-99 (e.g. EmailListCusParam, EmailListCusParam1-EmailListCusParam99). Email list drawn from the OMICard CustomerInfo member database table, specifying the filter conditions. (Note 5) |
CustomerListColumn?? |
string | No | N is blank or a number 1-99 (e.g. CustomerListColumn, CustomerListColumn1-CustomerListColumn99). When the email list is drawn from the OMICard CustomerInfo member database table, specifies which columns are used as the list content. (Note 6) |
SubscribeNewsLetterID |
string | No | Select the newsletter group(s) to subscribe the customer to; multiple NewsletterIDs use CSV format (e.g. 33,56,74,76). |
UnsubscribeNewsLetterID |
string | No | Select the newsletter group(s) to unsubscribe the customer from; multiple NewsletterIDs use CSV format (e.g. 33,56,74,76). |
EmailBlackListFile |
[PostedFile] | No | Blacklist file. |
EmailWhiteListFile |
[PostedFile] | No | Whitelist file. |
Email content
| Parameter | Type | Required | Description |
|---|---|---|---|
Content |
string | Conditional | Email content. |
LinkOption |
int | No | Link options. (Note 3-1) |
TextContent |
string | Conditional | Plain-text format email content. |
TextEmailContentFile |
[PostedFile] | Conditional | Upload a plain-text format email content file. |
TextContentUrl |
string | Conditional | Remote URL of the plain-text format email content (TXT). |
ContentUrl |
string | Conditional | Remote URL of the email content (.HTML, .PHP, .ASP, .ASPX). |
HtmlEmailContentFile |
[PostedFile] | Conditional | Upload an HTML/XML file, or a single image, as the email content file. |
EmailContentXsltFile |
[PostedFile] | No | Upload the XSLT file required for an XML-format email content file. |
ImageURL |
string | No | Upload a single image as the email content; this is the URL the image links to when clicked. |
BackgroundSoundUrl |
string | No | Remote URL of the email background music file. |
BackgroundSoundFile |
[PostedFile] | No | Upload an email background music file. |
Attachments
| Parameter | Type | Required | Description |
|---|---|---|---|
AttachmentN |
[PostedFile] | No | N is blank or a number 1-99 (e.g. Attachment, Attachment1-Attachment99). Upload one or more files as attachments. |
AttachmentLinkName |
string | No | Convert attachments into a download link; this is the prompt text for the download link. The prompt name must be set in order to enable the "attachment to download link" feature. |
TrackAttacmentLink |
bool | No | Works with AttachmentLinkName; whether to track the attachment download link. Default: False; to track: True. |
LinkPosition |
int | No | Works with AttachmentLinkName; display position of the download link. 0: top-left, 1: top, 2: top-right, 3: bottom-left, 4: bottom, 5: bottom-right. |
ListFileAttachment |
bool | No | Works with the Attachment column in an EmailListFile list; convert to PDF. Default: False; to convert: True. |
PDFAttachmentN |
[PostedFile] | No | N is blank or a number 1-99 (e.g. PDFAttachment, PDFAttachment1-PDFAttachment99). Upload one or more files as attachments and convert them to PDF format. |
MergePDFAttachmentN |
[PostedFile] | No | N is blank or a number 1-99 (e.g. MergePDFAttachment, MergePDFAttachment1-MergePDFAttachment99). Upload one or more files as attachments, merge the attachment content with the list content, then convert to PDF format. The PDF content merge uses the same merge method as email content merging. If the PDF content file has no merge requirement, use the PDFAttachmentN field instead, to avoid affecting mail-generation speed. |
AttachmentPDFOption |
string | No | Set parameters related to PDF attachments. (Note 7) |
RemoveReturnCodeList?? |
string | No | N is blank or a number 1-99 (e.g. RemoveReturnCodeList, RemoveReturnCodeList1-RemoveReturnCodeList99). Set bounce (return) codes to remove already-known bounced addresses. Three parameter formats are available. To use RemoveReturnCodeList, you must also add option value 512 (remove known-bounce list) to ListOption. 1. RemoveReturnCodeList=902, remove from the list all emails whose bounce code is 902. 2. RemoveReturnCodeList=902,3, remove from the list all bounces with bounce code 902 that have bounced more than 3 times. 3. RemoveReturnCodeList=902,3,180, remove from the list all bounces within 180 days, that have bounced more than 3 times, with bounce code 902. |
Content processing
| Parameter | Type | Required | Description |
|---|---|---|---|
CommonMergeData |
string | No | Consistent merge data. (Note 8) |
ContentProcessActionType |
int | No | Content processing method. |
ContentProcessFindType |
int | No | Content processing parameter. |
ContentProcessFindText |
string | No | Content processing parameter. |
ContentProcessReplaceSource |
string | No | Content processing parameter. |
ContentProcessTargetType |
int | No | Content processing parameter. |
ContentProcessTargetTypeOption |
int | No | Content processing parameter. |
(See Note for the content-processing tables below.)
Report dispatch and management
| Parameter | Type | Required | Description |
|---|---|---|---|
AutoGenerateReport |
bool | No | On task send, automatically generate a report. (Note 9) |
ReportClass |
int | No | Report group, 1: OMICard, 1001: legacy report group. |
DispatchList |
string | No | Report dispatch list. (Note 9) |
DispatchStartTime |
datetime | No | Dispatch start time (format: yyyy-MM-dd hh:mm:ss). |
DispatchCount |
int | No | Dispatch count (number of dispatch sends). |
DispatchInterval |
int | No | Dispatch interval. |
Functional links
| Parameter | Type | Required | Description |
|---|---|---|---|
LinkType |
int | No | 4: terminate email sending, 3: forward email, 6: message board, 5: subscribe, 11: survey, 15: confirm, 14: agree, 100: click to view original EDM (if it cannot be seen). |
LinkOption |
int | No | 1: this email task, 2: forward, 3: this email task and forward. |
LinkPosition |
int | No | 0: top-left, 1: top, 2: top-right, 3: bottom-left, 4: bottom, 5: bottom-right. |
Prompt |
string | No | Link prompt text. |
Special keywords
| Parameter | Type | Required | Description |
|---|---|---|---|
%EmailContentSource% |
keyword | No | Used for composite content. (Note 11) |
URL encoding (urlencode) (Note 13): if the programming language used does not perform URL encoding automatically when passing parameters, you must URL-encode (urlencode) the values first.
Code lists
Note 1: LaunchType
| Value | Meaning |
|---|---|
| 0 | Formal send |
| 1 | Trigger task |
| 4 | Test send |
| 10 | Small-volume task |
LaunchType: (0: formal send, 1: trigger task, 4: test send, 10: small-volume task).- When
LaunchTypeis 0 (formal send), the list source must set at least one ofEmailList,EmailUrl, orEmailListFile; multiple list sources are allowed. - When
LaunchTypeis 1 (trigger task), the list source can come from the trigger task. The email content must be one ofContent,ContentUrl,HtmlEmailContentFile, orTextEmailContentFile; if more than one is present,Contenttakes priority. - When
LaunchTypeis 4 (test send), if there are multiple sending machines and one or more is designated for test sending, the task will use the designated mail-sending machine, and the task list will be capped at a maximum send volume (default 10 emails); this cap can be configured inweb.config. - When
LaunchTypeis 10 (small-volume task), if there are multiple sending machines and one or more is designated for small-volume sending, the task will use the designated mail-sending machine. It is recommended that only small lists (e.g. registration notification emails) or important emails (e.g. a quotation a customer is waiting for) be set as small-volume tasks, to avoid having to wait in the sending machine queue when large mail tasks are being sent.
Note 2: JobOption
Task option setting values: set email task parameters; multiple selections are allowed using the additive (cumulative) method. If JobOption is not set, the system default value in web.config is used automatically.
JobOption |
Description |
|---|---|
| 1 | Perform bounce resend. |
| 2 | Dynamically merge the email body. |
| 8 | [Content option] Convert HTML to plain-text format. |
| 16 | Dynamic function merge. |
| 32 | Custom merge delimiter. |
| 64 | Perform content processing. |
| 128 | Back up the sent email content. |
| 256 | Audit-back up the sent email content. |
| 512 | [Content option] Convert email content to Unicode. |
| 1024 | [Content option] Add the base URL (<base>) to the web page content (do not use if the page contains anchors). |
| 2048 | Automatically grab the Title as the subject. |
| 8192 | [Content option] Automatically set the email language to match the email body language. |
| 16384 | [Content option] Automatically adjust the email header based on the email body language. |
| 32768 | [Multi-subject layer, web-mail page] Retrieve only the subject; same-recipient on-site web page link language. |
| 131072 | [Multi-layer web page] Automatically grab multi-layer web pages. |
| 262144 | [Content option] Automatically convert the body file into web page format. |
| 1048576 | [Content option] Merge the recipient display name. |
| 2097152 | [Content option] Archive the web page into a single file (*.mht). |
| 268435456 | [Content option] Track Outlook delivery receipts. |
| 536870912 | [Content option] Track Outlook read receipts. |
| 2147483648 | Delete all directories and files after sending is complete. |
Note 3: ListOption
Email list options: set email list processing options; multiple selections are allowed using the additive method, the same as JobOption. If ListOption is not set, the system default value in Omicard.config is used automatically.
ListOption |
Description |
|---|---|
| 1 | Keep the email To header. |
| 2 | Keep the email Cc header. |
| 8 | [List processing] Automatically correct the list. |
| 16 | Ignore the special function of double quotes ("") in CSV/TXT files. |
| 32 | [List processing] Remove the unsubscribe list. |
| 64 | [List processing] Remove duplicates from the list. |
| 128 | [List processing] Remove the blacklist. |
| 256 | [List processing] Remove the whitelist. |
| 512 | [List processing] Remove the known-bounce list. |
| 1024 | After sampling, send only the sampled list. |
| 2048 | After sampling, send the entire list. |
| 4096 | Automatically detect whether the list content is UNICODE. |
| 8192 | Not add list column To to list. |
| 16384 | Not add list column CC to list. |
| 32768 | Not add list column BCC to list. |
| 65536 | Do not filter any list (note: not even the system black/white lists are filtered). |
Note 3-1: LinkOption
Link setting options: multiple selections are allowed using the additive method, the same as JobOption. If LinkOption is not set, the system default value in Omicard.config is used automatically.
| LinkOption | Description |
| --- | --- |
| 1 | Embed images inline in the email content (larger email file). |
| 2 | Add extra GA parameters. |
| 4 | Treat the same link name and URL link as different. |
| 8 | Automatically clean links (remove amp; from link). |
| 16 | Convert relative paths to absolute paths. |
| 32 | Automatically grab the link text as the link name. |
| 64 | Do not track opens. |
| 128 | Do not track all links. |
| 256 | Do not track links without a link name. |
| 512 | Do not track MailTo links. |
| 1024 | Do not track links in Frame web pages. |
| 2048 | Do not track MMS: links. |
| 4096 | Do not convert MMS: links. |
| 8192 | Do not convert open-tracking links. |
Note 3-2: LaunchOption
Multiple selections are allowed using the additive method, the same as JobOption. If LaunchOption is not set, the system default value in Omicard.config is used automatically.
LaunchOption |
Description |
|---|---|
| 1 | Delete all task directories and files after the task completes. |
| 2 | Delete all task DB data after the task completes. |
| 4 | Pause the sending of approval emails. |
| 8 | Automatically generate a reference number. |
| 16 | Split the list. |
| 32 | Do not generate a new send directory. |
| 64 | Do not generate a task directory. |
| 128 | Also generate the send when the task is submitted. |
| 256 | Send the sampling in multiple separate sends. |
| 512 | CheckExtTimeOption. |
Note 3-3: SendOption
Multiple selections are allowed using the additive method, the same as JobOption. If SendOption is not set, the system default value in Omicard.config is used automatically.
SendOption |
Description |
|---|---|
| 15 | SendListMask |
| 0 | SendMainListOnly |
| 1 | SendMainListFirst |
| 2 | SendSubListFirst |
| 3 | SendSubListOnly |
| 4 | SendBothList |
Notes
Note 4: EmailListFilePath
The file path specified by EmailListFilePath is in the form D:\temp\Contact.txt or an http:// URL, and must be a path the AP Server can read.
Note 5: EmailListCusParam
EmailListCusParam??draws the email list from the OMICardCustomerInfomember data table, filtered by the conditions specified in theEmailListCusParam??field. The content format of theEmailListCusParam??field is as follows:- A. member field name, comparison operator, field content
- B. member field name, comparison operator, field content, condition group number
- Member field name: see the OMICard
CustomerInfofields in Appendix 2. If the member field name is not in theCustomerInfofields, it is ignored. - Comparison operator:
=(equal to),>(greater than),<(less than),>=(greater than or equal to),<=(less than or equal to),<>(not equal to),LIKE(search for a specific character string). - Field content: compared against the content of the specified OMICard
CustomerInfofield. For text and date field types, the field content does not need single quotes (') around it; all characters are treated as the content to compare. Note the field type, content that cannot be converted to the corresponding OMICardCustomerInfofield type is ignored. For example, theCustomerInfofieldYearOfBirthhas the field typeint: - A.
EmailListCusParam1=YearOfBirth,<,1990(correct) - B.
EmailListCusParam2=YearOfBirth,<,abc(incorrect:abccannot be converted to int and is ignored) - Condition group number: when there are multiple
EmailListCusParam??with condition group numbers set,EmailListCusParam??entries with the same number are treated as one group; within a group, theEmailListCusParam??entries are joined with AND; different numbers are treated as different groups, and groups are joined with OR. If no condition group number is set, the default condition group number is 0.
EmailListCusParam?? field filtering examples:
Example 1. URL parameters:
EmailListCusParam=Gender,=,1&EmailListCusParam1=YearOfBirth,>,1980&EmailListCusParam2=Marriage,=,0
Corresponding logic: Gender = 1 AND YearOfBirth > 1980 AND Marriage = 0
Explanation: select unmarried women born after 1980 from the customer database.
Example 2. URL parameters:
EmailListCusParam=Gender,=,0,1&EmailListCusParam1=MonthOfBirth,=,12,1&EmailListCusParam2=Income,>,30000,1&EmailListCusParam3=Gender,=,1,2&EmailListCusParam4=MonthOfBirth,=,12,2&EmailListCusParam5=Income,>,25000,2&EmailListCusParam6=EmailAddress,LIKE,yahoo.com.tw,3
Corresponding logic: (Gender = 0 AND MonthOfBirth = 12 AND Income > 30000) OR (Gender = 1 AND MonthOfBirth = 12 AND Income > 25000) OR (EmailAddress LIKE %yahoo.com.tw%)
Explanation: select, from the customer database, men born in December with income greater than 30,000, OR women born in December with income greater than 25,000, OR those whose email address contains yahoo.com.tw.
Note 6: CustomerListColumn
CustomerListColumn??, when the email list is drawn from the OMICardCustomerInfomember database table, specifies which columns are used as the list content. TheCustomerListColumn??format is: data table column name, list column name- For the list of data table column names, see the
Customer.aspxchapter. The list column name is the name the column will have in the list when the data table column is output to the list. - Example 1:
CustomerListColumn=Name,CustomerName, the list column name is changed from the database'sNametoCustomerName. - Example 2:
CustomerListColumn=EmailAddress,EmailAddress, the column name is unchanged.
When calling Email.aspx using GET, field content that uses special symbols or Chinese characters must first be URL-encoded; otherwise URL parsing errors are likely during HTTP transmission.
URL-encoding example:
| Urldecoding | Urlencoding |
|---|---|
EmailListCusParam1=YearOfBirth,<,1990 |
EmailListCusParam1=YearOfBirth,%3C,1990 |
Content=Dear %Name% |
Content=Dear%20%25Name%25 |
Common symbol urlencoding reference table:
| ASCII Character | URL-encoding |
|---|---|
< |
%3C |
= |
%3D |
> |
%3E |
% |
%25 |
& |
%26 |
Note 7: AttachmentPDFOption
The parameters for converting attachments to PDF are set as follows:
AttachmentPDFOption=ConvertOption,Encryption,HtmlOption,Permission,Width,Height,InsetX,InsetY,OwnerPassword,UserPassword
Permission: some parameter settings only take effect when the Encryption feature is enabled.
AttachmentPDFOption has 10 parameters in total, separated by ,. Each parameter is described below.
ConvertOption
| Value | Description |
|---|---|
| 0 | Use the default conversion program; best PDF conversion performance. |
| 1 | If the attachment body uses fonts created with Microsoft's "Private Character Editor" (EUDC.TTE, EUDC.EUF), convert to PDF in the "foreground" using Microsoft Office components. This method does not support the four parameters Width, Height, InsetX, and InsetY. To set the document size, adjust the attachment before uploading, then set Width, Height, InsetX, and InsetY all to 0. Chinese private characters (EUDC) are displayed using a bitmap (dot-matrix) approach, and Microsoft Office components give the best conversion result for them. Foreground conversion is slower than background conversion (the speed difference can be tens of times), which affects large mailings (tens of thousands of emails or more). Use it only when needed. |
Encryption
| Value | Description |
|---|---|
| 0 | PDF conversion without encryption. |
| 1 | PDF conversion using 40-bit encryption. |
| 2 | PDF conversion using 128-bit encryption. |
| 3 | Reserved / not used. |
| 4 | PDF conversion using 128-bit AEC encryption. |
| 5 | PDF conversion using 256-bit encryption. |
HtmlOption
| Value | Description |
|---|---|
| 1 | PDF content format is HTML; background color can be hidden. |
| 2 | PDF content format is HTML; links can be added. |
| 4 | PDF content format is HTML; tables can be added. |
| — | For multiple features, add the numbers together. |
Permission (requires the Encryption condition shown)
| Value | Description | Requires |
|---|---|---|
| 1 | Can assemble PDF document content. | Encryption >= 2 |
| 2 | Can change PDF document content. | Encryption >= 1 |
| 4 | Can copy PDF document content. | Encryption >= 1 |
| 8 | Can modify PDF document content. | Encryption >= 1 |
| 16 | Can extract PDF document content. | Encryption >= 2 |
| 32 | Can fill in form fields. | Encryption >= 2 |
| 64 | Can print PDF document content (Adobe Reader 8.0). | Encryption >= 1 |
| 128 | Can print at high resolution. | Encryption >= 2 |
Width / Height, document size. Unit: pt (1/72 inch).
Common document sizes (width, height):
| Spec | Width | Height | Spec | Width | Height |
|---|---|---|---|---|---|
| A3 | 842 | 1190 | B3 | 1001 | 1417 |
| A4 | 595 | 842 | B6 | 354 | 499 |
| A5 | 420 | 595 | Letter | 612 | 729 |
| B4 | 729 | 1032 | Legal | 612 | 1008 |
| B5 | 516 | 729 | Tabloid | 792 | 1224 |
| A0 | 2384 | 3370 | Ledger | 1224 | 792 |
| A1 | 1684 | 2384 | Statement | 396 | 612 |
| A2 | 1191 | 1684 | Executive | 540 | 720 |
| A6 | 298 | 420 | Folio | 612 | 936 |
| B0 | 2836 | 4008 | Quarto | 610 | 780 |
| B1 | 2004 | 2835 | 10x14 | 720 | 1008 |
| B2 | 1417 | 2004 |
InsetX / InsetY, X/Y axis position of the top-left margin of the content, where document layout begins.
OwnerPassword, owner (author) password; leave blank for no password. (Owner: read and modify-settings permission. To enable encryption, this setting must be effective.)
UserPassword, reader (user) password; leave blank for no password. (Reader: read-only permission. To enable encryption, this setting must be effective.)
Note 8: CommonMergeData
Consistent merge (CSV format). When using consistent merge data, you can enter default merge keywords here; if the list merge content has a value, the content in the list takes priority.
Format: keyword, replacement text
Example:
CommonMergeData=keyName1,Key1\r\nKeyName2,Key2
Each line must be separated by a line break (in C# this is \r\n; adjust for other languages).
Email content processing
Perform additional processing on the email content. You can replace text targeting the URL, the entire link, or all content, or place an input string at the header or footer of the page.
1. Set the processing method:
| Parameter | Replace content text | Add content (header) | Add content (footer) |
|---|---|---|---|
ContentProcessActionType |
0 | 1 | 2 |
ContentProcessFindType |
Value |
|---|---|
| Exact match | 0 |
| Anywhere | 1 |
| Start | 2 |
| End | 3 |
| Keyword is a Regular Expression | 4 |
| Parameter | Description (Replace content text) | Description (header) | Description (footer) |
|---|---|---|---|
ContentProcessFindText |
Search target | — | — |
ContentProcessReplaceSource |
Replace with | Header content | Footer content |
2. Set the processing scope (multiple selections allowed, additive method). Example: a processing scope including web page format and subject = 20 (4 + 16).
| Parameter | Plain text | Web page format | Subject (format) | Subject |
|---|---|---|---|---|
ContentProcessTargetTypeOption |
— | 4 | 8 | 16 |
3. Set the email content processing scope:
| Parameter | URL only | Entire link | All content |
|---|---|---|---|
ContentProcessTargetType |
0 | 1 | 2 |
Note 9: AutoGenerateReport, DispatchList
- Setting
AutoGenerateReporttotrueautomatically generates a report task after the task is sent. The default value isfalse. - When
AutoGenerateReportistrue, a report dispatch task can be set. Set the recipient email addresses to dispatch to inDispatchList; if there are multiple email addresses, the separator is,(e.g.UserA@OmiCard.com,UserB@OmiSystems.com). The dispatch start timeDispatchStartTimedefaults to now. Set the dispatch countDispatchCount(default once) and the dispatch intervalDispatchInterval, whose unit is minutes (default 1440 minutes = one day). - When
AutoGenerateReportistrue,ReportClasscan be set to control whether the report is displayed in the OMICard or legacy report management list; the default value is 1 (displayed in OMICard). OMICard: 1, legacy report group: 1001.
Note 10: TrackingExpireTime
- The default value is that messages are no longer recorded 15 days after the email is sent; this time can be increased or decreased.
- Set the tracking cut-off time; after the email is sent, all message statuses (opens, clicks, etc.) beyond this time are no longer recorded.
- 1 Day = 86400, 1 Hour = 3600, 1 Minute = 60.
Example: to stop tracking after 1 day, 12 hours, and 30 minutes:
TrackingExpireTime=(1*86400)+(12*3600)+(30*60)
TrackingExpireTime=131400
Note 11: %EmailContentSource%
- When you upload a list using the WebAPI [POST] method and each list entry and its content differ, a problem occurs: the report message only shows the open report and not the click report.
- This is to reduce the problem of repeatedly recording the same information.
- If your uploaded list all uses the same content, the merge field keyword for the uploaded list is defined by you (e.g.
EmailCountent). If the content differs, refer to the sample program explanation.
Note 12: urlencode
When the API is called using POST with ContentType of "application/x-www-form-urlencoded", then among the parameters passed in:
- If they contain URL reserved characters (e.g. &), and the programming language used does not perform URL encoding automatically when passing parameters, you must URL-encode (urlencode) them first.
- See Wikipedia for reference: https://en.wikipedia.org/wiki/Percent-encoding
Note 13: URL encoding (urlencode)
If the programming language used does not perform URL encoding automatically when passing parameters, you must URL-encode (urlencode) them first.
Return ErrorCode message codes
| ErrorCode | ErrorMsg |
|---|---|
| 100 | Exception |
| 102 | IncorrectRequest |
| 113 | GroupID is not exist |
| 114 | NewsLetterID is not exist |
| 115 | Max Count is required |
| 116 | Max Count Per Email is required |
| — | Trigger max count per Email is Required |
| 1000 | No Licence at Page |
| — | Trigger max count per Email is Required |
Appendix 1: Language / character set list
| ID | Language name | ID | Language name |
|---|---|---|---|
| 0 | System default | 60 | IBM EBCDIC (Latin - North America) |
| 1 | Arabic (ASMO 708) | 61 | IBM EBCDIC (Japanese Katakana) |
| 2 | Arabic (DOS) | 62 | IBM EBCDIC (Korean and Korean Extended) |
| 3 | Arabic (ISO) | 63 | IBM EBCDIC (Korean Extended) |
| 4 | Arabic (Mac) | 64 | IBM EBCDIC (Multilingual Latin-2) |
| 5 | Arabic (Windows) | 65 | IBM EBCDIC (Simplified Chinese) |
| 6 | Baltic (DOS) | 66 | IBM EBCDIC (Spanish) |
| 7 | Baltic (ISO) | 67 | IBM EBCDIC (Spanish - Europe) |
| 8 | Baltic (Windows) | 68 | IBM EBCDIC (Thai) |
| 9 | Central European (DOS) | 69 | IBM EBCDIC (Traditional Chinese) |
| 10 | Central European (ISO) | 70 | IBM EBCDIC (Turkish Latin-5) |
| 11 | Central European (Mac) | 71 | IBM EBCDIC (Turkish) |
| 12 | Central European (Windows) | 72 | IBM EBCDIC (UK) |
| 13 | Simplified Chinese (EUC) | 73 | IBM EBCDIC (UK - Europe) |
| 14 | Simplified Chinese (GB2312) | 74 | IBM EBCDIC (North America) |
| 15 | Simplified Chinese (HZ) | 75 | IBM EBCDIC (North America - Europe) |
| 16 | Simplified Chinese (Mac) | 76 | Icelandic (DOS) |
| 17 | Traditional Chinese (Big5) | 77 | Icelandic (Mac) |
| 18 | Traditional Chinese (CNS) | 78 | ISCII Assamese |
| 19 | Traditional Chinese (Eten) | 79 | ISCII Bengali |
| 20 | Traditional Chinese (Mac) | 80 | ISCII Devanagari |
| 21 | Cyrillic (DOS) | 81 | ISCII Gujarathi |
| 22 | Cyrillic (ISO) | 82 | ISCII Kannada |
| 23 | Cyrillic (KOI8-R) | 83 | ISCII Malayalam |
| 24 | Cyrillic (KOI8-U) | 84 | ISCII Oriya |
| 25 | Cyrillic (Mac) | 85 | ISCII Panjabi |
| 26 | Cyrillic (Windows) | 86 | ISCII Tamil |
| 27 | Europa | 87 | ISCII Telugu |
| 28 | German (IA5) | 88 | Japanese (EUC) |
| 29 | Greek (DOS) | 89 | Japanese (JIS) |
| 30 | Greek (ISO) | 90 | Japanese (JIS-Allow 1 byte Kana - SO/SI) |
| 31 | Greek (Mac) | 91 | Japanese (JIS-Allow 1 byte Kana) |
| 32 | Greek (Windows) | 92 | Japanese (Mac) |
| 33 | Modern Greek (DOS) | 93 | Japanese (Shift-JIS) |
| 34 | Hebrew (DOS) | 94 | Korean |
| 35 | Hebrew (ISO-Logical) | 95 | Korean (EUC) |
| 36 | Hebrew (ISO-Visual) | 96 | Korean (ISO) |
| 37 | Hebrew (Mac) | 97 | Korean (Johab) |
| 38 | Hebrew (Windows) | 98 | Korean (Mac) |
| 39 | IBM EBCDIC (Arabic) | 99 | Latin 3 (ISO) |
| 40 | IBM EBCDIC (Cyrillic Russian) | 100 | Latin 9 (ISO) |
| 41 | IBM EBCDIC (Cyrillic Serbian-Bulgarian) | 101 | Norwegian (IA5) |
| 42 | IBM EBCDIC (Danish-Norwegian) | 102 | OEM United States |
| 43 | IBM EBCDIC (Danish-Norwegian-Europe) | 103 | Swedish (IA5) |
| 44 | IBM EBCDIC (Finnish-Swedish) | 104 | Thai (Windows) |
| 45 | IBM EBCDIC (Finnish-Swedish-Europe) | 105 | Turkish (DOS) |
| 46 | IBM EBCDIC (Finnish-Swedish-Europe) | 106 | Turkish (ISO) |
| 47 | IBM EBCDIC (France-Europe) | 107 | Turkish (Mac) |
| 48 | IBM EBCDIC (Germany) | 108 | Turkish (Windows) |
| 49 | IBM EBCDIC (Germany-Europe) | 109 | Unicode |
| 50 | IBM EBCDIC (Greek Modern) | 110 | Unicode (Big-Endian) |
| 51 | IBM EBCDIC (Greek) | 111 | Unicode (UTF-7) |
| 52 | IBM EBCDIC (Hebrew) | 112 | Unicode (UTF-8) |
| 53 | IBM EBCDIC (Iceland) | 113 | US-ASCII |
| 54 | IBM EBCDIC (Iceland-Europe) | 114 | Vietnamese (Windows) |
| 55 | IBM EBCDIC (International-Europe) | 115 | English (Western European DOS) |
| 56 | IBM EBCDIC (Italy) | 116 | English (Western European IA5) |
| 57 | IBM EBCDIC (Italy-Euro) | 117 | English (Western European ISO) |
| 58 | IBM EBCDIC (Japanese and Katakana Japanese) | 118 | English (Western European Mac) |
| 59 | IBM EBCDIC (Japanese-Latin) | 119 | English (Western European Windows) |
Appendix 2: OMICard CustomerInfo column names (lowercase)
| Column name | Column definition | Note |
|---|---|---|
| CustomerID | int identity(1,1) primary key | |
| UserID | int default 0 null, /Creator/ | |
| ImportID | int default 0 null | |
| Grade | smallint default 0 null | |
| DefaultOption | int default 0 null | |
| Score | int default 0 null | |
| SourceType | smallint default 1 null | |
| SourceID | int default 1 null | |
| MemberStatus | smallint default 0 null | |
| Name | nvarchar(63) null | |
| Nickname | nvarchar(127) null | |
| Picture | nvarchar(63) null | |
| CountryCode | nvarchar(7) null | |
| Country | nvarchar(63) null | |
| State | nvarchar(63) null | |
| City | nvarchar(63) null | |
| ZipCode | nvarchar(15) null | |
| Address | nvarchar(255) null | |
| EmailAddress | nvarchar(127) null | |
| FaxNumber | nvarchar(31) null | |
| PhoneNumber | nvarchar(31) null | |
| IMType | smallint default 0 null | |
| IMAccount | nvarchar(63) null | |
| ContactPerson | nvarchar(63) null | |
| ContactCountryCode | nvarchar(7) null | |
| ContactCountry | nvarchar(63) null | |
| ContactState | nvarchar(63) null | |
| ContactCity | nvarchar(63) null | |
| ContactZipCode | nvarchar(15) null | |
| ContactAddress | nvarchar(255) null | |
| ContactEmailAddress | nvarchar(127) null | |
| ContactFaxNumber | nvarchar(31) null | |
| ContactPhoneNumber | nvarchar(31) null | |
| ContactIMType | smallint default 0 null | |
| ContactIMAccount | nvarchar(63) null | |
| Company | nvarchar(127) null | |
| CompanyCountryCode | nvarchar(7) null | |
| CompanyCountry | nvarchar(63) null | |
| CompanyState | nvarchar(63) null | |
| CompanyCity | nvarchar(63) null | |
| CompanyZipCode | nvarchar(15) null | |
| CompanyAddress | nvarchar(255) null | |
| CompanyEmailAddress | nvarchar(127) null | |
| CompanyFaxNumber | nvarchar(31) null | |
| CompanyPhoneNumber | nvarchar(31) null | |
| CompanyIMType | smallint default 0 null | |
| CompanyIMAccount | nvarchar(63) null | |
| CompanySize | int default -1 null, /-1: unknown/ | |
| CompanyUrl | nvarchar(255) null | |
| ID | nvarchar(15) null | |
| RefID | nvarchar(255) null | |
| Account | nvarchar(63) null | |
| Invoice | nvarchar(31) null | |
| Url | nvarchar(255) null | |
| Income | int default -1 null, /-1: unknown/ | |
| Marriage | smallint default -1 null, /-1: unknown 0: single 1: Married 2: divorced/ | |
| Education | smallint default -1 null, /-1: unknown 0: cannot read 1: can read 2: primary schedule 3: jR high 4: Senior High 5: College 6: BA 7: MA 8: Phd 9: other/ | |
| Duty | smallint default -1 null, /-1: unknown 1: engineer 2: marketing../ | |
| Position | smallint default -1 null, /-1: unknown 1: assistant 2: Staff../ | |
| Family | smallint default -1 null, /-1: unknown/ | |
| Profession | smallint default 0 null | |
| Gender | smallint default -1 null, /-1 unknown 0: Male 1: Female 2: company account/ | |
| Religion | smallint default -1 null | |
| YearOfBirth | smallint default 0 null | |
| MonthOfBirth | smallint default 0 null | |
| DayOfBirth | smallint default 0 null | |
| Height | smallint default -1 null, /-1 unknown/ | |
| Weight | smallint default -1 null, /-1 unknown/ | |
| BloodType | smallint default -1 null, /-1 unknown/ | |
| Nationality | nvarchar(63) null | |
| StorageRoot | nvarchar(127) null | |
| StorageFolder | nvarchar(63) null | |
| AuthenticateType | smallint default 1 null | |
| EncryptionType | smallint default 0 null | |
| LoginName | nvarchar(63) null, /have to be unique/ | |
| Password | nvarchar(127) null | |
| PassPrompt | nvarchar(63) null | |
| PassAnswer | nvarchar(63) null | |
| LastLoginIP | nvarchar(15) null | |
| RegisterIP | nvarchar(15) null | Cannot be modified |
| LastLoginTime | dateTime null | |
| OptInTime | dateTime null | |
| OptOutTime | dateTime null | |
| LastUpdateTime | dateTime null | |
| ExpireTime | dateTime null | |
| RegisterTime | dateTime default getdate() null | Cannot be modified |
| Flag | smallint default 1 null |
Code examples
Send a single email via URL
Example 1
https://api.itpison.com/WebAPI/Email.aspx?ManagerLoginName=API_account&ManagerPassword=API_password&Subject=enter subject here&EmailList=enter recipient email here&Content=enter email content here
Example 2
https://api.itpison.com/WebAPI/Email.aspx?ManagerLoginName=API_account&ManagerPassword=API_password&Subject=enter subject here&EmailURL=enter recipient URL here&ContentURL=enter email content URL here
HTML Code example: schedule a time to send email
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Email.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="Enter account"/>
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="Enter password"/>
</p>
<p>Email subject: <input name="Subject" type="text" id="Subject"/></p>
<p>Recipient email: <input name="EmailList" type="text" id="EmailList"/> (separate multiple recipients with a comma ",")</p>
<p>Recipient email: <input name="EmailListFile" type="file" id="EmailListFile"/></p>
<p>Recipient (newsletter group): <input name="EmailListNewsLetterID" type="text" id="EmailListNewsLetterID"/> (use CSV format for multiple IDs, e.g. 33,56,74)</p>
<p>Email content: <input type="file" name="HtmlEmailContentFile" id="HtmlEmailContentFile"/> (allowed file formats: htm,txt,rar,zip,7z,img,(.doc File Depend On Server))</p>
<p>Scheduled time: <input name="StartTime" type="text" id="StartTime" value=""/> (time format yyyy-MM-dd HH:mm:ss)</p>
<p>OMICard system generates report: <input type="text" name="AutoGenerateReport" id="AutoGenerateReport" value=""/> (enter: True)</p>
<p><input name="Submit" type="submit" value="Send"/></p>
</form>
HTML Code example: convert attachment to download link & track attachment link
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Email.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="Enter account"/>
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="Enter password"/>
</p>
<p>Email subject: <input name="Subject" type="text" id="Subject"/></p>
<p>Recipient email: <input name="EmailList" type="text" id="EmailList"/> (separate multiple recipients with a comma ",")</p>
<p>Recipient email: <input name="EmailListFile" type="file" id="EmailListFile"/></p>
<p>Recipient (newsletter group): <input name="EmailListNewsLetterID" type="text" id="EmailListNewsLetterID"/> (separate multiple newsletter groups with a comma ",", e.g. 33,56,74)</p>
<p>Email content: <input type="file" name="HtmlEmailContentFile" id="HtmlEmailContentFile"/> (allowed file formats: htm,txt,rar,zip,7z,img,(.doc File Depend On Server))</p>
<p>Attachment: <input type="file" name="Attachment" id="Attachment"/></p>
<p>Download link prompt name: <input name="AttachmentLinkName" type="text" id="AttachmentLinkName"/> (set the download link prompt name, default: download attachment)</p>
<p>Download link display position: <input name="LinkPosition" type="text" id="LinkPosition" value=""/> (0: top-left, 1: top (default), 2: top-right, 3: bottom-left, 4: bottom, 5: bottom-right)</p>
<p>Track attachment link: <input name="TrackAttacmentLink" type="text" id="TrackAttacmentLink" value=""/> (enter: True)</p>
<p>OMICard system generates report: <input type="text" name="AutoGenerateReport" id="AutoGenerateReport" value=""/> (enter: True)</p>
<p><input name="Submit" type="submit" value="Send"/></p>
</form>
HTML Code example: send personalized email (subject, content, and attachment content differ per list entry), and convert the attachment to encrypted PDF
The solution is to upload EmailListFile, HtmlEmailContentFile, and MergePDFAttachment via PostFile and let the Server handle them. Prepare the List.txt, Content.txt, and Attachment.txt attachment files.
- First, create a list (CSV or TXT file). The list must have a header and contain the names of the fields to be merged.
- Use Word to create the attachment file; the fields marked in red must match (including case) the field names to be merged in EXCEL (or TXT). For fields to be merged, enter
%field name%(case must match exactly). - Email content:
Dear %Name%, Please find the seating for the Little Star charity gala in the attachment (the password is your ID card password). - Email subject:
Dear %Name%, you are invited to the Little Star charity gala
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Email.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="Enter account"/>
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="Enter password"/>
</p>
<p>Email subject: <input name="Subject" type="text" id="Subject"/></p>
<p>Recipient email: <input name="EmailList" type="text" id="EmailList"/> (separate multiple recipients with a comma ",")</p>
<p>Recipient email: <input name="EmailListFile" type="file" id="EmailListFile"/></p>
<p>Recipient (newsletter group): <input name="EmailListNewsLetterID" type="text" id="EmailListNewsLetterID"/> (separate multiple newsletter groups with a comma ",", e.g. 33,56,74)</p>
<p>Email content: <input type="file" name="HtmlEmailContentFile" id="HtmlEmailContentFile"/> (allowed file formats: htm,txt,rar,zip,7z,img,(.doc File Depend On Server))</p>
<p>Convert attachment to PDF and encrypt: <input type="file" name="MergePDFAttachment" id="MergePDFAttachment"/> (Excel to PDF is not currently supported)</p>
<p>OMICard system generates report: <input type="text" name="AutoGenerateReport" id="AutoGenerateReport" value=""/> (enter: True)</p>
<p><input name="Submit" type="submit" value="Send"/></p>
</form>
After opening the attachment, the password must be entered to view it.
PHP Code: send email
<?php
$url='https://api.itpison.com/WebAPI/Email.aspx';
$postdata=array(
'ManagerLoginName'=>'API_account',
'ManagerPassword'=>'API_password',
'Subject'=>'subject',
'EmailList'=>'recipient email',
'Content'=>'email content'
);
$opts=array(
'http'=>array(
'method'=>'POST',
'header'=>'Content-type:application/x-www-form-urlencoded',
'content'=>http_build_query($postdata)
)
);
$context=stream_context_create($opts);
$result=file_get_contents($url,false,$context);
if($result===FALSE){/*Handleerror*/}
var_dump($result);
?>
When the API is called using POST with ContentType of "application/x-www-form-urlencoded", then among the parameters passed in:
- If they contain URL reserved characters (e.g. &), and the programming language used does not perform URL encoding automatically when passing parameters, you must URL-encode (urlencode) them first.
- See Wikipedia for reference: https://en.wikipedia.org/wiki/Percent-encoding
HTML Code example: after the task is sent, send the report to a specified mailbox at a specified time
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Email.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API_account"/>
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API_password"/>
</p>
<p>Email subject: <input name="Subject" type="text" id="Subject"/></p>
<p>Recipient email: <input name="EmailList" type="text" id="EmailList"/> (separate multiple recipients with a comma ",")</p>
<p>Recipient email: <input name="EmailListFile" type="file" id="EmailListFile"/></p>
<p>Recipient (newsletter group): <input name="EmailListNewsLetterID" type="text" id="EmailListNewsLetterID"/> (use CSV format for multiple IDs, e.g. 33,56,74)</p>
<p>Email content: <input type="file" name="HtmlEmailContentFile" id="HtmlEmailContentFile"/> (allowed file formats: htm,txt,rar,zip,7z,img,(.doc File Depend On Server))</p>
<p>OMICard system generates report: <input type="text" name="AutoGenerateReport" id="AutoGenerateReport" value=""/> (enter: True)</p>
<p>Report recipient list: <input name="DispatchList" type="text" id="DispatchList" value=""/> (if multiple email addresses, the separator is a comma ",")</p>
<p>Report send start time: <input name="DispatchStartTime" type="text" id="DispatchStartTime" /> (time format yyyy-MM-dd HH:mm:ss)</p>
<p>Report send count: <input name="DispatchCount" type="text" id="DispatchCount" value=""/> (default 1 time)</p>
<p>Report send interval: <input name="DispatchInterval" type="text" id="DispatchInterval" value=""/> (default 1440 minutes (1 day))</p>
<p><input name="Submit" type="submit" value="Send"/></p>
</form>
HTML Code example: image as email content, clicking the image links to a specified URL
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Email.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API_account"/>
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API_password"/>
</p>
<p>Email subject: <input name="Subject" type="text" id="Subject"/></p>
<p>Recipient email: <input name="EmailList" type="text" id="EmailList"/> (separate multiple recipients with a comma ",")</p>
<p>Recipient email: <input name="EmailListFile" type="file" id="EmailListFile"/></p>
<p>Recipient (newsletter group): <input name="EmailListNewsLetterID" type="text" id="EmailListNewsLetterID"/> (use CSV format for multiple IDs, e.g. 33,56,74)</p>
<p>Email content: <input type="file" name="HtmlEmailContentFile" id="HtmlEmailContentFile"/> (for this example, upload an image file for it to take effect)</p>
<p>ImageURL: <input name="ImageURL" type="text" id="ImageURL"/> (e.g. https://www.itpison.com)</p>
<p>OMICard system generates report: <input type="text" name="AutoGenerateReport" id="AutoGenerateReport" value=""/> (enter: True)</p>
<p><input name="Submit" type="submit" value="Send"/></p>
</form>
HTML Code example: merchant offers a limited-quantity coupon (with deadline and count); when the customer opens the EDM, the system automatically sends the coupon
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Email.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API_account"/>
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API_password"/>
<input name="TriggerV" type="hidden" id="TriggerV" value="1"/>
<input name="TriggerType" type="hidden" id="TriggerType" value="20000"/>
</p>
<p>Email subject: <input name="Subject" type="text" id="Subject"/></p>
<p>Recipient email: <input name="EmailList" type="text" id="EmailList"/> (separate multiple recipients with a comma ",")</p>
<p>Recipient email: <input name="EmailListFile" type="file" id="EmailListFile"/></p>
<p>Recipient (newsletter group): <input name="EmailListNewsLetterID" type="text" id="EmailListNewsLetterID"/> (use CSV format for multiple IDs, e.g. 33,56,74)</p>
<p>Email content: <input type="file" name="HtmlEmailContentFile" id="HtmlEmailContentFile"/> (allowed file formats: htm,txt,rar,zip,7z,img,(.doc File Depend On Server))</p>
<p>OMICard system generates report: <input type="text" name="AutoGenerateReport" id="AutoGenerateReport" value=""/> (enter: True)</p>
-----------------(after the email is opened, the system automatically sends the coupon)-----------------
<p>Coupon email subject: <input name="TriggerSubject" type="text" id="TriggerSubject" value=""/></p>
<p>Coupon email content: <input type="file" name="TriggerHtmlEmailContentFile" id="TriggerHtmlEmailContentFile"/></p>
<p>Total coupon send count: <input name="MaxCount" type="text" id="MaxCount" value=""/> (enter a positive integer, default: no limit)</p>
<p>Max coupons per email: <input name="MaxCountPerEmail" type="text" id="MaxCountPerEmail" value=""/> (enter a positive integer, default: 1)</p>
<p>Coupon collection deadline: <input name="LaunchExpireTime" type="text" id="LaunchExpireTime" value=""/> (deadline format yyyy-MM-dd HH:mm:ss)</p>
<p><input name="Submit" type="submit" value="Send"/></p>
</form>
HTML Code example: merchant offers a limited-quantity coupon (with deadline and count); when the customer clicks an EDM link, the system automatically sends the coupon
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Email.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API_account"/>
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API_password"/>
<input name="TriggerV" type="hidden" id="TriggerV" value="1"/>
<input name="TriggerType" type="hidden" id="TriggerType" value="20001"/>
</p>
<p>Email subject: <input name="Subject" type="text" id="Subject"/></p>
<p>Recipient email: <input name="EmailList" type="text" id="EmailList"/> (separate multiple recipients with a comma ",")</p>
<p>Recipient email: <input name="EmailListFile" type="file" id="EmailListFile"/></p>
<p>Recipient (newsletter group): <input name="EmailListNewsLetterID" type="text" id="EmailListNewsLetterID"/> (use CSV format for multiple IDs, e.g. 33,56,74)</p>
<p>Email content: <input type="file" name="HtmlEmailContentFile" id="HtmlEmailContentFile"/> (allowed file formats: htm,txt,rar,zip,7z,img,(.doc File Depend On Server))</p>
<p>OMICard system generates report: <input type="text" name="AutoGenerateReport" id="AutoGenerateReport" value=""/> (enter: True)</p>
-----------------(after the EDM link is clicked, the system automatically sends the coupon)-----------------
<p>Coupon email subject: <input name="TriggerSubject" type="text" id="TriggerSubject" value=""/></p>
<p>Coupon email content: <input type="file" name="TriggerHtmlEmailContentFile" id="TriggerHtmlEmailContentFile"/></p>
<p>Total coupon send count: <input name="MaxCount" type="text" id="MaxCount" value=""/> (enter a positive integer, default: no limit)</p>
<p>Max coupons per email: <input name="MaxCountPerEmail" type="text" id="MaxCountPerEmail" value=""/> (enter a positive integer, default: 1)</p>
<p>Coupon collection deadline: <input name="LaunchExpireTime" type="text" id="LaunchExpireTime" value=""/> (deadline format yyyy-MM-dd HH:mm:ss)</p>
<p><input name="Submit" type="submit" value="Send"/></p>
</form>
HTML Code example: embed a subscribe link in the EDM
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Email.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="Enter account"/>
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="Enter password"/>
</p>
<p>Email subject: <input name="Subject" type="text" id="Subject" value=""/></p>
<p>Recipient email: <input name="EmailList" type="text" id="EmailList"/> (separate multiple recipients with a comma ",")</p>
<p>Recipient email: <input name="EmailListFile" type="file" id="EmailListFile"/></p>
<p>Recipient (newsletter group): <input name="EmailListNewsLetterID" type="text" id="EmailListNewsLetterID"/> (separate multiple newsletter groups with a comma ",", e.g. 33,56,74)</p>
<p>Email content: <input type="file" name="HtmlEmailContentFile" id="HtmlEmailContentFile"/> (allowed file formats: htm,txt,rar,zip,7z,img,(.doc File Depend On Server))</p>
<p>Subscribe: <input name="LinkType" type="text" id="LinkType" readonly value="5"/> (5: indicates subscribe)</p>
<p>Subscribe newsletter group: <input name="SubscribeNewsLetterID" type="text" id="SubscribeNewsLetterID" value=""/> (separate multiple newsletter groups with a comma ",", e.g. 33,56,74)</p>
<p>Selected item: <input name="LinkOption" type="text" id="LinkOption" value=""/> (1: this email task (default), 2: forward, 3: this email task and forward)</p> <!-- allow -->
<p>Subscribe link position: <input name="LinkPosition" type="text" id="LinkPosition" value=""/> (0: top-left, 1: top (default), 2: top-right, 3: bottom-left, 4: bottom, 5: bottom-right)</p>
<p>Subscribe link prompt text: <input name="Prompt" type="text" id="Prompt" value=" "/> (e.g. "Click here to subscribe to the newsletter", default: Subscribe it)</p>
<p>OMICard system generates report: <input type="text" name="AutoGenerateReport" id="AutoGenerateReport" value=""/> (enter: True)</p>
<p><input name="Submit" type="submit" value="Send"/></p>
</form>
HTML Code example: embed an unsubscribe link in the EDM
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Email.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="Enter account"/>
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="Enter password"/>
</p>
<p>Email subject: <input name="Subject" type="text" id="Subject" value=""/></p>
<p>Recipient email: <input name="EmailList" type="text" id="EmailList"/> (separate multiple recipients with a comma ",")</p>
<p>Recipient email: <input name="EmailListFile" type="file" id="EmailListFile"/></p>
<p>Recipient (newsletter group): <input name="EmailListNewsLetterID" type="text" id="EmailListNewsLetterID"/> (separate multiple newsletter groups with a comma ",", e.g. 33,56,74)</p>
<p>Email content: <input type="file" name="HtmlEmailContentFile" id="HtmlEmailContentFile"/> (allowed file formats: htm,txt,rar,zip,7z,img,(.doc File Depend On Server))</p>
<p>Unsubscribe: <input name="LinkType" type="text" id="LinkType" readonly value="4"/> (4: indicates unsubscribe)</p>
<p>Unsubscribe newsletter group: <input name="UnsubscribeNewsLetterID" type="text" id="UnsubscribeNewsLetterID" value=""/> (separate multiple newsletter groups with a comma ",", e.g. 33,56,74)</p>
<p>Selected item: <input name="LinkOption" type="text" id="LinkOption" value=""/> (1: this email task (default), 2: forward, 3: this email task and forward)</p> <!-- allow -->
<p>Unsubscribe link position: <input name="LinkPosition" type="text" id="LinkPosition" value=""/> (0: top-left, 1: top (default), 2: top-right, 3: bottom-left, 4: bottom, 5: bottom-right)</p>
<p>Unsubscribe link prompt text: <input name="Prompt" type="text" id="Prompt" value=""/> (e.g. "Click here to unsubscribe from the newsletter", default: Unsubscribe it)</p>
<p>OMICard system generates report: <input type="text" name="AutoGenerateReport" id="AutoGenerateReport" value=""/> (enter: True)</p>
<p><input name="Submit" type="submit" value="Send"/></p>
</form>
HTML Code example: report notification (open, any click)
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Email.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API_account"/>
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API_password"/>
<input name="TriggerOpenClick" type="hidden" id=" TriggerOpenClick" value="1"/>
</p>
<p>Email subject: <input name="Subject" type="text" id="Subject" value=""/></p>
<p>Recipient email: <input name="EmailListFile" type="file" id="EmailListFile"/></p>
<p>Upload email content file: <input type="file" name="HtmlEmailContentFile" id="HtmlEmailContentFile"/></p>
<p>Notification reason: <input name="TriggerType" type="text" id="TriggerType" value=""/> (20000: open, 20001: any click)</p>
<p>Notification count: <input name="MaxCountPerEmail" type="text" id="MaxCountPerEmail" value=""/></p>
<p>Notification method: <input name="ActionType" type="text" id="ActionType" value=""/> (2: Email)</p>
<p>Notification mailbox: <input name="ActionParameterStr" type="text" id="ActionParameterStr" value=" "/></p>
<p><input name="Submit" type="submit" value="Send"/></p>
</form>
HTML Code example: pause sending
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Email.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API_account"/>
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API_password"/></p>
</p>
<p>Email subject: <input name="Subject" type="text" id="Subject" value=""/></p>
<p>Recipient email: <input name="EmailListFile" type="file" id="EmailListFile"/></p>
<p>Upload email content file: <input type="file" name="HtmlEmailContentFile" id="HtmlEmailContentFile"/></p>
<p>Pause start time: <input name="BeginPendTime" type="text" id="BeginPendTime" value=""/> (format: hh:mm)</p>
<p>Pause end time: <input name="EndPendTime" type="text" id="EndPendTime" value=""/> (format: hh:mm)</p>
<p><input name="Submit" type="submit" value="Send"/></p>
</form>
Customer
Call URLs
- Call URL:
https://api.itpison.com/WebAPI/Customer.aspx
HTTP method: GET or POST (determined by Web.config). Auth: ManagerLoginName (API account) + ManagerPassword (API password). Shared outline conventions (Unicode encoding; XML/CSV/file-download return modes; ReferUrl/SuccessfulUrl/FailedUrl redirects and merge keywords; document conventions) are described in Request and response formats.
Functions overview
This endpoint is selected via the Option parameter:
| Option | Function |
|---|---|
| 1 | Add customer data (Add member) |
| 2 | Delete customer data (Delete member) |
| 3 | Modify customer data (Modify member) |
| 4 | Query customer data (Query member) |
| 5 | Import customer data (Import members) |
| 6 | Browse import customer data records |
| 1000 | Browse the database comparison field names and IDs |
Returned ErrorCode list
| Code | ErrorMsg | Description |
|---|---|---|
| 100 | Exception | Exception |
| 102 | Incorrect Request | Incorrect request |
| 110 | Error Option | Invalid Option |
| 111 | CustomerID or EmailAddress or SMSNumber is not found | CustomerID or EmailAddress not found |
| 112 | CustomerListFile or CustomerListUrl not found | CustomerListFile or CustomerListUrl not found |
| 113 | GroupID is not exist | GroupID does not exist |
| 114 | NewsLetterID is not exist | NewsLetterID does not exist |
| 115 | ImportID is not exist | ImportID does not exist |
| 116 | EmailAddress is not valid | EmailAddress is not valid |
| 117 | Customer is not found | Customer not found |
| 118 | Please key in EmailAddress or SMSNumber | Please enter EmailAddress |
| 119 | The Customer is already exist | The customer already exists |
| 120 | The EmailAddress is already exist | The EmailAddress already exists |
| 1000 | No Licence at Page | No license for this page |
Customer — Add member (Option 1)
Purpose: Add new customer data.
Required fields: ManagerLoginName, ManagerPassword, Option=1, and EmailAddress.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API account |
ManagerPassword |
string | Yes | API password |
Option |
int | Yes | Set to 1 |
EmailAddress |
string | Yes | Email address |
GroupID |
string | No | Tag |
NewsLetterID |
string | No | Newsletter group |
To add the customer to multiple tags or newsletter groups at once, separate the IDs with commas, e.g. 1,2,5.
Customer — Delete member (Option 2)
Purpose: Delete customer data.
Required fields: ManagerLoginName, ManagerPassword, Option=2, and CustomerID or EmailAddress.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API account |
ManagerPassword |
string | Yes | API password |
Option |
int | Yes | Set to 2 |
CustomerID |
int | Conditional | Customer number. One of CustomerID / EmailAddress is required. |
EmailAddress |
string | Conditional | Email address. One of CustomerID / EmailAddress is required. |
Priority order: CustomerID > EmailAddress.
If the customer is in any tag or newsletter group, the associations between them are removed.
Customer — Modify member (Option 3)
Purpose: Modify customer data.
Required fields: ManagerLoginName, ManagerPassword, Option=3, and CustomerID or EmailAddress.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API account |
ManagerPassword |
string | Yes | API password |
Option |
int | Yes | Set to 3 |
CustomerID |
int | Conditional | Customer number. One of CustomerID / EmailAddress is required (used to identify the record). |
EmailAddress |
string | Conditional | Email address. One of CustomerID / EmailAddress is required (used to identify the record). |
NewName |
string | No | New customer name |
NewEmailAddress |
string | No | New email address |
NewsLetterID |
string | No | New newsletter group |
GroupID |
string | No | New tag |
Priority order: CustomerID > EmailAddress.
If the tag is modified, the original tag is cleared and replaced with the new tag.
If the newsletter group is modified, the original newsletter group is cleared and replaced with the new one.
Use NewName to modify Name, NewEmailAddress to modify EmailAddress.
Customer — Query member (Option 4)
Purpose: Query customer data.
Required fields: ManagerLoginName, ManagerPassword, Option=4, and CustomerID or EmailAddress.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API account |
ManagerPassword |
string | Yes | API password |
Option |
int | Yes | Set to 4 |
CustomerID |
int | Conditional | Customer number. One of CustomerID / EmailAddress is required. |
EmailAddress |
string | Conditional | Email address. One of CustomerID / EmailAddress is required. |
Priority order: CustomerID > EmailAddress.
In addition to listing the CustomerInfo content, the response also lists Group tag data, CustomerSubscribeInfo subscription data, and CustomerUnsubscribeInfo unsubscribe data.
Customer — Import members (Option 5)
Purpose: Import customer data.
Required fields: ManagerLoginName, ManagerPassword, Option=5, and CustomerListFile or CustomerListUrl.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API account |
ManagerPassword |
string | Yes | API password |
Option |
int | Yes | Set to 5 |
CustomerListFile |
[PostedFile] | Conditional | Upload customer list from a file. CustomerListFile or CustomerListUrl is required. |
CustomerListUrl |
string | Conditional | Import customer list from a remote URL. CustomerListFile or CustomerListUrl is required. |
ImportName |
string | No | Import name |
ImportDBOption |
int | No | See Note 1. Must be used together with CompareDBOption. |
CompareDBOption |
int | No | See Note 2. Must be used together with ImportDBOption. |
ImportNewCustomerGroupID |
string | No | Add the newly added customer data to the specified tag(s); separate IDs with commas, e.g. 1,2,5. |
ImportNewCustomerNewsLetterID |
string | No | Add the newly added customer data to newsletter group(s); separate IDs with commas, e.g. 0,2,5. |
CompareDBField |
string | No | Field(s) to deduplicate when importing into the database; separate with commas, e.g. 1,5,6 (Note 3). |
CompareDBFieldName |
string | No | Field name(s) to deduplicate when importing into the database; separate with commas, e.g. EmailAddress,Name (Note 3). |
Use at most one of CompareDBField or CompareDBFieldName.
ImportDBOption must be used together with CompareDBOption.
Customer — Browse import records (Option 6)
Purpose: Browse customer data import records.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API account |
ManagerPassword |
string | Yes | API password |
Option |
int | Yes | Set to 6 |
ImportID |
int | No | Import record number |
If ImportID is set, the customer import data for that ImportID is listed.
If ImportID is not set, all customer import data for that account is listed.
Customer — Browse DB comparison field names and IDs (Option 1000)
Purpose: Browse the database comparison field names and their IDs (the CompareDBField / CompareDBFieldName mapping in Note 3).
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API account |
ManagerPassword |
string | Yes | API password |
Option |
int | Yes | Set to 1000 |
Customer — Notes
Note 1: ImportDBOption
ImportDBOption must be used together with CompareDBOption.
| Value | Description |
|---|---|
| 1 | Add the new list to a general tag |
| 2 | Add the new list to a subscribed newsletter group |
| 4 | Add the new list to an unsubscribed newsletter group |
| 8 | Add DB-matched customer records to a general tag |
| 16 | Add DB-matched customer records to a subscribed newsletter group |
| 32 | Add DB-matched customer records to an unsubscribed newsletter group |
| 64 | Remove the association of DB-matched customer records from a general tag |
| 128 | Remove the association of DB-matched customer records from a subscribed newsletter group |
| 256 | Remove the association of DB-matched customer records from an unsubscribed newsletter group |
| 512 | Do not ignore blank fields during DB comparison (the default is to ignore blank fields) |
| 1024 | Use OR for all DB comparison conditions (the default is AND) |
| 2048 | Before deleting all customer (tag, subscribe, or unsubscribe) associations, first delete the old customer's CustomerInfo data |
| 4096 | First delete all customer data associations from the general tag |
| 8192 | First delete all customer data associations from the subscribed newsletter group |
| 16384 | First delete all customer data associations from the unsubscribed newsletter group |
Values 2, 2048, 4096, 8192, and 16384 can be used simultaneously to delete the specified newsletter group, tag, and contacts, then import the new contact list and add it to the newsletter group and group data.
Note 2: CompareDBOption
CompareDBOption must be used together with ImportDBOption.
| Value | Description |
|---|---|
| 0 | No comparison (all lists treated as new) |
| 1 | Compare only, no action (no add, no update) |
| 2 | Update duplicates only (matches) |
| 3 | Delete duplicates only (matches) |
| 4 | Add non-duplicates only (no match) |
| 5 | Add non-duplicates (no match) and update duplicates (match) |
| 6 | Add non-duplicates (no match) and delete duplicates (match) |
Note 3: CompareDBField / CompareDBFieldName
CompareDBField is the database comparison field on import (compares the uploaded list fields against the database field names). CompareDBFieldName may be used instead.
CompareDBField |
CompareDBFieldName |
|---|---|
| 1 | Name |
| 2 | Firstname |
| 3 | Middlename |
| 4 | Lastname |
| 5 | EmailAddress |
| 6 | SMSNumber |
| 7 | FaxNumber |
| 8 | PhoneNumber |
| 9 | Gender |
| 10 | ContactPerson |
| 11 | Company |
| 12 | ID |
| 13 | Invoice |
| 14 | Url |
| 15 | ZipCode |
| 16 | State |
| 17 | City |
| 18 | District |
| 19 | Address |
| 20 | Score |
| 21 | ValidScore |
| 22 | Grade |
| 23 | Nickname |
| 24 | ExternRefNum |
| 25 | CountryCode |
| 26 | Country |
| 27 | IMType |
| 28 | IMAccount |
| 29 | ContactCountryCode |
| 30 | ContactCountry |
| 31 | ContactState |
| 32 | ContactCity |
| 33 | ContactDistrict |
| 34 | ContactZipCode |
| 35 | ContactAddress |
| 36 | ContactEmailAddress |
| 37 | ContactSMSNumber |
| 38 | ContactFaxNumber |
| 39 | ContactPhoneNumber |
| 40 | ContactIMType |
| 41 | ContactIMAccount |
| 42 | CompanyCountryCode |
| 43 | CompanyCountry |
| 44 | CompanyState |
| 45 | CompanyCity |
| 46 | CompanyDistrict |
| 47 | CompanyZipCode |
| 48 | CompanyAddress |
| 49 | CompanyEmailAddress |
| 50 | CompanySMSNumber |
| 51 | CompanyFaxNumber |
| 52 | CompanyPhoneNumber |
| 53 | CompanyIMType |
| 54 | CompanyIMAccount |
| 55 | CompanyUrl |
| 56 | RefID |
| 57 | Account |
| 58 | InvoiceTitle |
| 59 | Income |
| 60 | Marriage |
| 61 | Education |
| 62 | Duty |
| 63 | Position |
| 64 | Family |
| 65 | Profession |
| 66 | Religion |
| 67 | YearOfBirth |
| 68 | MonthOfBirth |
| 69 | DayOfBirth |
| 70 | Height |
| 71 | Weight |
| 72 | BloodType |
| 73 | Nationality |
| 74 | Department |
| 75 | PositionName |
| 76 | ProfessionName |
| 77 | IMType2 |
| 78 | IMAccount2 |
| 79 | IMType3 |
| 80 | IMAccount3 |
| 81 | TaxID |
| 82 | CompanySize |
| 10000 | Birthday |
| 10001 | Age |
For the full OMICard CustomerInfo schema, see Appendix 2: OMICard CustomerInfo column names under the WebAPI Email section.
Customer — Code examples
Add member via URL
https://api.itpison.com/WebAPI/Customer.aspx?ManagerLoginName=API account&ManagerPassword=API password&Option=1&EmailAddress=member email
HTML form — Add member
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Customer.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
<input name="Option" type="hidden" id="Option" value="1" />
</p>
<p>Name: <input name="Name" type="text" id="Name" value=""/></p>
<p>Email: <input name="EmailAddress" type="text" id="EmailAddress" value=""/></p>
<p>Newsletter group ID: <input name="NewsLetterID" type="text" id="NewsLetterID" value=""/></p><!--Separate multiple newsletter groups with commas (,)-->
<p>Tag ID: <input name="GroupID" type="text" id="GroupID" value=""/></p><!--Separate multiple tag IDs with commas (,)-->
<p><input name="Submit" type="submit" value="Add" /></p>
</form>
HTML form — Delete member
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Customer.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
<input name="Option" type="hidden" id="Option" value="2" />
</p>
<p>CustomerID: <input name="CustomerID" type="text" id="CustomerID" value=""/></p>
<p>Email: <input name="EmailAddress" type="text" id="EmailAddress" value=""/></p>
<p><input name="Submit" type="submit" value="Delete" /></p>
</form>
HTML form — Modify member
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Customer.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
<input name="Option" type="hidden" id="Option" value="3" />
</p>
<p>CustomerID: <input name="CustomerID" type="text" id="CustomerID" value=""/></p>
<p>Email: <input name="EmailAddress" type="text" id="EmailAddress" value=""/></p>
<p>New customer name: <input name="NewName" type="text" id="NewName" value=""/></p>
<p>New email: <input name="NewEmailAddress" type="text" id="NewEmailAddress" value=""/></p>
<p>New newsletter group: <input name="NewsLetterID" type="text" id="NewsLetterID" value=""/></p><!--Separate multiple newsletter groups with commas (,)-->
<p>New tag: <input name="GroupID" type="text" id="GroupID" value=""/></p><!--Separate multiple tag IDs with commas (,)-->
<p><input name="Submit" type="submit" value="Modify" /></p>
</form>
HTML form — Query member
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Customer.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
<input name="Option" type="hidden" id="Option" value="4" />
</p>
<p>CustomerID: <input name="CustomerID" type="text" id="CustomerID" value=""/></p>
<p>Email: <input name="EmailAddress" type="text" id="EmailAddress" value=""/></p>
<p><input name="Submit" type="submit" value="Query" /></p>
</form>
HTML form — Import members
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Customer.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
<input name="Option" type="hidden" id="Option" value="5" />
</p>
<p>ImportName: <input name="ImportName" type="text" id="ImportName" value=""/></p>
<p>Upload file: <input name="CustomerListFile" type="file" id="CustomerListFile" value=""/></p>
<p>Remote URL: <input name="CustomerListUrl" type="text" id="CustomerListUrl" value=" "/></p>
<p>Newsletter group: <input name="ImportNewCustomerNewsLetterID" type="text" id="ImportNewCustomerNewsLetterID" value=""/></p>
<!--Separate multiple newsletter groups with commas (,)-->
<p>Tag: <input name="ImportNewCustomerGroupID" type="text" id="ImportNewCustomerGroupID" value=""/></p>
<!--Separate multiple tag IDs with commas (,)-->
<p>ImportDBOption: <input name="ImportDBOption" type="text" id="ImportDBOption" value=""/></p>
<p>CompareDBOption: <input name="CompareDBOption" type="text" id="CompareDBOption" value=""/></p>
<p>CompareDBField: <input name="CompareDBField" type="text" id="CompareDBField" value=""/></p>
<!--Field(s) to deduplicate when importing into the database-->
<p><input name="Submit" type="submit" value="Import" /></p>
</form>
HTML form — Browse import records
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Customer.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
<input name="Option" type="hidden" id="Option" value="6" />
</p>
<p>ImportID: <input name="ImportID" type="text" id="ImportID" value=""/></p>
<!-- Note: If not entered, searches all ImportIDs for this account -->
<p><input name="Submit" type="submit" value="Browse" /></p>
</form>
HTML form — Browse DB comparison field names and IDs
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Customer.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
<input name="Option" type="hidden" id="Option" value="1000" />
</p>
<p><input name="Submit" type="submit" value="Browse" /></p>
</form>
PHP — Add member
<?php
$url = 'https://api.itpison.com/WebAPI/Customer.aspx';
$postdata = array(
'ManagerLoginName' => 'API account',
'ManagerPassword' => 'API password',
'Option' => '1',
'Name' => 'customer name',
'NewsLetterID' => 'newsletter group', //Separate multiple NewsLetterID with commas (,)
'GroupID' => 'tag', //Separate multiple GroupID with commas (,)
'EmailAddress' => 'email address' );
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($postdata)
)
);
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }
var_dump($result);
?>
PHP — Modify member
<?php
$url = 'https://api.itpison.com/WebAPI/Customer.aspx';
$postdata = array(
'ManagerLoginName' => 'API account',
'ManagerPassword' => 'API password',
'Option' => '3',
'EmailAddress' => 'email before modification',
'NewEmailAddress' => 'email after modification' );
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($postdata)
)
);
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }
var_dump($result);
?>
Group
Endpoint: Groups.aspx
Call URL: https://api.itpison.com/WebAPI/Groups.aspx
HTTP method: GET or POST (determined by Web.config)
Authentication: ManagerLoginName (API admin account) + ManagerPassword (API admin password)
Shared outline conventions (Unicode encoding; XML/CSV/file-download return modes; ReferUrl/SuccessfulUrl/FailedUrl redirects and merge keywords; document conventions) are described in Request and response formats.
Function (Option setting)
| Option | Function |
|---|---|
| 1 | Add tag |
| 2 | Delete tag |
| 3 | Modify tag |
| 100 | Clear all lists in tag |
ErrorCode return messages
| Code | ErrorMsg | Description |
|---|---|---|
| 100 | Exception | Exception |
| 102 | Incorrect Request | Incorrect request |
| 110 | Error Option | Invalid Option value |
| 111 | Duplicate GroupName | GroupName already exists |
| 112 | Create Group Failed | Failed to create the tag/group |
| 113 | GroupName isn't exist | GroupName does not exist |
| 115 | GroupID isn't exist | GroupID does not exist |
| 116 | JobType isn't correct | JobType is not correct |
| 117 | GroupClass isn't correct | GroupClass is not correct |
| 1000 | No Licence at Page | No licence for this page |
Group — Add tag (Option 1)
Purpose: Create a new tag (group).
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API admin account |
ManagerPassword |
string | Yes | API admin password |
Option |
int | Yes | 1 |
JobType |
int | Yes | Job type. Use 2 (email). |
GroupName |
string | Yes | Tag name |
GroupClass |
int | No | 0: general tag, 1: blacklist tag, 2: whitelist tag |
Description |
string | No | Notes |
Return values: ERRORCODE (0: success, 100: failure); ERRORMSG (processing message; empty when ERRORCODE is 0); GROUPID (tag ID).
Group — Delete tag (Option 2)
Purpose: Delete a tag.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API admin account |
ManagerPassword |
string | Yes | API admin password |
Option |
int | Yes | 2 |
GroupName |
string | Conditional | Tag name (supply GroupName or GroupID) |
GroupID |
string | Conditional | Tag ID (supply GroupName or GroupID) |
Return values: ERRORCODE (0: success, 100: failure); ERRORMSG.
Group — Modify tag (Option 3)
Purpose: Modify a tag. Use NewGroupName to change GroupName, and Description to change the description.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API admin account |
ManagerPassword |
string | Yes | API admin password |
Option |
int | Yes | 3 |
GroupName |
string | Conditional | Tag name (supply GroupName or GroupID) |
GroupID |
string | Conditional | Tag ID (supply GroupName or GroupID) |
JobType |
int | Yes | Job type. Use 2 (email). |
NewGroupName |
string | No | New tag name (replaces GroupName) |
Description |
string | No | New tag note (replaces Description) |
Return values: ERRORCODE (0: success, 100: failure); ERRORMSG.
Group — Clear all lists in tag (Option 100)
Purpose: Clear all lists (recipients) within a tag.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API admin account |
ManagerPassword |
string | Yes | API admin password |
Option |
int | Yes | 100 |
GroupID |
string | Yes | Tag ID |
Return values: ERRORCODE (0: success, 100: failure); ERRORMSG.
Group — Code examples
Add a tag via URL — tag name ITPishonAPI (JobType: 2, email):
https://api.itpison.com/WebAPI/Groups.aspx?ManagerLoginName=API_account&ManagerPassword=API_password
&Option=1&JobType=2&GroupName=ITPishonAPI
HTML — Add tag
<form id="form1" name="form1" enctype="multipart/form-data" method="post"
action="https://api.itpison.com/WebAPI/Groups.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="enter account here" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="enter password here" />
<input name="Option" type="hidden" id="Option" value="1" />
</p>
<p>Tag name (GroupName):<input name="GroupName" type="text" id="GroupName" /></p>
<p>Type (JobType):<input name="JobType" type="text" id="JobType" /></p>
Note 1: If type is not entered, it is treated as 2 (=> email).</BR>
Note 2: Type input 2 (=> email).
<p>Description:<input name="Description" type="text" id="Description" /></p>
<p><input name="Submit" type="submit" value="Add tag" /></p>
</form>
HTML — Delete tag
<form id="form1" name="form1" enctype="multipart/form-data" method="post"
action="https://api.itpison.com/WebAPI/Groups.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="enter account here" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="enter password here" />
<input name="Option" type="hidden" id="Option" value="2" />
</p>
<p>Tag name (GroupName):<input name="GroupName" type="text" id="GroupName" /></p>
<p>Tag ID (GroupID):<input name="GroupID" type="text" id="GroupID" /></p>
Note: Please enter the tag name OR the tag ID
<p><input name="Submit" type="submit" value="Delete tag" /></p>
</form>
HTML — Modify tag
<form id="form1" name="form1" enctype="multipart/form-data" method="post"
action="https://api.itpison.com/WebAPI/Groups.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="enter account here" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="enter password here" />
<input name="Option" type="hidden" id="Option" value="3" />
</p>
<p>Tag name (GroupName):<input name="GroupName" type="text" id="GroupName" /></p>
<p>Tag ID (GroupID):<input name="GroupID" type="text" id="GroupID" /></p>
Note: Please enter the tag name or the tag ID
<p>New tag name:<input name="NewGroupName" type="text" id="NewGroupName" /></p>
<p>New tag note:<input name="Description" type="text" id="Description" /></p>
<p><input name="Submit" type="submit" value="Modify tag" /></p>
</form>
HTML — Clear all lists in tag
<form id="form1" name="form1" enctype="multipart/form-data" method="post"
action="https://api.itpison.com/WebAPI/Groups.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="enter account here" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="enter password here" />
<input name="Option" type="hidden" id="Option" value="100" />
</p>
<p>Tag ID (GroupID):<input name="GroupID" type="text" id="GroupID" /></p>
<p><input name="Submit" type="submit" value="Clear all lists in tag" /></p>
</form>
PHP — Delete tag
<?php
$url = 'https://api.itpison.com/WebAPI/Groups.aspx';
$postdata = array(
'ManagerLoginName' => 'API_account',
'ManagerPassword' => 'API_password',
'Option' => '2',
'GroupName' => 'tag name'
);
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($postdata)
)
);
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }
var_dump($result);
?>
NewsLetter
Endpoint: NewsLetter.aspx
Call URL: https://api.itpison.com/WebAPI/NewsLetter.aspx
HTTP method: GET or POST (determined by Web.config)
Authentication: ManagerLoginName (API admin account) + ManagerPassword (API admin password)
Shared outline conventions: see Request and response formats.
Special fields
NewsletterID— newsletter group IDNewsletterName— newsletter group nameNewNewsletterName— new newsletter group nameDescription— newsletter noteEnableStatus— newsletter status
Function (Option setting)
| Option | Function |
|---|---|
| 1 | Add newsletter group |
| 2 | Delete newsletter group |
| 3 | Modify newsletter group |
| 100 | Clear all lists in newsletter group |
ErrorCode return messages
| Code | ErrorMsg | Description |
|---|---|---|
| 100 | Exception | Exception |
| 102 | Incorrect Request | Incorrect request |
| 110 | Error Option | Invalid Option value |
| 111 | Duplicate NewsLetterName | NewsLetterName already exists |
| 112 | Create NewsLetter Failed | Failed to create the newsletter group |
| 113 | NewsLetterName isn't exist | NewsLetterName does not exist |
| 114 | Please key in NewsLetterName | NewsLetterName must be provided |
| 115 | NewsLetterID isn't exist | NewsLetterID does not exist |
| 116 | JobType isn't correct | JobType is not correct |
| 117 | Please key in NewsLetterName or NewsLetterID | NewsLetterName or NewsLetterID must be provided |
| 1000 | No Licence at Page | No licence for this page |
NewsLetter — Add newsletter group (Option 1)
Purpose: Create a new newsletter group.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API admin account |
ManagerPassword |
string | Yes | API admin password |
Option |
int | Yes | 1 |
JobType |
int | Yes | Job type. Use 2 (email). |
NewsLetterName |
string | Yes | Newsletter group name |
Description |
string | No | Note |
Return values: ERRORCODE (0: success, 100: failure); ERRORMSG; NEWSLETTERID (the new newsletter's ID).
NewsLetter — Delete newsletter group (Option 2)
Purpose: Delete a newsletter group.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API admin account |
ManagerPassword |
string | Yes | API admin password |
Option |
int | Yes | 2 |
NewsLetterName |
string | Conditional | Newsletter group name (supply NewsLetterName or NewsLetterID) |
NewsLetterID |
string | Conditional | Newsletter group ID (supply NewsLetterName or NewsLetterID) |
Return values: ERRORCODE (0: success, 100: failure); ERRORMSG.
NewsLetter — Modify newsletter group (Option 3)
Purpose: Modify a newsletter group. Use NewNewsLetterName to change NewsLetterName, and Description to change the description.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API admin account |
ManagerPassword |
string | Yes | API admin password |
Option |
int | Yes | 3 |
NewsLetterName |
string | Conditional | Newsletter group name (supply NewsLetterName or NewsLetterID) |
NewsLetterID |
string | Conditional | Newsletter group ID (supply NewsLetterName or NewsLetterID) |
NewNewsLetterName |
string | No | New newsletter group name (replaces NewsLetterName) |
Description |
string | No | Note (replaces Description) |
Return values: ERRORCODE (0: success, 100: failure); ERRORMSG.
NewsLetter — Clear all lists in newsletter group (Option 100)
Purpose: Clear the newsletter group's lists (both subscribed and unsubscribed).
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API admin account |
ManagerPassword |
string | Yes | API admin password |
Option |
int | Yes | 100 |
NewsLetterID |
string | Yes | Newsletter group ID |
Return values: ERRORCODE (0: success, 100: failure); ERRORMSG.
NewsLetter — Code examples
Add a newsletter group via browser URL — JobType (2: Email):
https://api.itpison.com/WebAPI/Newsletter.aspx?ManagerLoginName=API_account&ManagerPassword=API_password
&option=1&JobType=2&NewsletterName=newsletter group name
HTML — Add newsletter group
<form id="form1" name="form1" enctype="multipart/form-data" method="post"
action="https://api.itpison.com/WebAPI/NewsLetter.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="enter account here" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="enter password here" />
<input name="Option" type="hidden" id="Option" value="1" />
<p>
<p>Newsletter group name:<input name="NewsletterName" type="text" id="NewsletterName" /></p>
<p>Type (JobType):<input name="JobType" type="text" id="JobType" /></p>
Note 1: If type is not entered, it is treated as 2 (=> email).</BR>
Note 2: Type input 2 (=> email).
<p>Description:<input name="Description" type="text" id="Description" /></p>
<p><input name="Submit" type="submit" value="Add newsletter group" /></p>
</form>
HTML — Delete newsletter group
<form id="form1" name="form1" enctype="multipart/form-data" method="post"
action="https://api.itpison.com/WebAPI/NewsLetter.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="enter account here" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="enter password here" />
<input name="Option" type="hidden" id="Option" value="2" />
<p>
<p>Newsletter group name:<input name="NewsletterName" type="text" id="NewsletterName" /></p>
<p>Newsletter group ID:<input name="NewsletterID" type="text" id="NewsletterID" /></p>
Please enter the newsletter group name OR the newsletter group ID
<p><input name="Submit" type="submit" value="Delete newsletter group" /></p>
</form>
HTML — Modify newsletter group
<form id="form1" name="form1" enctype="multipart/form-data" method="post"
action="https://api.itpison.com/WebAPI/NewsLetter.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="enter account here" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="enter password here" />
<input name="Option" type="hidden" id="Option" value="3" />
<p>
<p>Newsletter group name:<input name="NewsletterName" type="text" id="NewsletterName" /></p>
<p>Newsletter group ID:<input name="NewsletterID" type="text" id="NewsletterID" /></p>
Note: Please enter the newsletter group name OR the newsletter group ID
<p>New newsletter group name:<input name="NewNewsletterName" type="text" id="NewNewsletterName" /></p>
<p>Description:<input name="Description" type="text" id="Description" /></p>
<p><input name="Submit" type="submit" value="Modify newsletter group" /></p>
</form>
HTML — Clear all lists in newsletter group
<form id="form1" name="form1" enctype="multipart/form-data" method="post"
action="https://api.itpison.com/WebAPI/NewsLetter.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="enter account here" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="enter password here" />
<input name="Option" type="hidden" id="Option" value="100" />
<p>
<p>Newsletter group ID:<input name="NewsletterID" type="text" id="NewsletterID" /></p>
<p><input name="Submit" type="submit" value="Clear all members in newsletter group" /></p>
</form>
PHP — Delete newsletter group
<?php
$url = 'https://api.itpison.com/WebAPI/Newsletter.aspx';
$postdata = array(
'ManagerLoginName' => 'API_account',
'ManagerPassword' => 'API_password',
'Option' => '2',
'NewsletterID' => 'newsletter group ID'
);
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($postdata)
)
);
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }
var_dump($result);
?>
ListManager (administrator accounts only)
Endpoint: ListManager.aspx
Call URL: https://api.itpison.com/WebAPI/ListManager.aspx
HTTP method: GET or POST (determined by Web.config)
Authentication: ManagerLoginName (account) + ManagerPassword (password)
Note: Option 5 (Import blacklist) is restricted to admin accounts only; the other functions require the standard manager credentials. Shared outline conventions: see Request and response formats.
Required fields
ManagerLoginName— accountManagerPassword— passwordOption— see Option settingsListName— see ListName settings
Special fields
EmailAddress— email addressNewEmailAddress— new email address
ListName setting
| ListName | Description |
|---|---|
EmailSystemBlackList |
System blacklist |
Function (Option setting)
| Option | Function |
|---|---|
| 1 | Add blacklist entry |
| 2 | Delete blacklist entry |
| 3 | Modify blacklist entry |
| 4 | Query blacklist |
| 5 | Import blacklist (admin only) |
ErrorCode return messages
| Code | ErrorMsg | Description |
|---|---|---|
| 100 | Exception | Exception |
| 102 | Incorrect Request | Incorrect request |
| 110 | Error Option | Invalid Option value |
| 111 | Error ListName | Invalid ListName |
| 112 | Insufficient Access Rights | Insufficient access rights |
| 113 | Email Address exists | Email address already exists |
| 114 | Email Address doesn't exist | Email address does not exist |
| 115 | BlackListFile or BlackListUrl not found | BlackListFile or BlackListUrl not found |
| 116 | Email Address is invalid | Email address is invalid |
| 1000 | No Licence at Page | No licence for this page |
ListManager — Add blacklist entry (Option 1)
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | Account |
ManagerPassword |
string | Yes | Password |
Option |
int | Yes | 1 |
ListName |
string | Yes | List name (e.g. EmailSystemBlackList) |
EmailAddress |
string | Yes | Email address |
Return values: ERRORCODE (0: success, 100: failure); ERRORMSG; SYSTEMBLACKLISTID (the new system blacklist ID).
ListManager — Delete blacklist entry (Option 2)
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | Account |
ManagerPassword |
string | Yes | Password |
Option |
int | Yes | 2 |
ListName |
string | Yes | List name (e.g. EmailSystemBlackList) |
EmailAddress |
string | Yes | Email address |
Return values: ERRORCODE (0: success, 100: failure); ERRORMSG.
ListManager — Modify blacklist entry (Option 3)
EmailAddress is the entry to be modified; NewEmailAddress is the new email address.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | Account |
ManagerPassword |
string | Yes | Password |
Option |
int | Yes | 3 |
ListName |
string | Yes | List name (e.g. EmailSystemBlackList) |
EmailAddress |
string | Yes | Email address to be modified |
NewEmailAddress |
string | Yes | New email address |
Return values: ERRORCODE (0: success, 100: failure); ERRORMSG.
ListManager — Query blacklist (Option 4)
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | Account |
ManagerPassword |
string | Yes | Password |
Option |
int | Yes | 4 |
ListName |
string | Yes | List name (e.g. EmailSystemBlackList) |
EmailAddress |
string | Yes | Email address |
Return values: ERRORCODE (0: success, 100: failure); ERRORMSG.
ListManager — Import blacklist (Option 5, admin only)
Restricted to admin accounts only.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | Account |
ManagerPassword |
string | Yes | Password |
Option |
int | Yes | 5 |
ListName |
string | Yes | List name (e.g. EmailSystemBlackList) |
BlackListFile |
file [PostedFile] | Conditional | Uploaded blacklist file (supply BlackListFile or BlackListUrl) |
BlackListUrl |
string | Conditional | Remote blacklist URL (supply BlackListFile or BlackListUrl) |
Return values: ERRORCODE (0: success, 100: failure); ERRORMSG.
ListManager — Code examples
Add a blacklist entry via browser URL — add abc@example.com to the blacklist:
https://api.itpison.com/WebAPI/ListManager.aspx?ManagerLoginName=API_account&ManagerPassword=API_password
&option=1&EmailAddress=abc@example.com&ListName=EmailSystemBlackList
HTML — Modify blacklist
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/ListManager.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
<input name="Option" type="hidden" id="Option" value="3" />
<input name="ListName" type="hidden" id="ListName" value="EmailSystemBlackList" />
</p>
<p>Email: <input name="EmailAddress" type="text" id="EmailAddress" value=""/></p>
<p>New email: <input name="NewEmailAddress" type="text" id="NewEmailAddress" value=""/></p>
<p><input name="Submit" type="submit" value="Modify" /></p>
</form>
HTML — Query blacklist
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/ListManager.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
<input name="Option" type="hidden" id="Option" value="4" />
<input name="ListName" type="hidden" id="ListName" value="EmailSystemBlackList" />
</p>
<p>Email: <input name="EmailAddress" type="text" id="EmailAddress" value=""/></p>
<p><input name="Submit" type="submit" value="Query" /></p>
</form>
HTML — Import blacklist (admin only)
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/ListManager.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
<input name="Option" type="hidden" id="Option" value="5" />
<input name="ListName" type="hidden" id="ListName" value="EmailSystemBlackList" />
</p>
<p>BlackListFile: <input name="BlackListFile" type="file" id="BlackListFile" /></p>
<p><input name="Submit" type="submit" value="Import" /></p>
</form>
PHP — Delete blacklist
<?php
$url = 'https://api.itpison.com/WebAPI/ListManager.aspx';
$postdata = array(
'ManagerLoginName' => 'API_account',
'ManagerPassword' => 'API_password',
'Option' => '2',
'ListName' => 'EmailSystemBlackList',
'EmailAddress' => '123xxxx@example.com'
);
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($postdata)
)
);
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }
var_dump($result);
?>
Report
Call URL: https://api.itpison.com/WebAPI/Report.aspx
Endpoint: Report.aspx
HTTP method: GET or POST (determined by Web.config)
Authentication: ManagerLoginName (API account) + ManagerPassword (API password)
Shared outline conventions: see Request and response formats.
Report — Download report
Purpose: Download a report.
Required fields: ManagerLoginName, ManagerPassword, ReportPartID, LaunchID, StartTime, EndTime.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API account |
ManagerPassword |
string | Yes | API password |
ReportPartID |
int | Yes | Report type (see the ReportPartID table below) |
LaunchID |
string | Yes | Task ID; supports CSV format (e.g. 1225,1116) |
StartTime |
datetime | Yes | Start time (format: yyyy-MM-dd hh:mm:ss) |
EndTime |
datetime | Yes | End time (format: yyyy-MM-dd hh:mm:ss) |
ResponseMode |
int | No | Message return mode (see the ResponseMode table below) |
ReportCharacterSetID |
int | No | Report content language (17: Traditional Chinese, 117: English). Note: currently only supported for the Remove download report (ReportPartID 31033). |
CustomColNameN |
string | No | N is blank or a number 1 to 99. E.g. CustomColName, CustomColName1 to CustomColName99; specifies which fields the report returns, or custom return-field names (see Note 1). |
Return ErrorCode message codes:
| ErrorCode | ErrorMsg |
|---|---|
| 100 | Exception |
| 102 | Incorrect Request |
| 103 | Incorrect ReportPartID |
| 110 | Invalid time format |
| 1000 | No Licence at Page |
ReportPartID code reference:
| ReportPartID | ReportName / definition |
|---|---|
| 20001 | Email total-send report |
| 20003 | Email open report |
| 20005 | Email click report |
| 21001 | Open-detail download report |
| 2100199 | Open-detail download report, quick version |
| 21002 | Click-detail download report |
| 21003 | Bounce-detail download report |
| 21032 | Successfully-sent email download report |
| 30023 | Combined read report |
| 31033 | Remove download report |
ResponseMode — message return mode:
| ResponseMode | Description |
|---|---|
| 0 | XML format; DOWNLOADLINK is a UNC path. (default) |
| 1 | XML format; DOWNLOADLINK is an HTTP URL. |
| 2 | Web-response format: on a successful query the report content is displayed directly on the page; if the query fails, the return value is still output in XML format. |
| 3 | File-download format: on a successful query the report content is exported directly as a download file; if the query fails, the return value is still output in XML format. |
Return values: ERRORCODE (0: success, 100: failure); ERRORMSG (processing message; empty when ERRORCODE is 0); DOWNLOADLINK (the report's download link).
Report — Notes
Note 1: CustomColName
CustomColNamecan order the returned fields; ordering follows the numeric value, e.g.CustomColName1,CustomColName2,CustomColName3.- Returned report field names must match exactly in case; for returned report field names see the "Report return-field reference" below.
CustomColNameNspecifies which fields are returned as report content, or custom report return-field names. If noCustomColNameNis specified, all field content is returned using the default field names. TheCustomColNameNformats are:- I. Report return field.
- II. Report return field, with a custom field name.
- A custom field name means you can change the field name when the report is returned.
Example 1: CustomColName1=EmailAddress&CustomColName2=SubmitTime — returns only the EmailAddress and SubmitTime fields.
Example 2: CustomColName = EmailAddress,Email — returns only the EmailAddress field, renaming it from EmailAddress to Email.
When calling Report.aspx with GET, field content that uses special symbols or Chinese characters must be URL-encoded first; otherwise URL parsing errors easily occur during HTTP transmission.
URL-encoding example:
| Url decoding | Url encoding |
|---|---|
CustomColName1= EmailAddress,Email address |
CustomColName1= EmailAddress,Email%20address |
CustomColName2= SubmitTime,Sent at |
CustomColName2= SubmitTime,Sent%20at |
Common-symbol URL-encoding reference: < = %3C; = = %3D; > = %3E; % = %25; & = %26.
Report — Report return-field reference
ReportPartID 20001 (Email total-send report)
| XML Report | Report definition |
|---|---|
| LaunchID | Task ID |
| Subject | Subject |
| Status | Send-management status code |
| ErrorCode | Send-management error code |
| LastErrorMsg | Error message |
| JobName | Task name |
| RefNumber | Task reference number |
| ResendStep | Number of resends already made |
| ContentSize | Email content size |
| AttachmentSize | Attachment file size |
| RemoveUnsubscribeCount | Number of unsubscribe lists removed |
| RemoveDuplicateCount | Number of duplicate lists removed |
| RemoveListProcessCount | Number of filtered lists removed |
| RemoveReturnCount | Number of known-bounce lists removed |
| RemoveBlackCount | Number of blacklist entries removed |
| RemoveWhiteCount | Number of whitelist entries removed |
| MakeCount | Number of email files generated by the system |
| SendCount | Emails the system attempted to send to the mail sender |
| SubmitTime | Delivery submission time |
| ScheduleTime | Scheduled send time |
| ExpireTime | Tracking cutoff time |
| SendTime | Time first email reached the mail sender |
| CompleteTime | Email-generation completion time |
| DoneTime | Time last generated email reached the mail sender |
ReportPartID 2100199 (Open-detail download report, quick version)
| XML Report | Report definition |
|---|---|
| LaunchID | Task ID |
| EmailAddress | |
| IP | IP location |
| Country | Country |
| State | Province/state |
| City | City/county |
| ISP | Internet service provider |
| OS | Operating system |
| Client | Browser |
| Language | Language |
| SubmitTime | Click time |
ReportPartID 21002 (Click-detail download report)
| XML Report | Report definition |
|---|---|
| ClickID | Click ID |
| EmailID | Email ID |
| CustomerID | Customer ID |
| EmailAddress | |
| ExternRefNum | Reference number |
| ForwardLayer | Type |
| LinkName | Link name |
| NewUrl | Link URL |
| SubmitTime | Click time |
| OS | Operating system |
| Client | Browser |
| IP | IP location |
| City | City/county |
| State | Province/state |
| Country | Country |
| CountryISOCode | Country code |
| ISP | Internet service provider |
| Latitude | Latitude |
| Longitude | Longitude |
| Language | Language |
| UserAgent | Browser information |
| AcceptLanguage | Supported languages |
ReportPartID 21003 (Bounce-detail download report)
| XML Report | Report definition |
|---|---|
| ReturnLogID | Bounce-record ID |
| EmailID | Email ID |
| CustomerID | Customer ID |
| EmailAddress | |
| ExternRefNum | Reference number |
| ForwardLayer | Type |
| ReturnCode | Bounce code |
| Reason | Bounce reason |
| DSNStatus | DSN status |
| ReturnMsg | Bounce status message |
| ReturnTime | Bounce time |
ReportPartID 21032 (Successfully-sent email download report)
| XML Report | Report definition |
|---|---|
| LaunchID | Task ID |
| EmailID | Email ID |
| CustomerID | Customer ID |
| EmailAddress | |
| ForwardLayer | Type |
| SendTime | Send time |
| ExternRefNum | Reference number |
| Subject | Subject |
ReportPartID 30023 (Combined read report)
| XML Report | Report definition |
|---|---|
| SubmitTime | Send time |
| LaunchID | Task ID |
| JobID | Send ID |
| JobName | Task name |
| EmailCount | Total emails |
| AcceptCount | Emails sent out by the system (A1) |
| ReturnEmailCount | Bounces (A2) |
| SendSuccessEmailCount | Successfully sent count (A3) |
| ReturnEmailRate | Bounce rate (A2/A1) |
| SendSuccessRate | Successful-send rate (A3/A1) |
| OpenEmailCount | Number of people who opened the email (A4) |
| OpenEmailRate | Open rate (A4/A3) |
| ClickCount | Click count (A5) |
| ClickEmailCount | Number of people who clicked the email (A6) |
| SendSuccessClickRate | Click rate (A6/A3) |
| OpenEmailClickRate | Opened-email click rate (A6/A4) |
ReportPartID 31033 (Remove download report)
| XML Report | Report definition |
|---|---|
| CustomerID | Customer ID |
| EmailAddress | |
| ExternRefNum | Reference number |
| ForwardLayer | Type |
| Status | Removal reason |
| SubmitTime | Removal time |
Removal reasons: (1) Invalid (2) RemoveDuplicate (3) RemoveReturn (4) RemoveUnsubscribe (5) RemoveBlackList (6) RemoveWhiteList (7) RemoveListProcess.
Report — Code examples
Browser URL example — Open-detail download report, quick version (query for LaunchID=1234, ReportPartID=2100199):
https://api.itpison.com/WebAPI/Report.aspx?ManagerLoginName=API account&ManagerPassword=API password&ReportPartID=2100199&LaunchID=1234&StartTime=yyyy-MM-dd HH:mm:ss&EndTime=yyyy-MM-dd HH:mm:ss
HTML — Download report
<form id="form1" name="form1" enctype="multipart/form-data" method="post"
action="https://api.itpison.com/WebAPI/Report.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
</p>
<p>Report type: <input name="ReportPartID" type="text" id="ReportPartID" /></p>
<p>Task ID: <input name="LaunchID" type="text" id="LaunchID" />(separate multiple task IDs with a comma ",")</p>
<p>ResponseMode: <input name="ResponseMode" type="text" id="ResponseMode" />(0: UNC path, 1: HTTP URL, 2: web-response format, 3: file-download format)</p>
<p>Start time: <input name="StartTime" type="text" id="StartTime" />(format: yyyy-MM-dd hh:mm:ss)</p>
<p>End time: <input name="EndTime" type="text" id="EndTime" />(format: yyyy-MM-dd hh:mm:ss)</p>
<p><input name="Submit" type="submit" value="Query" /></p>
</form>
PHP — Download report
<?php
$url = 'https://api.itpison.com/WebAPI/Report.aspx';
$postdata = array(
'ManagerLoginName' => 'API account',
'ManagerPassword' => 'API password',
'ReportPartID' => 'report type',
'LaunchID' => 'task ID 1, task ID 2',
'ResponseMode' => 'message return mode',
);
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($postdata)
)
);
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }
var_dump($result);
?>
ManageReport
Call URL: https://api.itpison.com/WebAPI/ManageReport.aspx
Endpoint: ManageReport.aspx
HTTP method: GET or POST (determined by Web.config)
Authentication: ManagerLoginName (API management account) + ManagerPassword (API management password)
Shared outline conventions: see Request and response formats.
Function overview: Report management. Note: when updating report data, the update completion time is not known; the WebAPI returns as soon as it submits the task and does not wait for the report update to finish.
Required fields (general): ManagerLoginName, ManagerPassword, Option.
Special fields:
- ReportJobID — report ID
- ReportTypeID — report type
- ReportCheckType — report update type (0: SQL data update, 1: HTML File, 2: PDF File)
- ResponseMode — message return mode (see Note 2)
- StartTime — start time
- EndTime — end time
Return ErrorCode message codes:
| ErrorCode | ErrorMsg |
|---|---|
| 100 | Exception |
| 102 | Incorrect Request |
| 110 | Error Option |
| 111 | The report task tracking deadline has passed, the only available statistics |
| 112 | ReportJodID is not exist |
| 1000 | No Licence at Page |
Option settings:
| Option | Description |
|---|---|
| 0 | Query all reports in a time range |
| 2 | Delete a single report |
| 3 | Update a single report |
| 4 | Query reports currently updating |
| 1000 | Bulk update reports |
| 1001 | Query the report types updatable for a single report |
ManageReport — Query all reports in a time range (Option 0)
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API management account |
ManagerPassword |
string | Yes | API management password |
Option |
int | Yes | 0 |
ResponseMode |
int | Yes | Message return mode (see Note 2) |
StartTime |
datetime | Yes | Start time |
EndTime |
datetime | Yes | End time |
ManageReport — Delete a single report (Option 2)
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API management account |
ManagerPassword |
string | Yes | API management password |
Option |
int | Yes | 2 |
ReportJobID |
string | Yes | Report ID |
ResponseMode |
int | Yes | Message return mode (see Note 2) |
ManageReport — Update a single report (Option 3)
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API management account |
ManagerPassword |
string | Yes | API management password |
Option |
int | Yes | 3 |
ReportJobID |
string | Yes | Report ID |
ReportTypeID |
string | Yes | Report type (see Note 1). Uses CSV format (e.g. 20001, 20003, 20005). |
ReportCheckType |
int | Yes | Report update type (0: SQL data update, 1: HTML File, 2: PDF File) |
ResponseMode |
int | Yes | Message return mode (see Note 2) |
ManageReport — Query reports currently updating (Option 4)
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API management account |
ManagerPassword |
string | Yes | API management password |
Option |
int | Yes | 4 |
ResponseMode |
int | Yes | Message return mode (see Note 2) |
ManageReport — Bulk update reports (Option 1000)
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API management account |
ManagerPassword |
string | Yes | API management password |
Option |
int | Yes | 1000 |
ReportCheckType |
int | Yes | Report update type (0: SQL data update, 1: HTML File, 2: PDF File) |
ResponseMode |
int | Yes | Message return mode (see Note 2) |
StartTime |
datetime | Yes | Start time |
EndTime |
datetime | Yes | End time |
ReportTypeID |
string | Yes | Report type (see Note 1). Uses CSV format (e.g. 20001, 20003, 20005). To update a time-range report but only update some report types, set ReportTypeID; if omitted, the default is all report types. |
Recommended for sparing use. Routinely updating all report data requires regular database maintenance.
ManageReport — Query the report types updatable for a single report (Option 1001)
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API management account |
ManagerPassword |
string | Yes | API management password |
Option |
int | Yes | 1001 |
ReportJobID |
string | Yes | Report ID |
ResponseMode |
int | Yes | Message return mode (see Note 2) |
ManageReport — Notes
Note 1: Report type
| ReportPartID | Report definition |
|---|---|
| 20001 | Email total-send report |
| 20003 | Email open report |
| 20005 | Email click report |
| 21001 | Open download report |
| 2100199 | Open download report, quick version |
| 21002 | Click-detail download report |
| 21003 | Bounce-detail download report |
| 21032 | Successfully-sent email download report |
| 30023 | Combined read report |
| 31003 | Remove download report |
Note 2: Message return mode — same four ResponseMode settings as the Report endpoint (0: XML/UNC path (default); 1: XML/HTTP URL; 2: web-response; 3: file-download).
ManageReport — Code examples
Query all reports within a time range (2018-01-01 00:00:00 to 2018-03-30 23:59:59):
https://api.itpison.com/WebAPI/ManageReport.aspx?ManagerLoginName=API account&ManagerPassword=API password&Option=0&ResponseMode=3&StartTime=2018-01-01 00:00:00&EndTime=2018-03-30 23:59:59
Delete a single report (ReportJobID=xxx):
https://api.itpison.com/WebAPI/ManageReport.aspx?ManagerLoginName=API account&ManagerPassword=API password&Option=2&ResponseMode=3&ReportJobID=xxx
Update a single report (ReportTypeID=20001,20003, update from latest DB data):
https://api.itpison.com/WebAPI/ManageReport.aspx?ManagerLoginName=API account&ManagerPassword=API password&Option=3&ResponseMode=2&ReportJobID=xxx&ReportTypeID=20001,20003&ReportCheckType=0
Query reports currently updating:
https://api.itpison.com/WebAPI/ManageReport.aspx?ManagerLoginName=API account&ManagerPassword=API password&Option=4&ResponseMode=2
Bulk update all reports and all report types in a time range (update from latest DB data):
https://api.itpison.com/WebAPI/ManageReport.aspx?ManagerLoginName=API account&ManagerPassword=API password&Option=1000&ResponseMode=2&ReportCheckType=0&StartTime=2016-04-10 00:00:00&EndTime=2016-04-10 23:59:59
Bulk update all reports but only some report types in a time range (ReportTypeID=20001,20003):
https://api.itpison.com/WebAPI/ManageReport.aspx?ManagerLoginName=API account&ManagerPassword=API password&Option=1000&ResponseMode=2&ReportCheckType=0&ReportTypeID=20001,20003&StartTime=2018-03-01 00:00:00&EndTime=2018-03-31 23:59:59
Query the report types updatable for a single report (ReportJobID=xxx):
https://api.itpison.com/WebAPI/ManageReport.aspx?ManagerLoginName=API account&ManagerPassword=API password&Option=1001&ReportJobID=xxx&ResponseMode=2
ReSendEmail
Call URL: https://api.itpison.com/WebAPI/ReSendEmail.aspx
Endpoint: ReSendEmail.aspx | Method: GET or POST (determined by Web.config) | Auth: ManagerLoginName + ManagerPassword
Shared outline conventions: see Request and response formats.
ReSendEmail — Resend Email
Purpose: Resend an already-sent email, preserving the original content and attachments. During the resend, EmailAddress may be changed.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API management account. |
ManagerPassword |
string | Yes | API management password. |
Option |
int | Yes | Setting option. 1: resend email. |
EmailID |
string | — | Email number/ID. |
ListID |
string | — | Email content number/ID. |
LaunchID or JobID |
string | — | Task number or send number. |
EmailAddress |
string | — | The email address to resend to. |
Option setting: 1 = resend email.
ErrorCode list
| ErrorCode | ErrorMsg |
|---|---|
| 102 | Incorrect Request |
| 110 | Error Option |
| 111 | ReSendEmail Insert Error |
| 1000 | No Licence at Page |
Details (Option 1 — Resend email):
- Setting EmailAddress indicates the email address to resend to.
- LaunchID / JobID must reference a mail item from a previously sent task.
- You can use Status.aspx to query the email status, obtain EmailID and ListID, then resend the mail item.
- Return values: EmailID; EmailAddress (the resent email address); ERRORCODE (0: success, 100: failure); ERRORMSG.
Code examples
Browser URL — Resend email:
https://api.itpison.com/WebAPI/ReSendEmail.aspx?ManagerLoginName=API account&ManagerPassword=API password&option=1&EmailAddress=Sample@sample.com.tw&EmailID=XXX&LaunchID=ZZZZ&Listid=AAA
HTML — Resend email:
<form id="form1" name="form1" enctype="multipart/form-data" method="post"
action="https://api.itpison.com/WebAPI/ReSendEmail.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
<input name="Option" type="hidden" id="Option" value="1" />
</p>
<p>EmailID<input name="EmailID" type="text" id="EmailID" /></p>
<p>LaunchID<input name="LaunchID" type="text" id="LaunchID" /></p>
<p>ListID<input name="ListID" type="text" id="ListID" /></p>
<p>EmailAddress<input name="EmailAddress" type="text" id="EmailAddress" /></p>
<p><input name="Submit" type="submit" value="Resend" /></p>
</form>
Subscribe
Call URL: https://api.itpison.com/WebAPI/Subscribe.aspx
Endpoint: Subscribe.aspx | Method: GET or POST (determined by Web.config) | Auth: ManagerLoginName + ManagerPassword
Shared outline conventions: see Request and response formats.
Subscribe — Subscribe to Newsletter
Purpose: Subscribe a contact to a newsletter (electronic newsletter).
Required fields: ManagerLoginName, ManagerPassword, Option, NewsletterID, and EmailAddress.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API management account. |
ManagerPassword |
string | Yes | API management password. |
Option |
int | Yes | Setting option. 1: subscribe to newsletter. |
NewsletterID |
string | Yes | Newsletter group ID (for the uncategorized group, set 0). Multiple IDs separated by commas. |
EmailAddress |
string | Yes | Subscribing attribute (email). |
CustomerID |
string | No (special) | Customer number. |
GroupID |
string | No (special) | Tag/label ID. Multiple IDs separated by commas. |
Note |
string | No (special) | Subscription message/note. |
ErrorCode list
| ErrorCode | ErrorMsg |
|---|---|
| 100 | Exception |
| 102 | Incorrect Request |
| 110 | Error Option |
| 111 | GroupID isn't exist |
| 112 | CustomerID isn't exist |
| 113 | NewsLetterID isn't exist |
| 114 | EmailAddress isn't valid |
| 1000 | No Licence at Page |
Details (Option 1 — Subscribe to newsletter):
- Setting CustomerID or EmailAddress indicates the contact to subscribe.
- If the database has a matching EmailAddress, that CustomerID is added to the newsletter group.
- If there is no match, a new CustomerID is created, and you can add CustomerID attribute data; see the OMICard CustomerInfo schema in Appendix 2 under the WebAPI Email section.
- Return values: ERRORCODE; ERRORMSG; NewCustomer (True/False); CustomerID; GroupID; SubscribeTime; NewsLetterID; SubscribeID; Note.
Code examples
Browser URL — Subscribe to newsletter:
https://api.itpison.com/WebAPI/Subscribe.aspx?ManagerLoginName=API account
&ManagerPassword=API password
&option=1&EmailAddress=Sample@itpison.com&NewsLetterID=newsletter group ID
HTML — Subscribe to newsletter:
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Subscribe.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
<input name="Option" type="hidden" id="Option" value="1" />
</p>
<p>Newsletter group ID:<input name="NewsLetterID" type="text" id="NewsLetterID" />separate multiple IDs with commas ","</p>
<p>Tag ID:<input name="GroupID" type="text" id="GroupID" />separate multiple IDs with commas ","</p>
<p>CustomerID:<input name="CustomerID" type="text" id="CustomerID" value="" /></p>
<p>EmailAddress:<input name="EmailAddress" type="text" id="EmailAddress" value="" /></p>
<p>Subscription note:<input name="Note" type="text" id="Note" /></p>
<!-- Note: for the uncategorized newsletter group ID, enter 0 -->
<p><input name="Submit" type="submit" value="Subscribe to newsletter" /></p>
</form>
PHP — Subscribe to newsletter:
<?php
$url = 'https://api.itpison.com/WebAPI/Subscribe.aspx';
$postdata = array(
'ManagerLoginName' => 'API account',
'ManagerPassword' => 'API password',
'Option' => '1',
'NewsLetterID' => 'newsletter group ID',
'EmailAddress' => 'email address' );
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($postdata)
)
);
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }
var_dump($result);
?>
Unsubscribe
Call URL: https://api.itpison.com/WebAPI/Unsubscribe.aspx
Endpoint: Unsubscribe.aspx | Method: GET or POST (determined by Web.config) | Auth: ManagerLoginName + ManagerPassword
Shared outline conventions: see Request and response formats.
Unsubscribe — Unsubscribe from Newsletter
Purpose: Unsubscribe a contact from a newsletter.
Required fields: ManagerLoginName, ManagerPassword, Option, NewsletterID, and EmailAddress.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API management account. |
ManagerPassword |
string | Yes | API management password. |
Option |
int | Yes | Setting option. 1: unsubscribe from newsletter group. |
NewsletterID |
string | Yes | Newsletter group ID (uncategorized group = 0). Multiple IDs separated by commas. |
EmailAddress |
string | Yes | Attribute to unsubscribe (email). |
CustomerID |
string | No (special) | Customer number. |
Note |
string | No (special) | Unsubscribe message/note. |
GroupID |
string | No (special) | Tag/label ID. Multiple IDs separated by commas. |
ErrorCode list
| ErrorCode | ErrorMsg |
|---|---|
| 100 | Exception |
| 102 | Incorrect Request |
| 110 | Error Option |
| 111 | GroupID isn't exist |
| 113 | NewsLetterID isn't exist |
| 114 | EmailAddress isn't valid |
| 1000 | No Licence at Page |
Details (Option 1 — Unsubscribe from newsletter):
- Setting CustomerID or EmailAddress indicates the contact to unsubscribe.
- If the database has a matching EmailAddress, that Customer is added to the newsletter-unsubscribe group.
- If there is no match, a new Customer is created, and Customer attribute data can be added; see the OMICard CustomerInfo schema in Appendix 2 under the WebAPI Email section.
- Return values: ERRORMSG; ERRORCODE (0: success, 100: failure); NEWSLETTERID (uncategorized = 0); UNSUBSCRIBEID; CUSTOMERID; NEWCUSTOMER (True/False); UNSUBSCRIBETIME; GROUPID.
Code examples
Browser URL — Unsubscribe from newsletter:
https://api.itpison.com/WebAPI/Unsubscribe.aspx?ManagerLoginName=API account
&ManagerPassword=API password&option=1&NewsLetterID=newsletter group number
&EmailAddress=Sample@itpison.com
HTML — Unsubscribe from newsletter:
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Unsubscribe.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
<input name="Option" type="hidden" id="Option" value="1" />
</p>
<p>Newsletter group ID:<input name="NewsLetterID" type="text" id="NewsLetterID" />separate multiple IDs with commas ","</p>
<p>Tag ID:<input name="GroupID" type="text" id="GroupID" />separate multiple IDs with commas ","</p>
<p>CustomerID:<input name="CustomerID" type="text" id="CustomerID" /></p>
<p>EmailAddress:<input name="EmailAddress" type="text" id="EmailAddress" value="" /></p>
<p>Note:<input name="Note" type="text" id="Note" /></p>
<!-- Note: for the uncategorized newsletter group ID, enter 0 -->
<p><input name="Submit" type="submit" value="Unsubscribe" /></p>
</form>
PHP — Unsubscribe from newsletter:
<?php
$url = 'https://api.itpison.com/WebAPI/UnSubscribe.aspx';
$postdata = array(
'ManagerLoginName' => 'API account',
'ManagerPassword' => 'API password',
'Option' => '1',
'NewsLetterID' => 'newsletter group ID',
'EmailAddress' => 'email address'
);
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($postdata)
)
);
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }
var_dump($result);
?>
TaskManager
Call URL: https://api.itpison.com/WebAPI/TaskManager.aspx
Endpoint: TaskManager.aspx | Method: GET or POST (determined by Web.config) | Auth: ManagerLoginName + ManagerPassword
Shared outline conventions: see Request and response formats.
TaskManager — Task & Send Management
Purpose: - Task management: query task, delete task, terminate task, pause task, resume (unpause) task, change task expire/deadline time. - Send management: query send, delete send, terminate send, pause send, resume (unpause) send, restart (when points/credits are insufficient: after topping up points, restart; *this feature belongs to the points module).
Required fields: ManagerLoginName, ManagerPassword; LaunchID or JobID for query; query target identified by EmailAddress or ExternRefNum + JobType.
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API management account. |
ManagerPassword |
string | Yes | API management password. |
LaunchID |
string | One of LaunchID/JobID | Task number. |
JobID |
string | One of LaunchID/JobID | Send number. |
EmailAddress |
string | No | Query target. |
ExternRefNum |
string | No | Query target (used with JobType). |
JobType |
string | No | Query target (used with ExternRefNum). |
LaunchAction |
int | No (special) | Setting option for task management. |
JobAction |
int | No (special) | Setting option for send management. |
ExpireTime |
datetime | No (special) | Extend tracking time (format "2012-11-23 09:00:59"). |
Description: Set LaunchID or JobID to query task or send status. Set LaunchAction for task management, or JobAction for send management.
ErrorCode list
| ErrorCode | ErrorMsg |
|---|---|
| 110 | JobID doesn't exist |
| 111 | LaunchID doesn't exist |
| 112 | Invalid LaunchAction |
| 113 | Invalid JobAction |
| 114 | Invalid expire time |
| 1000 | No Licence at Page |
Query task
Use LaunchID to indicate the task to query. If the task has already produced sends, all send contents are listed. If the queried LaunchID was not produced by you or by a user you created, it shows LaunchID doesn't exist.
Task status (STATUS)
| STATUS | Condition | Description |
|---|---|---|
| 0 | ERRORCODE = 0 | Launch complete |
| 0~3 | ERRORCODE = -1 | Terminated |
| 0~3 | ERRORCODE = -2 | Paused |
| 0~3 | ERRORCODE > 0 | Error |
| 1 | LAUNCHCOUNT <= 0 | Waiting to launch |
| 1 | LAUNCHCOUNT > 0 | Waiting for next launch (trigger task, multi-cycle recurring task) |
| 2 | Launching | |
| 3 | Launch started | |
| 99 | Waiting for approval |
LaunchAction setting
| LaunchAction | Description |
|---|---|
| 1 | Delete task |
| 2 | Terminate task |
| 3 | Pause task |
| 4 | Resume (unpause) task |
| 5 | *Extend task deadline (set ExpireTime to the new deadline, format 2010/12/31 21:13:20) |
Query send
Use JobID to indicate the send to query, including the task content the send belongs to. If the queried JobID was not produced by you or by a user you created, it shows JobID doesn't exist.
Send status (STATUS)
| STATUS | Condition | Description |
|---|---|---|
| 0 | ERRORCODE = 0 | Send complete |
| 0~8 | ERRORCODE = -1 | Terminated |
| 0~8 | ERRORCODE = -2 | Paused |
| 0~8 | ERRORCODE > 0 | Error |
| 1 | Waiting to send | |
| 2 | Processing body content | |
| 3 | Processing links | |
| 4 | Processing list | |
| 5 | Processing list | |
| 6 | Sending in progress | |
| 7 | Sending in progress | |
| 8 | Tracking |
JobAction setting
| JobAction | Description |
|---|---|
| 1 | Delete send |
| 2 | Terminate send |
| 3 | Pause send |
| 4 | Resume (unpause) send |
| 5 | When points/credits are insufficient, after topping up points, restart |
Code examples
Browser URL — Query task status:
https://api.itpison.com/WebAPI/TaskManager.aspx?ManagerLoginName=API account&ManagerPassword=API password&LaunchID=task number
HTML — Query task status using LaunchID:
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/TaskManager.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
</p>
<p>Task number: <input name="LaunchID" type="text" id="LaunchID" /></p>
<p><input name="Submit" type="submit" value="Query task" /></p>
</form>
HTML — Delete task (LaunchAction=1), Terminate (2), Pause (3), Resume (4): use the same form, changing the hidden LaunchAction value:
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/TaskManager.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
<input name="LaunchAction" type="hidden" id="LaunchAction" value="1" />
</p>
<p>Task number: <input name="LaunchID" type="text" id="LaunchID" /></p>
<p><input name="Submit" type="submit" value="Delete task" /></p>
</form>
HTML — Change task deadline (LaunchAction=5):
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/TaskManager.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
<input name="LaunchAction" type="hidden" id="LaunchAction" value="5" />
</p>
<p>Task number: <input name="LaunchID" type="text" id="LaunchID" /></p>
<p>Task deadline: <input name="ExpireTime" type="text" id="ExpireTime" value="yyyy/MM/dd HH:mm:ss"/></p>
<p><input name="Submit" type="submit" value="Change task deadline" /></p>
</form>
HTML — Query send status using JobID (omit JobAction); Delete (JobAction=1), Terminate (2), Pause (3), Resume (4), Restart (5): use the same form, changing the hidden JobAction value:
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/TaskManager.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
<input name="JobAction" type="hidden" id="JobAction" value="1" />
</p>
<p>Send number: <input name="JobID" type="text" id="JobID" /></p>
<p><input name="Submit" type="submit" value="Delete send" /></p>
</form>
Status
Call URL: https://api.itpison.com/WebAPI/status.aspx
Endpoint: status.aspx | Method: GET or POST (determined by Web.config) | Auth: ManagerLoginName + ManagerPassword
Outline definition (condensed)
Same shared conventions as the other WebAPI endpoints: GET/POST per Web.config; Unicode encoding; three return modes: XML, CSV, file download (Content-Disposition: attachment); redirect URLs ReferUrl / SuccessfulUrl / FailedUrl (the last when ErrorCode > 0); merge keywords %omisquerystring%, %errorcode%, %errormsg%, %launchid%, %userid%, %customerid%, %reportpath%, %jobid%. Document conventions: underlined text = input parameter field name; [PostedFile] = input type="file"; case-insensitive except where required (passwords, English names); GET passes parameters only, file uploads require POST.
Status — Query email status
Purpose: Query the status of an email.
Required fields: ManagerLoginName, ManagerPassword, LaunchID, and the query target: EmailAddress or (ExternRefNum + JobType).
| Parameter | Type | Required | Description |
|---|---|---|---|
ManagerLoginName |
string | Yes | API management account. |
ManagerPassword |
string | Yes | API management password. |
LaunchID |
string | Yes | Task number. |
JobType |
int | Conditional | 2: email. Required when querying by ExternRefNum. |
EmailAddress |
string | Conditional | Email address (query target). |
ExternRefNum |
string | Conditional | Custom keyword (query target). |
Query methods (two ways):
LaunchID+EmailAddressLaunchID+ExternRefNum+JobType
When EmailAddress is used as the query condition, the system automatically determines JobType. When only the custom keyword ExternRefNum is used, JobType must also be set.
ErrorCode returns 110 in the following cases:
- No data found for the specified condition.
- Data was found, but the task or send it belongs to was not produced by you or by a user you created.
Returned ErrorCode list
| ErrorCode | ErrorMsg | Description |
|---|---|---|
| 100 | Exception | Exception. |
| 102 | Incorrect Request | Incorrect request. |
| 110 | Data is not found | No data found (see the two cases above). |
| 111 | Incorrect JobType | JobType is incorrect. |
| 1000 | No Licence at Page | No license for this page. |
Email status fields
The "Front/Back" column indicates whether the status pool belongs to the pre-send (front) or post-send (back) phase.
| Field name | Description | Front/Back |
|---|---|---|
EmailSendCachePool |
Email waiting in the schedule queue. | Front |
EmailDeliverSuccessPool |
Email delivered to the recipient's mail system. (Represents a successful send.) | Front |
EmailSendSuccessPool |
Email sent successfully. | Front |
EmailSendBackupPool |
Email list listing. | Front |
EmailActivePool |
Email valid. | Front |
EmailInactivePool |
Email unrecognizable. | Front |
EmailInvalidPool |
Email invalid list. | Front |
EmailAdjustPool |
Email corrected list. | Front |
EmailRemoveReturnPool |
Email removed known-bounce list. | Front |
EmailRemoveBlackListPool |
Email deleted blacklist. | Front |
EmailRemoveWhiteListPool |
Email deleted whitelist. | Front |
EmailRemoveListProcessPool |
Email filtered invalid mail. | Front |
EmailOpenStatus |
Records the details of each open activity. | Back |
EmailClickStatus |
Records the details of each click activity. | Back |
EmailReturnStatus |
Records the status, time, and reason each email was bounced. (Represents a send failure or bounce.) | Back |
EmailErrorStatus |
Records emails that failed to send. | Back |
EmailSubscribeStatus |
Records the time and type of each email subscription. | Back |
EmailUnsubscribeStatus |
Records the time and type of each email unsubscribe. | Back |
EmailContactStatus |
Records the message content and time of each contact/message-board email. | Back |
EmailReplyStatus |
Records the time and type of each email reply. | Back |
EmailScoreStatus |
Records the details of each score. | Back |
EmailSendSuccessStatus |
Records the details of user emails already delivered to the server for processing. | Back |
EmailActiveStatus |
Records the details of emails the customer has received. | Back |
EmailInactiveStatus |
Records the details of emails bounced by the customer. | Back |
EmailSendErrorStatus |
Records the details of send failures. | Back |
EmailInvalidPool |
Records the email address and delivery time of invalid mail. | Back |
EmailAdjustPool |
Records the email address and delivery time of corrected mail. | Back |
EmailRemoveReturnPool |
Records the email address and removal time of bounced mail. | Back |
EmailRemoveBlackListPool |
Records the email address and delivery time of mail removed by blacklist. | Back |
EmailRemoveWhiteListPool |
Records the email address and delivery time of mail removed by whitelist. | Back |
EmailRemoveListProcessPool |
Records the email address and delivery time of mail removed by list processing. | Back |
Notes:
- EmailDeliverSuccessPool represents a successful send.
- EmailReturnStatus represents a send failure or a bounce.
Code examples
HTML example: Query email status
<form id="form1" name="form1" enctype="multipart/form-data" method="post"
action="https://api.itpison.com/WebAPI/status.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="API account" />
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="API password" />
</p>
<p>LaunchID<input name="LaunchID" type="text" id="LaunchID" /></p>
<p>EmailAddress<input name="EmailAddress" type="text" id="EmailAddress" /></p>
<p><input name="Submit" type="submit" value="Query email status" /></p>
</form>
Directory / Folder API
What this API is: This is not a RESTful JSON or .aspx WebAPI. It is a file/folder drop ("hot folder") interface. You submit a send job by writing files into a structured directory tree on a shared network path (a UNC path such as \\<drop-folder host>\<your account>\FolderRequest\). The system polls those directories, picks up the job, sends the email, and writes results back to a Response folder. There are no HTTP methods, URLs, or REST-style status codes. The "endpoints" are network directory paths; the "request body" is a config file (Launch.txt) together with data files; the "auth" is account credentials placed inside Launch.txt. Source: Directory API User Guide, V1.1, 2021/02.
Drop-Folder setup needs engineering on both sides: your system drops the files, and our engineers configure the rest with your team. Drop-Folder is available on Dedicated Server and Hybrid Cloud only. Your system reaches the drop location over a shared network path (UNC) or SFTP. Connections can be locked to your IP addresses.
In the tables below, <MainDirectory>\ denotes the job's custom-named main directory.
1. Overview
To send a job, store the job's files in a directory with a custom name; this is the Main Directory. Place the files and settings into the designated sub-directories. Once everything is in place, drop an empty marker file next to the Main Directory that has the same name as the Main Directory but with the extension .ok, to signal that file placement is complete. Only then are the files picked up and sent as email.
The xxx.ok file must be placed last.
Launch.txtis the configuration file. It is placed one level inside the Main Directory folder.- The Main Directory name is used as the default
JobNameandRefNumber. - A
Responsedirectory can be set up to receive returned (result) data.
Return parameters (overview):
| Field | Description |
|---|---|
LaunchID |
Task ID |
RefNumber |
Reference number (same as the Main Directory name) |
ErrorCode |
0 = success; any other value = failure |
ErrMsg |
If successful, there is no error message |
Directory API access paths (the "endpoints"; adjustable per actual requirements):
Email \\<drop-folder host>\<your account>\FolderRequest\
2. Supported file formats
| Location | File | Format | Encoding | Notes |
|---|---|---|---|---|
<MainDirectory>\ |
Config file (Launch.txt) |
TXT | UTF-8 | |
<MainDirectory>\ATTACHMENT\LIST\ |
Attachment (different recipients get different attachments) | HTML, TXT, ZIP, RAR | In the list file, set Title : CommonAttachment; the value is the attachment's file name (extension required). |
|
<MainDirectory>\ATTACHMENT\COMMON\ |
Attachment (different recipients get the same attachment) | HTML, TXT, ZIP, RAR | ||
<MainDirectory>\EXTRA\ |
Image | JPG, PNG | If the content is only a single image, place it here and in the list file set Title : CommonAttachment and EmailContentSource; the value is the attachment's file name (extension required). |
|
<MainDirectory>\CONVERT\LIST\ |
List file | CSV, TXT | UTF-8 | |
<MainDirectory>\CONVERT\BLACK\ |
Blacklist file | TXT | UTF-8 | After placing the file, add the ListOption setting in Launch.txt. See Section 3. |
<MainDirectory>\CONVERT\WHITE\ |
Whitelist file | TXT | UTF-8 | After placing the file, add the ListOption setting in Launch.txt. See Section 3. |
<MainDirectory>\CONVERT\HTML\ |
Content file (same content) | HTML, TXT, ZIP, RAR | UTF-8 | |
<MainDirectory>\MERGE\ |
Content file (different content) | HTML, TXT, ZIP | UTF-8 | In the list file, set Title : EmailContentSource; the value is the content file's name (extension required). |
3. Launch.txt config file — parameter reference
In the Main Directory, create a Launch.txt config file (the file name is fixed). Enter all job settings here. Format: Parameter=Value, one per line (order does not matter). Omitted settings use the system default.
Common parameters
TriggerProcess is one line with seven ;-separated fields: TriggerProcessType;TriggerType;TriggerActionType;0;0;;TriggerActionParameter. The rows below describe those fields.
| Parameter | Type | Required | Description |
|---|---|---|---|
UserID |
string | One login param | User ID. |
UserLoginName |
string | One login param | When UserID is not set, UserLoginName can be used instead. |
LoginName |
string | Optional | Equivalent to UserLoginName. |
UserLoginPassword |
string | Optional | Login password. |
LoginPassword |
string | Optional | Login password. |
BlackList |
string | No | Add the entered contacts as a blacklist (email addresses; separate with a half-width comma). |
BlackListUrl |
string (URL) | No | Set the blacklist by URL; the system auto-fetches the list file (multiple BlackListUrl lines allowed). e.g. BlackListUrl=https://XXXX/var/Black1.txt |
CategoryName |
string | No | Task category (provided by OMICard). |
CharacterSetID |
number | No | Language/charset. 112: UTF-8. |
DelayTime |
number (sec) | No | Delay-before-send time (seconds). |
JobName |
string | No | Task name (defaults to the Main Directory name). |
LaunchExpireTime |
datetime | No | Launch cut-off time (absolute: YYYY-MM-DD HH:MM:SS). |
LaunchOption |
number | No | Task option. 1: delete all task directories and files after completion. 32: do not produce a new send directory. |
LaunchType |
number | No | Task type. 0: Production (default); 4: Test; 10: Small batch; 60: OTP. |
ListOption |
number | No | List processing (additive). 32: remove unsubscribe list (also set RemoveUnsubscribe=<newsletter group ID>). 64: remove duplicates. 128: remove blacklist. 256: apply the whitelist: only addresses on the whitelist are sent; everyone else is removed from the list. Example: blacklist (128) + duplicates (64) = 192. |
ListUrl |
string (URL) | No | Set the list by URL; the system auto-fetches the list file (multiple ListUrl lines allowed; <MainDirectory>\CONVERT\LIST must contain no files). e.g. ListUrl=https://XXXXXX/var/List.txt |
NextLaunchTime |
datetime | No | Launch time (absolute: YYYY-MM-DD HH:MM:SS). |
PendingTimeInfo |
string | No | Send-pause time ranges. Join two times with ~; separate ranges with commas, e.g. 02:00~04:00,06:30~08:30 |
RefID |
number | No | Task reference ID (numeric). |
RefInfo |
text | No | Task reference data (text). |
RefNumber |
string | No | Task reference number (defaults to the Main Directory name). |
ReportClass |
number | No | Report class (default 0: no auto report; 1: a single one-off task generates a report). |
ReportType |
string | No | Report type (comma-separated; default blank — no report; if one entry whose value is 0, all reports are generated). |
SendExpireTime |
datetime | No | Send cut-off time (absolute: YYYY-MM-DD HH:MM:SS). |
SendRetryRequest |
number | No | Resend-count requirement (compared against the send server's configured count, currently 6; the smaller number wins). |
TriggerProcess |
string | No | Sends a trigger email. Format: TriggerProcess=TriggerProcessType;TriggerType;TriggerActionType;0;0;;TriggerActionParameter. Example: TriggerProcess=0;120,124,125;2;0;0;;XXXX@itpison.com |
TriggerProcessType |
number | No | Trigger processing type. 0: send notification; 1: open notification. |
TriggerType |
number | No | Trigger type (comma-separated). 120: task started; 121: task launch error; 122: task launch completed; 123: send started; 124: send failed; 125: send completed. |
TriggerActionParameter |
string | No | 7th field of TriggerProcess: the email address(es) that receive the trigger email. |
TriggerActionType |
number | No | Enter 2, the "send email" trigger action. |
ValidTime |
number (sec) | No | Task (tracking) valid time (seconds). |
WhiteList |
string | No | Add the entered contacts as a whitelist (email addresses; separate with a half-width comma). |
WhiteListUrl |
string (URL) | No | Set the whitelist by URL; the system auto-fetches the list file (multiple WhiteListUrl lines allowed). e.g. WhiteListUrl=https://XXXX/var/White.txt |
Email-specific parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
From |
string | No | Sender mailbox. |
FromDisplay |
string | No | Sender display name. |
HtmlUrl |
string (URL) | No | Set email content by URL (<MainDirectory>\CONVERT\HTML must contain no files). e.g. HtmlUrl=https://XXXXXX/var/HTML.html |
JobOption |
number | No | Content settings (additive). 8: convert HTML to plain text. 512: convert content to Unicode. 8192: auto-adjust charset by body language. 16384: auto-adjust header charset by body language. 262144: auto-convert body file to web-page format. 2097152: archive web page as a single file (*.mht). |
Reply |
string | No | Reply mailbox. |
ReplyDisplay |
string | No | Reply display name. |
SendValidTime |
number (sec) | No | Send valid time (seconds), relative to the task launch time. SendExpireTime takes precedence if both are set. |
Subject |
string | No | Subject. |
Text |
string | No | Email content (plain text). |
TextUrl |
string (URL) | No | Set plain-text email content by URL (<MainDirectory>\CONVERT\HTML must contain no files). e.g. TextUrl=https://XXXXXX/var/Text.txt |
4. Return parameters
When the Main Directory is picked up, the return parameters are written as a text file into the Response folder (at the same level as the folder holding the Main Directory). See Section 1 for the field descriptions.
5. Examples (summary)
Email
- Set recipients: place the list file in <MainDirectory>\CONVERT\LIST\ (CSV or TXT; add the recipient's email under the EmailAddress Title).
- Set blacklist: place the file in <MainDirectory>\CONVERT\BLACK\ and add ListOption=128 to Launch.txt.
- Set whitelist: place the file in <MainDirectory>\CONVERT\WHITE\ and add ListOption=256 (apply whitelist) to Launch.txt.
- Same content to many: list in <MainDirectory>\CONVERT\LIST\; content in <MainDirectory>\CONVERT\HTML\.
- Same attachment to many: list in <MainDirectory>\CONVERT\LIST\; attachment in <MainDirectory>\ATTACHMENT\COMMON\.
- Different content per recipient: in the list file add the per-recipient content file name (extension required) under the EmailContentSource Title; place files in <MainDirectory>\MERGE\.
- Different attachments per recipient: in the list file add the per-recipient attachment file name (extension required) under the CommonAttachment Title; place files in <MainDirectory>\ATTACHMENT\LIST\.
SMTP Relay / Outlook Setup
What this document is: A configuration and how-to guide for the OMICard SMTP relay service, not a REST endpoint. It covers enabling SMTP in the OMICard portal, the SMTP server host, port and encryption settings, web-based test tools, a Python sample, troubleshooting, and an advanced section on controlling send behavior with custom email X- headers. Source: OMICard "Integrating SMTP" operations manual.
1. Summary
Sending a newsletter can be as simple as sending in Outlook. By sending through the ITPishon SMTP relay, enterprise IT teams and developers avoid the cost of managing a mail server. You only route outbound mail through the ITPishon mail-sending server.
Setup steps: (a) configure OMICard and enable the option; (b) configure SMTP.
SMTP settings (quick reference):
SMTP Server: smtp.itpison.com
Port: 465
SSL encryption
Requires account authentication — enter your OMICard login account and password.
Important: For SMTP testing, if you have not yet finished configuring your mail DNS (SPF, DKIM, DMARC), do not use your company's internal mailbox address, because it will be blocked by your company's mail server. Test with Gmail first, confirm SMTP works, finish mail DNS, then test with a company mailbox.
2. OMICard configuration
- Email support@itpison.com to get your account set up.
- Once your account is active, SMTP is available automatically. There is nothing to enable.
3. SMTP settings
The internationally customary SMTP ports are 25, 587, and 465. Transmission encryption is via SSL or TLS (STARTTLS). With SSL, encryption begins as soon as the connection is established; with STARTTLS, encryption begins only after the connection is established and encryption is specifically requested. Any port can use a different encryption method; the client follows the SMTP server's stated settings.
Customary ports:
- 25: the earliest standard SMTP port, usually unencrypted (can be encrypted if both parties agree).
- 465: commonly the SSL port; most modern mail systems use this port with encryption.
- 587: commonly provided for TLS (STARTTLS).
Besides these, ITPishon can provide a specific port on request.
Port 25 — no encryption
SMTP Server: smtp.itpison.com
(backup: smtp2.itpison.com)
Account: OMICard login account
Password: OMICard login password
Port: 25
Encryption level: None (unencrypted)
Port 465 — SSL encryption
SMTP Server: smtp.itpison.com
(backup: smtp2.itpison.com)
Account: OMICard login account
Password: OMICard login password
Port: 465
Encryption level: SSL
TLS (STARTTLS)
SMTP Server: smtp.itpison.com
(backup: smtp2.itpison.com)
Account: OMICard login account
Password: OMICard login password
Port: 25, 587
Encryption level: TLS (STARTTLS)
When using SSL/TLS, some clients verify the certificate. The certificate used by smtp.itpison.com is the whole-domain certificate *.itpison.com. If encryption persistently fails to connect, switch to connecting to smtp.itpison.com.
SMTP error: Unable to connect to SMTP host. Connection failed. stream_socket_enable_crypto: Peer certificate CN='*.itpison.com' did not match expected CN='smtp.itpison.com'
4. SMTP testing
Web-based SMTP test tools:
- https://www.gmass.co/smtp-test
- https://www.smtper.net/
- https://dnschecker.org/smtp-test-tool.php
Enter SMTP Server: smtp.itpison.com and Port: 25 or 465 (encrypted). After starting the test you can see the full SMTP data-transmission process. If a test errors, try a different site to rule out the site itself. When you receive the test email (body: a single line "Test message"), all SMTP settings succeeded. If you cannot receive it, provide the transmission-process error message to ITPishon for inspection.
5. Python sample
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
# SMTP server configuration
smtp_server = "smtp.itpison.com"
smtp_port = 465
smtp_username = "login name"
smtp_password = "login password"
# Email content
from_email = "sender email address"
from_name = "sender name"
to_email = "recipient email address"
to_name = "recipient name"
reply_to_email = "reply-to address"
subject = "Test Mail"
html_body = """
<p>This is a test email.</p><br>
"""
# Create message container
msg = MIMEMultipart("alternative")
msg["From"] = f"{from_name} <{from_email}>"
msg["To"] = f"{to_name} <{to_email}>"
msg["Subject"] = subject
msg["Reply-To"] = reply_to_email # set the Reply-To header
# Attach the HTML body
msg.attach(MIMEText(html_body, "html"))
try:
# Connect to the SMTP server
server = smtplib.SMTP_SSL(smtp_server, smtp_port)
server.login(smtp_username, smtp_password)
# Send email
server.sendmail(from_email, to_email, msg.as_string())
server.quit()
print("Message has been sent")
except Exception as e:
print(f"Message could not be sent. Error: {str(e)}")
6. Common error troubleshooting
- SMTP data entered incorrectly: check that SMTP is set to "Enable" in your account and that the SMTP parameters match this manual exactly.
- Your own network blocks outbound SMTP: home dynamic IP (fiber, ADSL), mobile 4G/5G, or shared virtual hosting may block outbound port
25. If web-based tests receive mail but your own network cannot connect tosmtp.itpison.comport25, your network has blocked outbound SMTP; usually a fixed-IP line is needed for outbound port25.
7. [Advanced] SMTP connection send-parameter settings via X- headers
This advanced option uses email headers to issue send commands.
Over an SMTP connection (25/465/587, SSL/TLS), the User default options can be set in EmailUserLaunchSettingInfo, or control options can be added to the email header as X- headers. The following can be combined:
| # | Parameter | Header name |
|---|---|---|
| 1 | JobName |
X-JobName |
| 2 | RefNumber |
X-RefNumber |
| 3 | NextLaunchTime |
X-NextLaunchTime |
| 4 | LaunchExpireTime |
X-LaunchExpireTime |
| 5 | LaunchType |
X-LaunchType |
| 6 | LaunchClass |
X-LaunchClass |
| 7 | LaunchOption |
X-LaunchOption |
| 8 | JobOption |
X-JobOption |
| 9 | ListOption |
X-ListOption |
| 10 | LinkOption |
X-LinkOption |
For the option values, see Appendix A: EmailOptions.
X-Header examples
Do not track opens:
X-LinkOption: 64
From: test@itpison.com
To: test@gmail.com
Subject: Test Sample
This is Test Email
Python example (add custom header):
import smtplib
from email.mime.text import MIMEText
# SMTP server configuration
smtp_server = "smtp.itpison.com"
smtp_port = 465
smtp_username = "login name"
smtp_password = "login password"
# Email content
from_email = "test@itpison.com"
to_email = "test@gmail.com"
subject = "Test Sample"
custom_header_key = "X-LinkOption"
custom_header_value = "64"
body = "This is Test Email"
# Create email message
msg = MIMEText(body, "plain")
msg["From"] = from_email
msg["To"] = to_email
msg["Subject"] = subject
msg.add_header(custom_header_key, custom_header_value) # add custom header
try:
server = smtplib.SMTP_SSL(smtp_server, smtp_port)
server.login(smtp_username, smtp_password)
server.sendmail(from_email, to_email, msg.as_string())
server.quit()
print("Message has been sent")
except Exception as e:
print(f"Message could not be sent. Error: {str(e)}")
Other X- header examples:
| Effect | Header |
|---|---|
| Do not track links | X-LinkOption: 128 |
| Do not track opens and links | X-LinkOption: 192 |
| Keep all To headers | X-ListOption: 1 |
| Keep all Cc headers | X-ListOption: 2 |
| Do not filter the list | X-ListOption: 65536 |
Appendix A: EmailOptions
Reproduced verbatim from source (C/C++ constant definitions). Inline // comments are from the source.
1. LaunchOption
const int cLHRemoveFilesAfterCompleteOption=1;
const int cLHRemoveDataAfterCompleteOption=2;
const int cLHPendApproveOption=4; // pended launch after approved
const int cLHAutoGenRefNumberOption=8;
const int cLHProcessSubListOption=16;
const int cLHNotCreateJobFolderOption=32; // launcher will use launch folder as job folder
const int cLHNotCreateLaunchFolderOption=64; // requester save everyhing, string, filepath, in db
const int cLHCreateJobOption=128; // requester creat job if possible
const int cLHMLContentSampleListOption=256; // multi-launch content
const int cLHCheckExtTimeOption=512; // Check StartTime, ExpireTime From LaunchExtTimeInfo
const int cLHCheckListOption=1024; // Check List Count From LaunchCheckListInfo
2. JobOptions
const unsigned int cJBDoResendMask=1;
const unsigned int cJBActiveContentMask=2; // for asp or aspx dynamic merge content
const unsigned int cJBCreateReportMask=4;
const unsigned int cJBConvertHtmlToTextFormat=8;
const unsigned int cJBDynaMergeMask=16; // use dyna merge
const unsigned int cJBMergeDelMask=32; // user defined merge del
const unsigned int cJBProcessOptionMask=64; // user defined Process option
const unsigned int cJBBackupSendMessage=128; // backup a copy of EML
const unsigned int cJBAuditSendMessage=256; // audit send EML
const unsigned int cJBConvertContentToUTF8Mask=512;
const unsigned int cJBAddContentLocationToHtml=1024;
const unsigned int cJBGetSubjectFromHTMLTitleMask=2048;
const unsigned int cJBAutoAdjustCharSetToContentCharSet=8192; // auto adjust charset according to email content otherwise adjust content accoring to job charset
const unsigned int cJBAutoAdjustHeaderCharSetToContentCharSet=16384; // auto adjust subject, fromdisplay,replydisplay, todisplay charset as same as content
const unsigned int cJBLandSameWebFolderOnly=32768; // if tracklayer > 0, only get the page from the same web folder
const unsigned int cJBAutoGetLandPageMask = 131072;
const unsigned int cJBConverTextToHTMLMask = 262144;
const unsigned int cJBAddExternRefToEmailMask = 1048576;
const unsigned int cJBSaveWebPageAsMht=2097152;
const unsigned int cJBHtmlExtElementMask=134217728;
const unsigned int cJBAddOutlookDeliveryReceiptMask =268435456;
const unsigned int cJBAddOutlookReadReceiptMask =536870912;
const unsigned int cJBRemoveFilesAfterComplete=2147483648;
3. LinkOption
const unsigned int cLKConvertExtLinkToIntResource=1; // 0: convert cid, content-location images to link 1: convert link to cid
const unsigned int cLKAddQStrToLinkMask=2; // add external GA parameters
const unsigned int cLKKeepDuplicateLinkMask=4;
const unsigned int cLKAutoCleanLink=8; // remove amp; from link
const unsigned int cLKAddBaseToUrl=16;
const unsigned int cLKAutoGetLinkNameFromTextMask=32;
const unsigned int cLKNotTrackOpenMask=64;
const unsigned int cLKNotTrackAllLinkMask=128;
const unsigned int cLKTrackNameLinkOnlyMask=256;
const unsigned int cLKNotTrackMailToLinkMask=512;
const unsigned int cLKTrackFrameLinkMask=1024;
const unsigned int cLKNotConvertImageAsOpenLinkMask =8192;
const unsigned int cLKTrackQRCodeLinkMask=16384;
4. ListOption
const unsigned int cLTKeepToHeader=1; // keep job's to
const unsigned int cLTKeepCcHeader=2;
const unsigned int cLTAutoAdjustInvalidList=8;
const unsigned int cLTNoLineEsc=16;
const unsigned int cLTRemoveUnsubMask=32;
const unsigned int cLTRemoveDupMask=64;
const unsigned int cLTRemoveBlackMask=128;
const unsigned int cLTRemoveWhiteMask=256;
const unsigned int cLTRemoveReturnMask=512;
const unsigned int cLTSampleListOnly=1024;
const unsigned int cLTSampleAndSendAll=2048;
const unsigned int cLTCheckListFileTypeFromListContent=4096;
const unsigned int cLTNotExpandToAddress=8192; // not add list column to to list
const unsigned int cLTNotExpandCcAddress=16384; // not add list column cc to list
const unsigned int cLTNotExpandBccAddress=32768; // not add list column bcc to list
const unsigned int cLTBypassAllListProcessFilter=65536; // Bypass all list filtering and processing and Add List to NewListPool
const unsigned int cLTRemoveDeliverMask = 131072;
const unsigned int cLTRemoveResponseMask = 262144;
const unsigned int cLTNotToRemoveSystemBlackMask=524288;
const unsigned int cLTNotToRemoveSystemRemoveWhiteMask=1048576;
5. FormerOption
a. Content
const int cFormerCTHtmlMask=1;
const int cFormerCTTextMask=2;
const int cFormerCTAttachmentMask=4;
const int cFormerCTMergeMask=8;
const int cFormerCTSubjectMask=16;
const int cFormerCTFromDisplayMask=32;
const int cFormerCTReplyDisplayMask=64;
const int cFormerCTToDisplayMask=128;
b. List
const int cFormerLTUnknownMask=1; // not open
const int cFormerLTOpenMask=2;
const int cFormerLTOpenNotClickMask=4;
const int cFormerLTClickMask=8;
const int cFormerLTForwardMask=16;
const int cFormerLTForwardOutMask=32;
const int cFormerLTReturnMask=64;
const int cFormerLTReplyMask=128;
const int cFormerLTUnsubscribeMask=256;
const int cFormerLTSubscribeMask=512;
const int cFormerLTContactMask=1024;
const int cFormerLTSendErrorMask=2048;
const int cFormerLTClickNotOpenMask=4096;
6. AttachOption
a. Bit position
1st bit: 0: no convert to link, 1 convert to link
2nd bit: (only when 1st bit is 0) 0: no authenticate, 1 Authenticate Page
3rd bit: (only when 1st bit is 1) 0: not track link , 1 track link
4th bit: (only when 2nd bit is 1) 0: system show authenticate accept page 1: third Party show authenticate accept Page (when AuthenticateURl is presented)
5th bit: (only when 2nd bit is 1 and only if 3rd bit is 0) 0: form post back to system (if AuthenticateURl is presented then 3rd part authenticate, otherwise system suthenticate), 1 form post directly to third Party authenticate Page (when AuthenticateURl is presented)
//6th bit: 0 form post, 1 form get
6th bit: (only when 1st bit is 1) 0: one attchamen link one line 1: align all attachment links in one line
7th bit: 1 convert attachment to PDF
8th bit: 0: checksource is referer 1: checksource is ip
9th bit: 1 Support Dynamic Merge, such asp, aspx
10th bit: 1 compress attachment
11th bit: 1 uncompress attachment
12th bit: 1 check/determine attachment as email list by comparing system/user defined name (AttAsListFileName), usually check attachments from eml file
13th bit: 1 support Dynamic function Merge
14th bit: 1: track open
15th bit: 1: track click
b. const
const int cAttachConvertLinkMask=1;
const int cAttachAuthenticateMask=2;
const int cAttachTrackLinkMask=4;
const int cAtachShowThirdPartyMask=8;
const int cAttachPostThirdPartyMask=16;
//const int cAttachGetMask=32;
const int cAttachAlignLinkMask=32;
const int cAttachConvertPDFMask=64;
const int cAttachCheckSourceIPMask=128;
const int cAttachSupportActiveMergeMask=256;
const int cAttachCompressMask=512;
const int cAttachUnCompressMask=1024;
const int cAttachAsListFileMask=2048;
const int cAttachSupportDynaMergeMask=4096;
const int cAttachTrackOpenMask=8192;
const int cAttachTrackClickMask=16384;
7. Link Position
enum eAddPosition
{
eTopLeft=0,
eTopMiddle=1,
eTopRight=2,
eBottomLeft=3,
eBottomMiddle=4,
eBottomRight=5,
eMergeLink=9
};
8. LinkType
const int cLinkMask=255;
const int cMergeLinkMask=256;
const int cFrameLinkMask=512;
const int cLandLinkMask=1024;
const int cHTMLLinkMask=2048;
const int cTextLinkMask=4096;
const int cOpenLinkMask=8192;
const int cQrcodeLinkMask=16384;
const int cAddEmailMask=32768;
const int cAddRefMask=65536;
const int cAddQStrMask=131072;
const int cNoUrlEncode=262144;
const int cReadReciptMask=524288;
9. LinkClass
enum ELinkClassType
{
eRegularLink=0,
eOMISLink=1,
eApproveLink=2,
eForwardLink=3,
eUnsubscribeLink=4,
eSubscribeLink=5,
eContactLink=6,
eAuthenticateLink=7,
eRegisterLink=8,
eOrderLink=9,
eUpdateLink=10,
eQuestionaryLink=11,
eActivateLink=12,
eFromActivateLink=13,
eAgreeLink=14,
eConfirmLink=15,
eStateLink=16,
eReceiptLink=17,
eEmailBodyLink=100,
eAttachmentLink=128,
eAttachReceipt=129,
eAttachReceipt2=130
};
// JobType=2 => DeliverType
enum EDeliveryType
{
eEmail=0,
eNews=1
};