Batch API - Add Multiple Contacts through API
This API allows the user to add contacts in bulk to the CE dashboard.
Important Note
This API is meant for transferring 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 URLs are required to be specified.
4: All attribute fields should be in upper case.
5: You can send a maximum size of 1000 contacts 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.
We recommend you use Add Contact (Async or Sync Mode) APIs for adding single contacts.
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. - Email is only sent when more than one contacts are added in the data field. | String | [email protected] |
primarykey | Primary Key of the Panel | String | |
data | Contains the array of Contact details. The format is key value pair. Refer to 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]",
"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 } | The daily limit of API requests made has been reached |
Updated 2 months ago