Add or Update the list of subscribers based on the custom fields and subcategories provided in the JSON data. Subscribers data that does not pass the validation will be removed from processing.
batchUpdateSubscribers
URL | https://api.enginemailer.com/restapi/subscriber/emsubscriber/batchUpdateSubscribers |
Method | HTTP POST |
Table: Parameter
Parameter name | Description | Column Type |
---|---|---|
SubscriberData | List of Subscribers with Custom Fields, and the Subcategories to be assigned. | JSON String |
Table: Data Definition for JSON
Parameter name | Description | Column Type | Maximum Length | Required? |
---|---|---|---|---|
subscribers | List of Subscribers to be inserted/updated. It contains the email and custom fields. | JArray(JObject) |
5000 subscribers | Yes |
Subcategories | List of sub categories id of the subscriber. It is pre-defined in the portal and it can be retrieved by invoking getSubCategory method. | JArray (Int) |
Request Example
Header
<APIKEY> - Value
Body
{
"subscribers": [
{
"email": "5Erics0@weblite.com.my",
"customfields": [
{
"customfield_value": "0",
"customfield_key": "0"
},
{
"customfield_value": "Teneo",
"customfield_key": "company_name"
},
{
"customfield_value": "Malaysia",
"customfield_key": "country"
},
{
"customfield_value": "Eric",
"customfield_key": "first_name"
},
{
"customfield_value": "Lim",
"customfield_key": "last_name"
},
{
"customfield_value": "5",
"customfield_key": "points_balance"
}
]
},
{
"email": "5Erics1@weblite.com.my",
"customfields": [
{
"customfield_value": "0",
"customfield_key": "0"
},
{
"customfield_value": "Teneo",
"customfield_key": "company_name"
},
{
"customfield_value": "Malaysia",
"customfield_key": "country"
},
{
"customfield_value": "Eric",
"customfield_key": "first_name"
},
{
"customfield_value": "Lim",
"customfield_key": "last_name"
},
{
"customfield_value": "4",
"customfield_key": "points_balance"
}
]
},
{
"email": "5Erics2@weblite.com.my",
"customfields": [
{
"customfield_value": "0",
"customfield_key": "0"
},
{
"customfield_value": "Teneo",
"customfield_key": "company_name"
},
{
"customfield_value": "Malaysia",
"customfield_key": "country"
},
{
"customfield_value": "Eric",
"customfield_key": "first_name"
},
{
"customfield_value": "Lim",
"customfield_key": "last_name"
},
{
"customfield_value": "5",
"customfield_key": "points_balance"
}
]
},
{
"email": "5Erics3@weblite.com.my",
"customfields": [
{
"customfield_value": "0",
"customfield_key": "0"
},
{
"customfield_value": "Teneo",
"customfield_key": "company_name"
},
{
"customfield_value": "Malaysia",
"customfield_key": "country"
},
{
"customfield_value": "Eric",
"customfield_key": "first_name"
},
{
"customfield_value": "Lim",
"customfield_key": "last_name"
},
{
"customfield_value": "5",
"customfield_key": "points_balance"
}
]
},
{
"email": "5Erics4@weblite.com.my",
"customfields": [
{
"customfield_value": "0",
"customfield_key": "0"
},
{
"customfield_value": "Teneo",
"customfield_key": "company_name"
},
{
"customfield_value": "Malaysia",
"customfield_key": "country"
},
{
"customfield_value": "Eric",
"customfield_key": "first_name"
},
{
"customfield_value": "Lim",
"customfield_key": "last_name"
},
{
"customfield_value": "5",
"customfield_key": "points_balance"
}
]
}
],
"subcategories": [
1,
13546
]
}
Response
Success Response
{
"Result": {
"StatusCode": "201",
"Status": "Processing",
"ID": 12345
}
}
Retrieve the status for the job using Batch Update Status.
Failed Response
{
"Result": {
"StatusCode": "500",
"Status": "InternalServerError",
"ErrorMessage": "API Key Not Found!"
}
}