get https://{host}/v2/customers/interaction
Lets you to fetch store interactions with a specific customer. This includes SMSs, emails, sent to the customer; missed calls received from the customer’s registered mobile number; and surveys submitted by the customer.
API endpoint example
http://nightly.api.capillarytech.com/v1.1/customer/interaction?format=json&source=INSTORE&accountId=1234&identifierName=mobile&mobile=91660499160&type=whatsapp
Query parameters
Parameter | Type | Description |
---|---|---|
identifierName | enum | Identifier type of the customer. Accepted values are email, mobile and external id. Any one of the customer identifiers is mandatory. |
identifierValue | string | Value for the identifier value. |
network | enum | Filter results by communication network. Accepted values are facebook, twitter, foursquare, and capillary. |
type | enum | Filter results by interaction type. email (for transaction email), emailbulk (for bulk email), checkin (applicable only for foursquare/facebook), like, comment (for facebook); mention, retweet, tweet (only for Twitter network), feedback (only for Capillary), whatsapp , zalo, line |
Response parameters
Note
You can enable the OTP masking configuration and mask the OTPs. Refer to documentation on OTP masking.
Parameter | Type | Description |
---|---|---|
name | String | Name of the customer. |
interaction | Array | An array containing interaction details. |
- count | Number | The count of interactions. |
- name | String | The name of the interaction (e.g., "email"). |
- messageList | Array | An array containing message details. |
-- id | Number | The unique identifier for the message. |
-- receiver | String | The email address of the message receiver. |
-- subject | String | The subject of the email message. |
-- campaignId | Number | The campaign identifier associated with the message. |
-- status | String | The status of the message delivery (e.g., "NOT-DELIVERED", DELIVERED," "SOFT_BOUNCED"). |
-- sentDate | String | The date and time when the message was sent (format: "DD-MM-YYYY HH:mm:ss"). |
-- deliveredTime | String | The date and time when the message was delivered (format: "YYYY-MM-DDTHH:mm:ssZ"). |
-- userId | Number | The unique identifier for the user associated with the message. |
warnings | Array | An array containing warning details. |
{
"response": {
"status": {
"success": "true",
"code": 200,
"message": "Success"
},
"customer": {
"id": "565039505",
"mobile": "919148574269",
"email": "[email protected]",
"external_id": "",
"interactions": {
"network": [
{
"name": "capillary",
"interaction": [
{
"last_interaction_time": "null",
"used_status": false,
"count": 0,
"type": "survey"
},
{
"last_interaction_time": "null",
"used_status": false,
"count": 0,
"type": "missed_call"
},
{
"last_interaction_time": "null",
"used_status": false,
"count": 0,
"type": "whatsapp"
},
{
"last_interaction_time": "null",
"used_status": false,
"count": 0,
"type": "zalo"
},
{
"last_interaction_time": "null",
"used_status": false,
"count": 0,
"type": "line"
},
{
"last_interaction_time": "null",
"used_status": false,
"count": 0,
"type": "phone"
},
{
"last_interaction_time": "null",
"used_status": false,
"count": 0,
"type": "sms"
},
{
"messages": {
"message": [
{
"id": 1743467374476,
"sender": "",
"reciever": "[email protected]",
"subject": "Loyalty+ Release Notes - JFM'25 (Part 1️⃣)",
"status": "OPENED",
"sent_time": "2025-04-14 14:23:20",
"delivered_time": "2025-04-14 14:23:20",
"campaign_id": "267560"
},
{
"id": 1743467660038,
"sender": "",
"reciever": "[email protected]",
"subject": "Loyalty+ Release Notes - JFM'25 (Part 2️⃣)",
"status": "DELIVERED",
"sent_time": "2025-04-16 15:32:10",
"delivered_time": "2025-04-16 15:32:20",
"campaign_id": "267560"
}
]
},
"last_interaction_time": "null",
"used_status": false,
"count": 2,
"type": "email"
}
]
}
]
},
"item_status": {
"success": "true",
"code": 1000,
"message": "Customer successfully retrieved"
}
}
}
}
API specific error codes
Error Code | Description | Reason |
---|---|---|
1012 | Cannot find customer for provided mobile/external-id/e-mail/id | mobile/external-id/e-mail/id invalid or unsupported |