Batch API - Add Multiple Contacts through API
This API allows the user to add contacts in bulk to the CEE panel.
Important Note
This API is meant for transfering smaller contact groups. For larger data transfers, it is recommended to use our Bulk Upload through file API
General Rules for API use:
1: The maximum number of attributes per contact is limited to 20.
2: All keys in JSON should be in lowercase (to split longer names use “_”)
3: Both notify email and callback URL are required to be specified.
4: All attribute fields should be in upper case.
5: You can send a maximum size of 1000 contact in one API call
6: Attribute values should be either in string or integer format. If you wish to pass blank or null then it should be enclosed within double quotes.
API Specs
URL Schema:
US IDC:
http://api.netcoresmartech.com/v3/contact/batchadd
Indian IDC:
https://apiin.netcoresmartech.com/v3/contact/batchadd
EU IDC:
https://goapiv3.eu-north-1.eu.netcoresmartech.com/v3/contact/batchadd
Method:
POST
Header:
Key | Value |
---|---|
api-key | Your API Key. Please get in touch with our support team to get this |
Content-Type:
application/json
Body:
Key | Description | Data-Type | Sample Value |
---|---|---|---|
listid | List ID | Numeric | 5 |
notifyemail | Email to which the job status is to be notified | String | [email protected] |
callbackurl | Callback URL | String | http://client.com/callbackurl.php |
primarykey | Primary Key of the Panel | String | |
data | Contatins the array of Contact details. The format is key value pair. Please check the sample to understand this better | Array | "data": [{ "NAME": "ABC", "EMAIL": "[email protected]", "MOBILE": 25, "AGE": 24, "CITY": "Mumbai" }, { "NAME": "Jon doe", "EMAIL": "[email protected]", "MOBILE": 25, "AGE": 24, "CITY": "Mumbai" }] |
Sample API Call
Endpoint : http://api.netcoresmartech.com/v3/contact/batchadd
Headers: api-key : <Your API Key>
Content-Type: application/json
Body:
{
"listid": 5,
"notifyemail": "[email protected]",
"callbackurl": "http://client.com/callbackurl.php",
"primarykey": "email",
"data": [{
"NAME": "ABC",
"EMAIL": "[email protected]",
"MOBILE": 25,
"AGE": 24,
"CITY": "Mumbai"
}, {
"NAME": "Jon doe",
"EMAIL": "[email protected]",
"MOBILE": 25,
"AGE": 24,
"CITY": "Mumbai"
}]
}
Response:
Success
{
"message": "39c2e217-b7ca-0196-f7ec-b26e5c7acf4e",
"status": 200
}
API Limits and Error Description
Error | Description |
---|---|
{ "message": "invalid api key", "status": 401 } | API key is invalid |
{ "message": "api key can not be blank in headers", "status": 400 } | "api-key" header should not be blank |
{ "message": "listid should be of type integer", "status":400 } | "listid" key mentioned in the API body should be of integer data type |
{ "message": "you have exceeded the batch limit of 1000", "status":400 } | In one API call, you can add details up-to a maximum of 1000 contacts |
{ "message": "primary key is mandatory and should be string", "status":400 } | "primarykey" key mentioned in the API body is mandatory and should be of String Data type |
{ "message": "callbackurl or notifyemail is mandatory and should be string", "status":400 } | Both the keys "callbackrul" and "notifyemail" mentioned in the API body are mandatory fields |
{ "message": "data should be of type array", "status":400 } | "data" key mentioned in the API body should of type array |
{ "message": "client server not found", "status":400 } | Client server not found |
{ "message": "limit Reached", "status":400 } | Daily limit of API request made has been reached |
{ "message": "activity can not be blank in path param", "status":400 } | Deprecated Error - Not applicable anymore |
{ "message": "type can not be blank in path param", "status":400 } | Deprecated Error - Not applicable anymore |
Updated 4 months ago