1. General
The base API URL is https://em-api.kmatrixonline.com
1.1. HTTP headers
All eM API endpoints require an authorized token to access, you need to supply your API key with the Authorization header. For request that require a valid JSON object for the body, you need to set the Content-Type header too.
|
|
|
|
1.2. HTTP methods
The eM API supports some of the following 5 HTTP methods for interacting with resources:
| Verb | Usage |
|---|---|
|
Used to retrieve a resource |
|
Used to create a new resource |
|
Used to update an existing resource (complete replacement) |
|
Used to update an existing resource (partial) |
|
Used to delete an existing resource |
1.3. HTTP response code
| Code | Description |
|---|---|
|
Action completed successfully. |
|
Bad request. Wrong parameters supplied or you requested to add or update an already existing resource. |
|
Unauthorized. Wrong credentials entered or API key expired. |
|
Forbidden. Your account do not have the right to access a particular endpoint. |
|
Not found. Some resource is not found in your request. |
|
Internal server error. Please contact our support with the |
1.4. Pagination
For endpoints that paginate the result, you can control and iterate the result with the following request parameters
| Name | Type | Optional | Description |
|---|---|---|---|
page |
Integer |
false |
Page you want to retrieve, the first page is indexed |
size |
Integer |
false |
Size of the page you want to retrieve, defaults to |
sort |
String |
false |
Fields that should be sorted by in the format Please note that not all fields are supported for sorting |
|
For example, to sort the result by descending
|
Pagination response has following structure:
| Path | Type | Description | |
|---|---|---|---|
content |
Array[Object] |
Actual items. |
|
page |
Object |
||
first |
Boolean |
|
|
last |
Boolean |
|
|
totalPages |
Integer |
Total pages with current page size. |
|
totalElements |
Integer |
Total count. |
|
totalPages |
Integer |
Total pages with current page size. |
|
numberOfElements |
Integer |
Actual size of content array (number of items). |
|
size |
Integer |
Requested size of the page. |
|
number |
Integer |
Page number. |
|
sort |
Object |
Contains a list of the following object, empty if no |
|
property |
String |
the sorted property |
|
direction |
String |
|
|
1.5. Filter list result
Most paginated list can be filter with the following query parameter pattern. (customer list do not support filtering yet)
|
|
The fieldName is one of the sortable list response field and operatorCode is list in the following table.
| code | meaning | example query |
|---|---|---|
|
equals to |
|
|
not equals to |
|
|
greater than |
|
|
greater than or equals to |
|
|
less than |
|
|
less than or equals to |
|
|
contains |
|
|
not contains |
|
|
Datetime value in query can be specify with the following format
|
2. Account
2.1. Get Account
GET /v1/account
2.1.1. Response fields
| Path | Type | Description |
|---|---|---|
name |
String |
Name of this account. |
company |
String |
Company name of this account. |
String |
Contact email of this account. |
|
phone |
String |
Contact phone number of this account. |
emailCredit |
Decimal |
Email credit remaining. |
smsCredit |
Decimal |
SMS credit remaining. |
maxCustSize |
Integer |
Maximum number of contacts. |
emailPlanExpiryDate |
String |
Email credit expiry date. |
smsPlanExpiryDate |
String |
SMS credit expiry date. |
2.1.2. Example request
GET /v1/account
2.1.3. Example response
HTTP/1.1 200 OK
{
"name" : "Master",
"company" : "k-matrix",
"email" : "em.admin@emailprovider.com",
"phone" : "",
"emailCredit" : 100,
"smsCredit" : 10.0,
"maxCustSize" : 100,
"emailPlanExpiryDate" : "2099-01-01T23:59:59.000+0800",
"smsPlanExpiryDate" : "2099-01-01T23:59:59.000+0800"
}
3. Email Identity
3.1. Create Identity
POST /v1/identities/emails
3.1.1. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
name |
String |
false |
Email identity name. Size must be between 0 and 255 inclusive. |
fromName |
String |
false |
Sender name. Size must be between 0 and 255 inclusive. |
fromEmail |
String |
false |
Sender email address. Must be a well-formed email address. |
replyToEmail |
String |
true |
Email address to receive reply. Must be a well-formed email address. |
bounceEmail |
String |
true |
Email address to receive bounce back. Must be a well-formed email address. |
header |
String |
true |
HTML code of the email header. |
footer |
String |
true |
HTML code of the email footer. |
3.1.2. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
ID of the created / edited item. |
3.1.3. Example request
POST /v1/identities/emails
{
"name" : "Test Identity",
"fromName" : "John",
"fromEmail" : "john@emailprovider.com",
"replyToEmail" : "john@emailprovider.com",
"bounceEmail" : "john@emailprovider.com",
"header" : "<div style='font: 13px arial,sans-serif; padding-bottom:3px;'>If you cannot read the following message, please click <a href='al-email-view'>here</a></div>",
"footer" : "<div style='font: 13px arial,sans-serif; padding-bottom:3px;'>To be removed from our mailing list, please click <a href='al-email-unsubscribe-en'>here</a></div>"
}
3.1.4. Example response
HTTP/1.1 200 OK
{
"id" : 3
}
3.2. Update Identity
PUT /v1/identities/emails/{id}
3.2.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
ID of the identity to update. |
3.2.2. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
name |
String |
false |
Email identity name. Size must be between 0 and 255 inclusive. |
fromName |
String |
false |
Sender name. Size must be between 0 and 255 inclusive. |
fromEmail |
String |
false |
Sender email address. Must be a well-formed email address. |
replyToEmail |
String |
true |
Email address to receive reply. Must be a well-formed email address. |
bounceEmail |
String |
true |
Email address to receive bounce back. Must be a well-formed email address. |
header |
String |
true |
HTML code of the email header. |
footer |
String |
true |
HTML code of the email footer. |
3.2.3. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
ID of the created / edited item. |
3.2.4. Example request
PUT /v1/identities/emails/3
{
"name" : "Test Identity (updated)",
"fromName" : "John",
"fromEmail" : "john@emailprovider.com",
"replyToEmail" : "john@emailprovider.com",
"bounceEmail" : "john@emailprovider.com",
"header" : "<div style='font: 13px arial,sans-serif; padding-bottom:3px;'>If you cannot read the following message, please click <a href='al-email-view'>here</a></div>",
"footer" : "<div style='font: 13px arial,sans-serif; padding-bottom:3px;'>To be removed from our mailing list, please click <a href='al-email-unsubscribe-en'>here</a></div>"
}
3.2.5. Example response
HTTP/1.1 200 OK
{
"id" : 3
}
3.3. Get Identity By Id
GET /v1/identities/emails/{id}
3.3.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
ID of the identity to retrieve. |
3.3.2. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
Email identity ID. |
name |
String |
Email identity name. |
fromName |
String |
Sender name. |
fromEmail |
String |
Sender email address. |
replyToEmail |
String |
Reply-to email address. |
bounceEmail |
String |
Bounce-back email address. |
header |
String |
HTML code of the email header. |
footer |
String |
HTML code of the email footer. |
3.3.3. Example request
GET /v1/identities/emails/3
3.3.4. Example response
HTTP/1.1 200 OK
{
"id" : 3,
"name" : "Test Identity (updated)",
"fromName" : "John",
"fromEmail" : "john@emailprovider.com",
"replyToEmail" : "john@emailprovider.com",
"bounceEmail" : "john@emailprovider.com",
"header" : "<div style='font: 13px arial,sans-serif; padding-bottom:3px;'>If you cannot read the following message, please click <a href='al-email-view'>here</a></div>",
"footer" : "<div style='font: 13px arial,sans-serif; padding-bottom:3px;'>To be removed from our mailing list, please click <a href='al-email-unsubscribe-en'>here</a></div>"
}
3.4. Get Identity List
GET /v1/identities/emails
3.4.1. Response fields
Standard paging response where content field is list of following objects:
| Path | Type | Description |
|---|---|---|
id |
Integer |
Email identity ID. |
name |
String |
Email identity name. |
fromName |
String |
Sender name. |
fromEmail |
String |
Sender email address. |
replyToEmail |
String |
Reply-to email address. |
bounceEmail |
String |
Bounce-back email address. |
3.4.2. Example request
GET /v1/identities/emails
3.4.3. Example response
HTTP/1.1 200 OK
{
"content" : [ {
"id" : 1,
"name" : "Default",
"fromName" : "Master",
"fromEmail" : "em.admin@emailproivder.com",
"replyToEmail" : "em.admin@emailproivder.com",
"bounceEmail" : null
}, {
"id" : 3,
"name" : "Test Identity (updated)",
"fromName" : "John",
"fromEmail" : "john@emailprovider.com",
"replyToEmail" : "john@emailprovider.com",
"bounceEmail" : "john@emailprovider.com"
} ],
"page" : {
"first" : true,
"last" : true,
"totalPages" : 1,
"totalElements" : 2,
"numberOfElements" : 2,
"size" : 50,
"number" : 0
},
"sort" : [ ]
}
4. Customer Tag
4.1. Create Tag
POST /v1/tags
4.1.1. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
name |
String |
false |
Name of the Tag. Size must be between 0 and 255 inclusive. |
description |
String |
true |
Description of the Tag. Size must be between 0 and 255 inclusive. |
4.1.2. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
ID of the created / edited item. |
4.1.3. Example request
POST /v1/tags
{
"name" : "Test Tag",
"description" : "This is Test Tag"
}
4.1.4. Example response
HTTP/1.1 200 OK
{
"id" : 1
}
4.2. Update Tag
PUT /v1/tags/{id}
4.2.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
The ID of the customer Tag to update. |
4.2.2. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
name |
String |
false |
Name of the Tag. Size must be between 0 and 255 inclusive. |
description |
String |
true |
Description of the Tag. Size must be between 0 and 255 inclusive. |
4.2.3. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
ID of the created / edited item. |
4.2.4. Example request
PUT /v1/tags/1
{
"name" : "Test Tag",
"description" : "This is Test Tag(updated)"
}
4.2.5. Example response
HTTP/1.1 200 OK
{
"id" : 1
}
4.3. Get Tag By Id
GET /v1/tags/{id}
4.3.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
The ID of the customer Tag to retrieve. |
4.3.2. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
ID of the customer Tag. |
name |
String |
Name of the customer Tag. |
description |
String |
Description of the customer Tag. |
grantedBy |
Integer |
Only for master/child account |
4.3.3. Example request
GET /v1/tags/1
4.3.4. Example response
HTTP/1.1 200 OK
{
"id" : 1,
"name" : "Test Tag",
"description" : "This is Test Tag(updated)",
"grantedBy" : null
}
4.4. Get Tag List
GET /v1/tags
4.4.1. Response fields
Standard paging response where content field is list of following objects:
| Path | Type | Description |
|---|---|---|
id |
Integer |
ID of the customer Tag. |
name |
String |
Name of the customer Tag. |
description |
String |
Description of the customer Tag. |
grantedBy |
Integer |
Only for master/child account |
4.4.2. Example request
GET /v1/tags
4.4.3. Example response
HTTP/1.1 200 OK
{
"content" : [ {
"id" : 1,
"name" : "Test Tag",
"description" : "This is Test Tag(updated)",
"grantedBy" : null
} ],
"page" : {
"first" : true,
"last" : true,
"totalPages" : 1,
"totalElements" : 1,
"numberOfElements" : 1,
"size" : 50,
"number" : 0
},
"sort" : [ ]
}
5. Customer
The add customers and list customers endpoints accept the following field names (case sensitive)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5.1. Add Customers
POST /v1/customers
5.1.1. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
tagIds |
Array[Integer] |
false |
A list of tag ID, to be applied to the added customers. |
fields |
Array[String] |
false |
A list of field names, corresponding to the |
data |
Array[Array[String]] |
false |
A list of data array, each customer is represented by an array that correspond to the |
dateFormat |
String |
true |
Only required if any date field is mapped, default is |
5.1.2. Response fields
| Path | Type | Description |
|---|---|---|
added |
Integer |
No of customer added. |
appliedTag |
Integer |
No of customer applied tag(s). |
duplicated |
Object |
|
duplicated.input |
Integer |
Duplicated in input. |
duplicated.dbOnce |
Integer |
Count of customers with one duplicate in DB. |
duplicated.dbMulti |
Integer |
Count of customers with multiple dupcates in DB. |
invalid |
Object |
|
invalid.length |
Integer |
Field length excced 255. |
invalid.email |
Integer |
Invalid email format. |
invalid.mobile |
Integer |
Invalid mobile number format. |
invalid.birthdate |
Integer |
Invalid date format. |
invalid.joindate |
Integer |
Invalid date format. |
invalid.expirydate |
Integer |
Invalid date format. |
invalid.emptyKey |
Integer |
Missing duplicate checking field. |
5.1.3. Example request
POST /v1/customers
{
"tagIds" : [ 1 ],
"fields" : [ "DisplayName", "Email" ],
"data" : [ [ "b001", "b001@gmail.com" ], [ "b002", "b002@gmail.com" ], [ "b003", "b003@gmail.com" ], [ "b003", "b003@gmail.com" ], [ "b004", "b004gmail.com" ], [ "b005", null ] ]
}
5.1.4. Example response
HTTP/1.1 200 OK
{
"added" : 2,
"appliedTag" : 2,
"duplicated" : {
"input" : 2,
"dbOnce" : 0,
"dbMulti" : 0
},
"invalid" : {
"length" : 0,
"email" : 1,
"mobile" : 0,
"birthdate" : 0,
"joindate" : 0,
"expirydate" : 0,
"emptyKey" : 1
}
}
5.2. Get Customer List
GET /v1/customers
5.2.1. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
tagIds |
Array[Integer] |
false |
Return customers with any of the tags in the list. |
fields |
Array[String] |
false |
A list of fields to be included in the list result Refer to the table Customer fields for a list of applicable fields. |
5.2.2. Response fields
Standard paging response where content field is list of following objects:
| Path | Type | Description |
|---|---|---|
data |
Array[String] |
Customer data corresponding the the |
id |
Integer |
Customer Id. |
status |
String |
Customer status. |
5.2.3. Example request
GET /v1/customers
{
"tagIds" : [ 1 ],
"fields" : [ "DisplayName", "Email" ]
}
5.2.4. Example response
HTTP/1.1 200 OK
{
"content" : [ {
"data" : [ "b001", "b001@gmail.com" ],
"id" : 1,
"status" : "ACTIVE"
}, {
"data" : [ "b002", "b002@gmail.com" ],
"id" : 2,
"status" : "ACTIVE"
} ],
"page" : {
"first" : true,
"last" : true,
"totalPages" : 1,
"totalElements" : 2,
"numberOfElements" : 2,
"size" : 50,
"number" : 0
},
"sort" : [ ]
}
5.3. Get Optout Email List
GET /v1/customers/optouts
Retrieve the current list of optout-ed email addresses. Standard paging response where content field is list of optout-ed email addresses.
5.3.1. Response fields
Standard paging response where content field is list of following objects:
| Path | Type | Description |
|---|---|---|
String |
Opt-outed email address. |
5.3.2. Example request
GET /v1/customers/optouts
5.3.3. Example response
HTTP/1.1 200 OK
{
"content" : [ {
"email" : "b002@gmail.com"
}, {
"email" : "b006@gmail.com"
} ],
"page" : {
"first" : true,
"last" : true,
"totalPages" : 1,
"totalElements" : 2,
"numberOfElements" : 2,
"size" : 50,
"number" : 0
},
"sort" : [ ]
}
5.4. Optout Emails
POST /v1/customers/optouts
Optout the email addresses, emails already optouted will be ignored.
5.4.1. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
emails |
Array[String] |
false |
A list of email to optout / unlist. |
5.4.2. Response fields
| Path | Type | Description |
|---|---|---|
Array[String] |
A list of successful optout emails. |
5.4.3. Example request
POST /v1/customers/optouts
{
"emails" : [ "b002@gmail.com", "b006@gmail.com" ]
}
5.4.4. Example response
HTTP/1.1 200 OK
{
"email" : [ "b002@gmail.com", "b006@gmail.com" ]
}
5.5. Unlist Optout Emails
DELETE /v1/customers/optouts
Unlist the email addresses, emails not already optouted will be ignored.
5.5.1. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
emails |
Array[String] |
false |
A list of email to optout / unlist. |
5.5.2. Response fields
| Path | Type | Description |
|---|---|---|
Array[String] |
A list of successful unlist emails. |
5.5.3. Example request
DELETE /v1/customers/optouts
{
"emails" : [ "b001@gmail.com", "b002@gmail.com" ]
}
5.5.4. Example response
HTTP/1.1 200 OK
{
"email" : [ "b002@gmail.com" ]
}
6. Campaign Category
6.1. Create Category
POST /v1/campaigns/categories
6.1.1. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
name |
String |
false |
Name of the Category. Size must be between 0 and 255 inclusive. |
description |
String |
true |
Description of the Category. |
6.1.2. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
ID of the created / edited item. |
6.1.3. Example request
POST /v1/campaigns/categories
{
"name" : "Test Category",
"description" : "This is a test category"
}
6.1.4. Example response
HTTP/1.1 200 OK
{
"id" : 3
}
6.2. Update Category By Id
PUT /v1/campaigns/categories/{id}
6.2.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
ID of the campaign category to update. |
6.2.2. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
name |
String |
false |
Name of the Category. Size must be between 0 and 255 inclusive. |
description |
String |
true |
Description of the Category. |
6.2.3. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
ID of the created / edited item. |
6.2.4. Example request
PUT /v1/campaigns/categories/3
{
"name" : "Test Category",
"description" : "This is a test category (updated)"
}
6.2.5. Example response
HTTP/1.1 200 OK
{
"id" : 3
}
6.3. Get Category By Id
GET /v1/campaigns/categories/{id}
6.3.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
ID of the campaign category to retrieve. |
6.3.2. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
Campaign category ID. |
name |
String |
Campaign category name. |
description |
String |
Campaign category description. |
6.3.3. Example request
GET /v1/campaigns/categories/3
6.3.4. Example response
HTTP/1.1 200 OK
{
"id" : 3,
"name" : "Test Category",
"description" : "This is a test category (updated)"
}
6.4. Get Category List
GET /v1/campaigns/categories
6.4.1. Response fields
Standard paging response where content field is list of following objects:
| Path | Type | Description |
|---|---|---|
id |
Integer |
Campaign category ID. |
name |
String |
Campaign category name. |
description |
String |
Campaign category description. |
6.4.2. Example request
GET /v1/campaigns/categories
6.4.3. Example response
HTTP/1.1 200 OK
{
"content" : [ {
"id" : 1,
"name" : "Default",
"description" : ""
}, {
"id" : 3,
"name" : "Test Category",
"description" : "This is a test category (updated)"
} ],
"page" : {
"first" : true,
"last" : true,
"totalPages" : 1,
"totalElements" : 2,
"numberOfElements" : 2,
"size" : 50,
"number" : 0
},
"sort" : [ ]
}
7. Email Template Folder
7.1. Create Email Template Folder
POST /v1/templates/emails/folders
7.1.1. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
name |
String |
false |
Name of the template folder. Size must be between 0 and 255 inclusive. |
7.1.2. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
ID of the created / edited item. |
7.1.3. Example request
POST /v1/templates/emails/folders
{
"name" : "Test Folder"
}
7.1.4. Example response
HTTP/1.1 200 OK
{
"id" : 3
}
7.2. Update Email Template Folder
PUT /v1/templates/emails/folders/{id}
7.2.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
ID of the template folder to update. |
7.2.2. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
name |
String |
false |
Name of the template folder. Size must be between 0 and 255 inclusive. |
7.2.3. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
ID of the created / edited item. |
7.2.4. Example request
PUT /v1/templates/emails/folders/3
{
"name" : "Test Folder (updated)"
}
7.2.5. Example response
HTTP/1.1 200 OK
{
"id" : 3
}
7.3. Get Email Template Folder By Id
GET /v1/templates/emails/folders/{id}
7.3.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
ID of the template folder to retrieve. |
7.3.2. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
Template folder ID. |
name |
String |
Template folder name. |
7.3.3. Example request
GET /v1/templates/emails/folders/3
7.3.4. Example response
HTTP/1.1 200 OK
{
"id" : 3,
"name" : "Test Folder (updated)"
}
7.4. Get Email Template Folder List
GET /v1/templates/emails/folders
7.4.1. Response fields
Standard paging response where content field is list of following objects:
| Path | Type | Description |
|---|---|---|
id |
Integer |
Template folder ID. |
name |
String |
Template folder name. |
7.4.2. Example request
GET /v1/templates/emails/folders
7.4.3. Example response
HTTP/1.1 200 OK
{
"content" : [ {
"id" : 1,
"name" : "Default"
}, {
"id" : 3,
"name" : "Test Folder (updated)"
} ],
"page" : {
"first" : true,
"last" : true,
"totalPages" : 1,
"totalElements" : 2,
"numberOfElements" : 2,
"size" : 50,
"number" : 0
},
"sort" : [ ]
}
8. Email Template
8.1. Create Email Template
POST /v1/templates/emails
8.1.1. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
folderId |
Integer |
false |
Email template folder ID. |
name |
String |
false |
Name of the template. Size must be between 0 and 255 inclusive. |
description |
String |
true |
Description of the template. |
content |
String |
false |
HTML content of the template. |
8.1.2. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
ID of the created / edited item. |
8.1.3. Example request
POST /v1/templates/emails
{
"name" : "Test Template",
"folderId" : 1,
"content" : "<html><h1>API template</h1></html>"
}
8.1.4. Example response
HTTP/1.1 200 OK
{
"id" : 1
}
8.2. Update Email Template
PUT /v1/templates/emails/{id}
8.2.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
ID of the template to update. |
8.2.2. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
folderId |
Integer |
false |
Email template folder ID. |
name |
String |
false |
Name of the template. Size must be between 0 and 255 inclusive. |
description |
String |
true |
Description of the template. |
content |
String |
false |
HTML content of the template. |
8.2.3. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
ID of the created / edited item. |
8.2.4. Example request
PUT /v1/templates/emails/1
{
"name" : "Test Template",
"folderId" : 1,
"content" : "<html><h1>API template</h1> (updated)</html>"
}
8.2.5. Example response
HTTP/1.1 200 OK
{
"id" : 1
}
8.3. Get Email Template By Id
GET /v1/templates/emails/{id}
8.3.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
ID of the template to retrieve. |
8.3.2. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
Template Id. |
folderId |
Integer |
Template folder Id. |
name |
String |
Template name. |
description |
String |
Template description. |
created |
String |
Template Created date. |
modified |
String |
Template modified date. |
content |
String |
HTML code of the template content. |
8.3.3. Example request
GET /v1/templates/emails/1
8.3.4. Example response
HTTP/1.1 200 OK
{
"id" : 1,
"folderId" : 1,
"name" : "Test Template",
"description" : null,
"created" : "2019-11-11T10:41:59.000+0800",
"modified" : "2019-11-11T10:41:59.000+0800",
"content" : "<html><h1>API template</h1> (updated)</html>"
}
8.4. Get Email Template List
GET /v1/templates/emails
8.4.1. Response fields
Standard paging response where content field is list of following objects:
| Path | Type | Description |
|---|---|---|
id |
Integer |
Template Id. |
folderId |
Integer |
Template folder Id. |
name |
String |
Template name. |
description |
String |
Template description. |
created |
String |
Template Created date. |
modified |
String |
Template modified date. |
8.4.2. Example request
GET /v1/templates/emails
8.4.3. Example response
HTTP/1.1 200 OK
{
"content" : [ {
"id" : 1,
"folderId" : 1,
"name" : "Test Template",
"description" : null,
"created" : "2019-11-11T10:41:59.000+0800",
"modified" : "2019-11-11T10:41:59.000+0800"
} ],
"page" : {
"first" : true,
"last" : true,
"totalPages" : 1,
"totalElements" : 1,
"numberOfElements" : 1,
"size" : 50,
"number" : 0
},
"sort" : [ ]
}
9. Email Campaign
9.1. Create Email Campaign
POST /v1/campaigns/emails
9.1.1. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
identityId |
Integer |
false |
Sender identity ID (profile id). |
includeTagIds |
Array[Integer] |
false |
A list of customer tag ID to be included in this campaign. |
name |
String |
false |
Name of the campaign. Size must be between 0 and 255 inclusive. |
remark |
String |
true |
Optional description. |
categoryId |
Integer |
false |
Campaign category ID. |
sendNow |
Boolean |
true |
Set to |
scheduleDate |
String |
true |
Set the date to execute this campaign if |
expireIn |
Integer |
false |
Set the number of days that this campaign will track open and click data. Must be at least 1. |
templateId |
Integer |
true |
User template ID. If set, |
content |
String |
true |
HTML content of the campaign if |
subject |
String |
false |
Email subject. Size must be between 0 and 255 inclusive. |
requireApproval |
Boolean |
true |
Set to |
sendTestTo |
Array[String] |
true |
A email list for sending test emails. |
googleAnalytics |
Object |
true |
Set Google Analytics related tracking attributes. |
googleAnalytics.utmCampaign |
String |
false |
GA utm_campaign. |
googleAnalytics.utmSource |
String |
false |
GA utm_source. |
googleAnalytics.utmMedium |
String |
false |
GA utm_medium. |
googleAnalytics.utmTerm |
String |
true |
GA utm_term. |
googleAnalytics.utmContent |
String |
true |
GA utm_content. |
customerFilter |
Object |
true |
Filter customer set for this campiagn. |
customerFilter.excludeTagIds |
Array[Integer] |
true |
A list of customer tag ID to be exclued in this campaign. |
customerFilter.excludeInCampaginDay |
Integer |
true |
Exclude customers that involved in the past |
customerFilter.maxCustomerCount |
Integer |
true |
The maximum number of customers to be sent, randomly chosen if actualy number exceed. Set to |
customerFilter.includeSuspended |
Boolean |
true |
Send also to suspended customers. |
customerFilter.includeUnsubscribed |
Boolean |
true |
Send also to unsubscribed customers. |
customerFilter.allowDuplicate |
Boolean |
true |
Allow sending multiple emails to a same address. |
9.1.2. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
ID of the created / edited item. |
9.1.3. Example request
POST /v1/campaigns/emails
{
"identityId" : 1,
"includeTagIds" : [ 1 ],
"name" : "Test campaign",
"remark" : "This is a test campaign from API",
"categoryId" : 1,
"content" : "<h1>Test content</h1>",
"sendNow" : false,
"scheduleDate" : "2118-01-20 23:00 +0800",
"expireIn" : 30,
"subject" : "Test campaign subject",
"googleAnalytics" : {
"utmCampaign" : "api campaign",
"utmSource" : "api source",
"utmMedium" : "api medium"
},
"customerFilter" : {
"excludeInCampaginDay" : 7,
"maxCustomerCount" : 100,
"includeUnsubscribed" : true,
"includeSuspended" : true,
"allowDuplicate" : true
}
}
9.1.4. Example response
HTTP/1.1 200 OK
{
"id" : 1
}
9.2. Update Email Campaign
PATCH /v1/campaigns/emails/{id}
Update a email campaign, only supplied fields will be updated, others will be kept unchanged.
9.2.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
ID of the camapign. |
9.2.2. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
identityId |
Integer |
true |
Change the sender identity ID (profile id). |
includeTagIds |
Array[Integer] |
true |
Change the tag IDs. |
name |
String |
true |
Change the Name. |
remark |
String |
true |
Change the description. |
categoryId |
Integer |
true |
Change the campaign category ID. |
scheduleDate |
String |
true |
Change the scheduled execution date. |
expireIn |
Integer |
true |
Change the number of days that this campaign will track open and click data. |
templateId |
Integer |
true |
Change the template ID. If set, |
content |
String |
true |
Change the HTML content of the campaign if |
subject |
String |
true |
Change the email subject. |
googleAnalytics |
Object |
true |
Change Google Analytics related tracking attributes. |
googleAnalytics.utmCampaign |
String |
false |
GA utm_campaign. |
googleAnalytics.utmSource |
String |
false |
GA utm_source. |
googleAnalytics.utmMedium |
String |
false |
GA utm_medium. |
googleAnalytics.utmTerm |
String |
true |
GA utm_term. |
googleAnalytics.utmContent |
String |
true |
GA utm_content. |
customerFilter |
Object |
true |
Change customer filters. |
customerFilter.excludeTagIds |
Array[Integer] |
true |
A list of customer tag ID to be exclued in this campaign. |
customerFilter.excludeInCampaginDay |
Integer |
true |
Exclude customers that involved in the past |
customerFilter.maxCustomerCount |
Integer |
true |
The maximum number of customers to be sent, randomly chosen if actualy number exceed. Set to |
customerFilter.includeSuspended |
Boolean |
true |
Send also to suspended customers. |
customerFilter.includeUnsubscribed |
Boolean |
true |
Send also to unsubscribed customers. |
customerFilter.allowDuplicate |
Boolean |
true |
Allow sending multiple emails to a same address. |
9.2.3. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
ID of the created / edited item. |
9.2.4. Example request
PATCH /v1/campaigns/emails/1
{
"name" : "Test campaign (updated)",
"content" : "<html><h1>Hello World</h1></html>",
"expireIn" : 20,
"subject" : "Test campaign subject (updated)",
"customerFilter" : {
"excludeInCampaginDay" : 0,
"maxCustomerCount" : 0,
"includeUnsubscribed" : false,
"includeSuspended" : false,
"allowDuplicate" : false
}
}
9.2.5. Example response
HTTP/1.1 200 OK
{
"id" : 1
}
9.3. Get Campaign
GET /v1/campaigns/emails/{id}
9.3.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
ID of the campaign to retrieve. |
9.3.2. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
Email campaign Id. |
name |
String |
Email campaign name. |
categoryId |
Integer |
Campaign category Id. |
categoryName |
String |
Campaign category name. |
scheduleDate |
String |
Scheduled execution date. |
expiryDate |
String |
Campaign expiry date. |
identityId |
Integer |
Sender email identity. |
subject |
String |
Email subject. |
status |
String |
Campaign status. |
includeTagIds |
Array[Integer] |
The list of customer tag ID included in this campaign. |
content |
String |
HTML code of the email content. |
googleAnalytics |
Object |
GA integration, null if not used. |
googleAnalytics.utmCampaign |
String |
GA utm_campaign. |
googleAnalytics.utmSource |
String |
GA utm_source. |
googleAnalytics.utmMedium |
String |
GA utm_medium. |
googleAnalytics.utmTerm |
String |
GA utm_term. |
googleAnalytics.utmContent |
String |
GA utm_content. |
customerFilter |
Object |
Additional customerFilters. |
customerFilter.excludeTagIds |
Array[Integer] |
A list of customer tag ID to be exclued in this campaign. |
customerFilter.excludeInCampaginDay |
Integer |
Exclude customers that involved in the past |
customerFilter.maxCustomerCount |
Integer |
The maximum number of customers to be sent, randomly chosen if actualy number exceed. Set to |
customerFilter.includeSuspended |
Boolean |
Send also to suspended customers. |
customerFilter.includeUnsubscribed |
Boolean |
Send also to unsubscribed customers. |
customerFilter.allowDuplicate |
Boolean |
Allow sending multiple emails to a same address. |
9.3.3. Example request
GET /v1/campaigns/emails/1
9.3.4. Example response
HTTP/1.1 200 OK
{
"id" : 1,
"name" : "Test campaign (updated)",
"categoryId" : 1,
"categoryName" : "Default",
"scheduleDate" : "2118-01-20T23:00:00.000+0800",
"expiryDate" : "2118-02-09T23:00:00.000+0800",
"identityId" : 1,
"subject" : "Test campaign subject (updated)",
"status" : "PENDING",
"includeTagIds" : [ 1 ],
"content" : "<html><h1>Hello World</h1></html>",
"googleAnalytics" : {
"utmCampaign" : "api campaign",
"utmSource" : "api source",
"utmMedium" : "api medium",
"utmTerm" : "",
"utmContent" : ""
},
"customerFilter" : {
"excludeTagIds" : null,
"excludeInCampaginDay" : null,
"maxCustomerCount" : null,
"includeSuspended" : false,
"includeUnsubscribed" : false,
"allowDuplicate" : false
}
}
9.4. Get Email Campaign List
GET /v1/campaigns/emails
9.4.1. Response fields
Standard paging response where content field is list of following objects:
| Path | Type | Description |
|---|---|---|
id |
Integer |
Email campaign Id. |
name |
String |
Email campaign name. |
categoryId |
Integer |
Campaign category Id. |
categoryName |
String |
Campaign category name. |
scheduleDate |
String |
Scheduled execution date. |
expiryDate |
String |
Campaign expiry date. |
identityId |
Integer |
Sender email identity. |
subject |
String |
Email subject. |
status |
String |
Campaign status. |
9.4.2. Example request
GET /v1/campaigns/emails
9.4.3. Example response
HTTP/1.1 200 OK
{
"content" : [ {
"id" : 1,
"name" : "Test campaign (updated)",
"categoryId" : 1,
"categoryName" : "Default",
"scheduleDate" : "2118-01-20T23:00:00.000+0800",
"expiryDate" : "2118-02-09T23:00:00.000+0800",
"identityId" : 1,
"subject" : "Test campaign subject (updated)",
"status" : "PENDING"
} ],
"page" : {
"first" : true,
"last" : true,
"totalPages" : 1,
"totalElements" : 1,
"numberOfElements" : 1,
"size" : 50,
"number" : 0
},
"sort" : [ ]
}
9.5. Send Test Email
POST /v1/campaigns/emails/{id}/test
Send test email, only for campaign that have not been executed / processed.
9.5.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
ID of the camapign. |
9.5.2. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
emails |
Array[String] |
false |
A list of email addresses. |
9.5.3. Example request
POST /v1/campaigns/emails/1/test
{
"emails" : [ "b001@yahoo.com", "b002@yahoo.com" ]
}
9.5.4. Example response
HTTP/1.1 200 OK
9.6. Approve Camapaign
PATCH /v1/campaigns/emails/{id}/approval
Approve email campaign by ID. Only allow master user to call.
9.6.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
ID of the sub-account campaign to approve. |
9.6.2. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
approve |
Boolean |
false |
|
reason |
String |
true |
Optional reason for approve or reject. Size must be between 0 and 100 inclusive. |
9.6.3. Response fields
| Path | Type | Description |
|---|---|---|
subAccountAlias |
String |
The account alias of the campaign for approval. |
campaignName |
String |
Name of the campaign. |
scheduleDate |
String |
Scheduled execution date of the campaign. |
9.6.4. Example request
PATCH /v1/campaigns/emails/1/approval
{
"approve" : false,
"reason" : "Not good"
}
9.6.5. Example response
HTTP/1.1 404 Not Found
{
"timestamp" : "2019-11-11T10:42:00.797+0800",
"status" : 404,
"error" : "Not Found",
"message" : "Waiting for approval Email Campaign not found with ID: '1'",
"detail" : "uri=/v1/campaigns/emails/1/approval"
}
10. SMS Campaign
10.1. Create Sms Campaign
POST /v1/campaigns/sms
10.1.1. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
includeTagIds |
Array[Integer] |
false |
A list of customer tag ID to be included in this campaign. |
name |
String |
false |
Name of the campaign. Size must be between 0 and 255 inclusive. |
remark |
String |
true |
Optional description. |
categoryId |
Integer |
false |
Campaign category ID. |
sendNow |
Boolean |
true |
Set to |
scheduleDate |
String |
true |
Set the date to execute this campaign if |
senderId |
String |
true |
Sender ID max. 11 characters, no special characters, only English and numeric are allowed. |
templateId |
Integer |
true |
User template ID. If set, |
content |
String |
true |
Content of the campaign if |
requireApproval |
Boolean |
true |
Set to |
customerFilter |
Object |
true |
Filter customer set for this campiagn. |
customerFilter.excludeTagIds |
Array[Integer] |
true |
A list of customer tag ID to be exclued in this campaign. |
customerFilter.excludeInCampaginDay |
Integer |
true |
Exclude customers that involved in the past |
customerFilter.maxCustomerCount |
Integer |
true |
The maximum number of customers to be sent, randomly chosen if actualy number exceed. Set to |
customerFilter.includeSuspended |
Boolean |
true |
Send also to suspended customers. |
customerFilter.includeDnc |
Boolean |
true |
Send also to customers registered in the OFCA DNC list. |
customerFilter.allowDuplicate |
Boolean |
true |
Allow sending multiple emails to a same address. |
10.1.2. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
ID of the created / edited item. |
10.1.3. Example request
POST /v1/campaigns/sms
{
"includeTagIds" : [ 1 ],
"name" : "Test SMS campaign",
"remark" : "This is a test SMS campaign from API",
"categoryId" : 1,
"content" : "Test SMS content",
"sendNow" : false,
"scheduleDate" : "2118-01-20 23:00 +0800"
}
10.1.4. Example response
HTTP/1.1 200 OK
{
"id" : 2
}
10.2. Update Sms Campaign
PATCH /v1/campaigns/sms/{id}
Update a SMS campaign, only supplied fields will be updated, others will be kept unchanged.
10.2.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
ID of the camapign. |
10.2.2. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
includeTagIds |
Array[Integer] |
true |
Change the tag IDs. |
name |
String |
true |
Change the Name. |
remark |
String |
true |
Change the description. |
categoryId |
Integer |
true |
Change the campaign category ID. |
scheduleDate |
String |
true |
Change the scheduled execution date. |
senderId |
String |
true |
Change the Sender ID |
templateId |
Integer |
true |
Change the template ID. If set, |
content |
String |
true |
Change the content of the campaign if |
customerFilter |
Object |
true |
Change customer filters. |
customerFilter.excludeTagIds |
Array[Integer] |
true |
A list of customer tag ID to be exclued in this campaign. |
customerFilter.excludeInCampaginDay |
Integer |
true |
Exclude customers that involved in the past |
customerFilter.maxCustomerCount |
Integer |
true |
The maximum number of customers to be sent, randomly chosen if actualy number exceed. Set to |
customerFilter.includeSuspended |
Boolean |
true |
Send also to suspended customers. |
customerFilter.includeDnc |
Boolean |
true |
Send also to customers registered in the OFCA DNC list. |
customerFilter.allowDuplicate |
Boolean |
true |
Allow sending multiple emails to a same address. |
10.2.3. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
ID of the created / edited item. |
10.2.4. Example request
PATCH /v1/campaigns/sms/2
{
"name" : "Test SMS campaign (updated)",
"content" : "Test SMS content (updated)",
"customerFilter" : {
"excludeInCampaginDay" : 7
}
}
10.2.5. Example response
HTTP/1.1 200 OK
{
"id" : 2
}
10.3. Get Sms Campaign
GET /v1/campaigns/sms/{id}
10.3.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
ID of the campaign to retrieve. |
10.3.2. Response fields
| Path | Type | Description |
|---|---|---|
id |
Integer |
SMS campaign Id. |
name |
String |
SMS campaign name. |
categoryId |
Integer |
Campaign category Id. |
categoryName |
String |
Campaign category name. |
scheduleDate |
String |
Scheduled execution date. |
senderId |
String |
Sender ID. |
status |
String |
Campaign status. |
includeTagIds |
Array[Integer] |
The list of customer tag ID included in this campaign. |
content |
String |
SMS content. |
customerFilter |
Object |
Additional customerFilters. |
customerFilter.excludeTagIds |
Array[Integer] |
A list of customer tag ID to be exclued in this campaign. |
customerFilter.excludeInCampaginDay |
Integer |
Exclude customers that involved in the past |
customerFilter.maxCustomerCount |
Integer |
The maximum number of customers to be sent, randomly chosen if actualy number exceed. Set to |
customerFilter.includeSuspended |
Boolean |
Send also to suspended customers. |
customerFilter.includeDnc |
Boolean |
Send also to customers registered in the OFCA DNC list. |
customerFilter.allowDuplicate |
Boolean |
Allow sending multiple emails to a same address. |
10.3.3. Example request
GET /v1/campaigns/sms/2
10.3.4. Example response
HTTP/1.1 200 OK
{
"id" : 2,
"name" : "Test SMS campaign (updated)",
"categoryId" : 1,
"categoryName" : "Default",
"scheduleDate" : "2118-01-20T23:00:00.000+0800",
"senderId" : null,
"status" : "PENDING",
"includeTagIds" : [ 1 ],
"content" : "Test SMS content (updated)",
"customerFilter" : {
"excludeTagIds" : null,
"excludeInCampaginDay" : 7,
"maxCustomerCount" : null,
"includeSuspended" : false,
"includeDnc" : false,
"allowDuplicate" : false
}
}
10.4. Get Sms Campaign List
GET /v1/campaigns/sms
10.4.1. Response fields
Standard paging response where content field is list of following objects:
| Path | Type | Description |
|---|---|---|
id |
Integer |
SMS campaign Id. |
name |
String |
SMS campaign name. |
categoryId |
Integer |
Campaign category Id. |
categoryName |
String |
Campaign category name. |
scheduleDate |
String |
Scheduled execution date. |
senderId |
String |
Sender ID. |
status |
String |
Campaign status. |
10.4.2. Example request
GET /v1/campaigns/sms
10.4.3. Example response
HTTP/1.1 200 OK
{
"content" : [ {
"id" : 2,
"name" : "Test SMS campaign (updated)",
"categoryId" : 1,
"categoryName" : "Default",
"scheduleDate" : "2118-01-20T23:00:00.000+0800",
"senderId" : null,
"status" : "PENDING"
} ],
"page" : {
"first" : true,
"last" : true,
"totalPages" : 1,
"totalElements" : 1,
"numberOfElements" : 1,
"size" : 50,
"number" : 0
},
"sort" : [ ]
}
10.5. Approve Sms
PATCH /v1/campaigns/sms/{id}/approval
Approve SMS campaign by ID. Only allow master user to call.
10.5.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
ID of the sub-account campaign to approve. |
10.5.2. Request fields
| Path | Type | Optional | Description |
|---|---|---|---|
approve |
Boolean |
false |
|
reason |
String |
true |
Optional reason for approve or reject. Size must be between 0 and 100 inclusive. |
10.5.3. Response fields
| Path | Type | Description |
|---|---|---|
subAccountAlias |
String |
The account alias of the campaign for approval. |
campaignName |
String |
Name of the campaign. |
scheduleDate |
String |
Scheduled execution date of the campaign. |
10.5.4. Example request
PATCH /v1/campaigns/sms/2/approval
{
"approve" : false,
"reason" : "Not good"
}
10.5.5. Example response
HTTP/1.1 404 Not Found
{
"timestamp" : "2019-11-11T10:42:01.235+0800",
"status" : 404,
"error" : "Not Found",
"message" : "Waiting for approval SMS Campaign not found with ID: '2'",
"detail" : "uri=/v1/campaigns/sms/2/approval"
}
11. Subuser
11.1. Get Subuser List
GET /v1/subusers
11.1.1. Response fields
Standard paging response where content field is list of following objects:
| Path | Type | Description |
|---|---|---|
id |
Integer |
Subuser Id. |
name |
String |
Name of the subuser. |
alias |
String |
Short name of the subuser. |
String |
Email address of the subuser. |
|
company |
String |
Company of the subuser. |
masterUserId |
Integer |
Master user Id of the subuser. |
masterApproval |
Boolean |
If |
maxCustomerSize |
Integer |
Maximum customer database size. |
emailCredit |
Integer |
Remaining email credits. |
emailExpiryDate |
String |
Email credits expiry date. |
smsCredit |
Decimal |
Remaining sms credits. |
smsExpiryDate |
String |
Sms credits expiry date. |
11.1.2. Example request
GET /v1/subusers
11.1.3. Example response
HTTP/1.1 200 OK
{
"content" : [ {
"id" : 2,
"name" : "Sub1",
"alias" : "sub1",
"email" : "em.sub1@emailprovider.com",
"company" : "k-matrix",
"masterUserId" : 1,
"masterApproval" : true,
"maxCustomerSize" : 100,
"emailCredit" : 100,
"emailExpiryDate" : "2099-01-01T23:59:59.000+0800",
"smsCredit" : 10.0,
"smsExpiryDate" : "2099-01-01T23:59:59.000+0800"
} ],
"page" : {
"first" : true,
"last" : true,
"totalPages" : 1,
"totalElements" : 1,
"numberOfElements" : 1,
"size" : 50,
"number" : 0
},
"sort" : [ ]
}
11.2. Share Tag
POST /v1/subusers/{id}/shares/tags/{tagIds}
Share a list of tagIds to subuser with id, tagIds already shared to user id will be ignored and a list of successfully shared tag Ids will be returned.
11.2.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
Subuser Id. |
tagIds |
Object |
false |
Tag Id list to be shared. |
11.2.2. Response fields
| Path | Type | Description |
|---|---|---|
ids |
Array[Integer] |
IDs of the affected items. |
11.2.3. Example request
POST /v1/subusers/2/shares/tags/1
11.2.4. Example response
HTTP/1.1 200 OK
{
"ids" : [ 1 ]
}
11.3. Get Shared Tag List
GET /v1/subusers/{id}/shares/tags
Get a list of tag shared to subuser with id.
11.3.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
Subuser Id. |
11.3.2. Response fields
Standard paging response where content field is list of following objects:
| Path | Type | Description |
|---|---|---|
id |
Integer |
ID of the customer Tag. |
name |
String |
Name of the customer Tag. |
description |
String |
Description of the customer Tag. |
grantedBy |
Integer |
Only for master/child account |
11.3.3. Example request
GET /v1/subusers/2/shares/tags
11.3.4. Example response
HTTP/1.1 200 OK
{
"content" : [ {
"id" : 1,
"name" : "Test Tag",
"description" : "This is Test Tag(updated)",
"grantedBy" : 1
} ],
"page" : {
"first" : true,
"last" : true,
"totalPages" : 1,
"totalElements" : 1,
"numberOfElements" : 1,
"size" : 50,
"number" : 0
},
"sort" : [ ]
}
11.4. Revoke Shared Tag
DELETE /v1/subusers/{id}/shares/tags/{tagIds}
Revoke the right of a list of tagIds from subuser with id, tagIds not already shared to user id will be ignored and a list of successfully revoked tag Ids will be returned.
11.4.1. Path parameters
| Parameter | Type | Optional | Description |
|---|---|---|---|
id |
Integer |
false |
Subuser Id. |
tagIds |
Object |
false |
Tag Id list to be revoked. |
11.4.2. Response fields
| Path | Type | Description |
|---|---|---|
ids |
Array[Integer] |
IDs of the affected items. |
11.4.3. Example request
DELETE /v1/subusers/2/shares/tags/1
11.4.4. Example response
HTTP/1.1 200 OK
{
"ids" : [ 1 ]
}
