Get Customer Interactions

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

https://eu.api.capillarytech.com/v2/customers/interaction?identifierName=mobile&network=capillary&identifierValue=917385022695

Query parameters

Parameter

Type

Description

identifierName

enum

Type of customer identifier. Accepted values are: email, mobile, and external_id. At least one customer identifier is required.

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. The types of interaction are:

  • 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
  • viber

Response parameters

📘

Note

You can enable the OTP masking configuration and mask the OTPs. Refer to documentation on OTP masking.

ParameterTypeDescription
nameStringName of the customer.
interactionArrayAn array containing interaction details.
- countNumberThe count of interactions.
- nameStringThe name of the interaction (e.g., "email").
- messageListArrayAn array containing message details.
-- idNumberThe unique identifier for the message.
-- receiverStringThe email address of the message receiver.
-- subjectStringThe subject of the email message.
-- campaignIdNumberThe campaign identifier associated with the message.
-- statusStringThe status of the message delivery (e.g., "NOT-DELIVERED", DELIVERED," "SOFT_BOUNCED").
-- sentDateStringThe date and time when the message was sent (format: "DD-MM-YYYY HH:mm:ss").
-- deliveredTimeStringThe date and time when the message was delivered (format: "YYYY-MM-DDTHH:mm:ssZ").
-- userIdNumberThe unique identifier for the user associated with the message.
warningsArrayAn 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"
            }
        }
    }
}
{
    "name": "capillary",
    "interaction": [
        {
            "count": 0,
            "name": "survey",
            "surveys": []
        },
        {
            "count": 0,
            "name": "line",
            "messageList": []
        },
        {
            "count": 3,
            "name": "viber",
            "messageList": [
                {
                    "id": 1746038123052,
                    "receiver": "917385022695",
                    "subject": "AAAAAAACCCCCCC",
                    "campaignId": 1241780,
                    "status": "FAILED",
                    "sentDate": "26-05-2025 15:52:02",
                    "userId": 432796209
                },
                {
                    "id": 1746038123393,
                    "receiver": "917385022695",
                    "subject": "test-hello",
                    "campaignId": 1241780,
                    "status": "FAILED",
                    "sentDate": "26-05-2025 16:17:07",
                    "userId": 432796209
                },
                {
                    "id": 1746038178479,
                    "receiver": "917385022695",
                    "subject": "Hii,This is the message in viber.",
                    "campaignId": 1242049,
                    "status": "FAILED",
                    "sentDate": "28-05-2025 13:52:07",
                    "userId": 432796209
                }
            ]
        },
        {
            "count": 0,
            "name": "email",
            "messageList": []
        },
        {
            "count": 0,
            "name": "whatsapp",
            "messageList": []
        },
        {
            "count": 0,
            "name": "missed_call",
            "usedStatus": false
        },
        {
            "count": 4,
            "name": "phone",
            "messageList": [
                {
                    "id": 1740767431623,
                    "receiver": "917385022695",
                    "subject": "Sample message Akash Vibertest",
                    "campaignId": -1,
                    "status": "GTW_NOT_FOUND",
                    "sentDate": "07-03-2025 13:48:50",
                    "userId": 432796209
                },
                {
                    "id": 1740767429676,
                    "receiver": "917385022695",
                    "subject": "Sample message Akash Vibertest",
                    "campaignId": -1,
                    "status": "GTW_NOT_FOUND",
                    "sentDate": "07-03-2025 12:57:06",
                    "userId": 432796209
                },
                {
                    "id": 1740767429770,
                    "receiver": "917385022695",
                    "subject": "Sample message Akash Vibertest",
                    "campaignId": -1,
                    "status": "GTW_NOT_FOUND",
                    "sentDate": "07-03-2025 13:01:12",
                    "userId": 432796209
                },
                {
                    "id": 1740767430545,
                    "receiver": "917385022695",
                    "subject": "Sample message Akash Vibertest",
                    "campaignId": -1,
                    "status": "GTW_NOT_FOUND",
                    "sentDate": "07-03-2025 13:37:22",
                    "userId": 432796209
                }
            ]
        },
        {
            "count": 4,
            "name": "sms",
            "messageList": [
                {
                    "id": 1740767431623,
                    "receiver": "917385022695",
                    "subject": "Sample message Akash Vibertest",
                    "campaignId": -1,
                    "status": "GTW_NOT_FOUND",
                    "sentDate": "07-03-2025 13:48:50",
                    "userId": 432796209
                },
                {
                    "id": 1740767429676,
                    "receiver": "917385022695",
                    "subject": "Sample message Akash Vibertest",
                    "campaignId": -1,
                    "status": "GTW_NOT_FOUND",
                    "sentDate": "07-03-2025 12:57:06",
                    "userId": 432796209
                },
                {
                    "id": 1740767429770,
                    "receiver": "917385022695",
                    "subject": "Sample message Akash Vibertest",
                    "campaignId": -1,
                    "status": "GTW_NOT_FOUND",
                    "sentDate": "07-03-2025 13:01:12",
                    "userId": 432796209
                },
                {
                    "id": 1740767430545,
                    "receiver": "917385022695",
                    "subject": "Sample message Akash Vibertest",
                    "campaignId": -1,
                    "status": "GTW_NOT_FOUND",
                    "sentDate": "07-03-2025 13:37:22",
                    "userId": 432796209
                }
            ]
        },
        {
            "count": 0,
            "name": "zalo",
            "messageList": []
        }
    ],
    "warnings": []
}

API specific error codes

Error CodeDescriptionReason
1012Cannot find customer for provided mobile/external-id/e-mail/idmobile/external-id/e-mail/id invalid or unsupported
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!