Get Customer Interactions

This API allows you to fetch store interactions with a specific customer. This includes SMSs and emails sent to the customer; missed calls received from the customer’s registered mobile number; and surveys submitted by the customer.

📘

Notes

  1. Any one of the customer identifiers is required.
  2. You can enable the OTP masking configuration and mask the OTPs. Refer to documentation on OTP masking.

Example request

curl --location 'https://eu.api.capillarytech.com/v1.1/customer/interaction?email=gcr9986%40gmail.com&format=json' \
--header 'Authorization: Basic ' \
--header 'Cookie: _cfuvid=NutM5aze4yrcjIjIzbpgbACLy6KicfQ2BllSUwfl6aY-1738925088455-0.0.1.1-604800000; _cfuvid=a0NmZQvi.30LKK7NvCQJgMpK8Ig15sul9um2ZFRucDk-1757422794990-0.0.1.1-604800000'

Prerequisites

Make sure you have the right authentication and appropriate access control configured.

Rate limit

  • Demo and Testing Clusters: 1,000 requests per minute per API key
  • Other Organizations: The rate limit is brand-specific.

To modify the limit, create a ticket with the Capillary Product support team.

Query parameters

Field

Type

Required

Description

identifierName

enum

Yes

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

identifierValue

string

Yes

Value for the identifier value.

network

enum

Optional

Filter results by communication network. Accepted values are facebook, twitter, foursquare, and capillary. Default network is Capillary.

type

enum

Optional

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

limit

integer

Optional

Maximum number of records to return per page. Default limit - 50.

offset

integer

Optional

Number of records to skip before starting to return results (zero-based). Default value - 0

card_details

Optional

Default false

user_id

Optional

Default false

included_all_user_group2

Optional

Default false

included_user_group2_loyalty_details

Optional

Default false

fetch_type

Optional

Default ORG

delayed_accrual

Optional

Default false

ou_code

Optional

use_default_user_group2

Optional

user_group2_external_id, user_group2_id, user_group2_primary_user_id, user_group2_primary_user_identifier_type, user_group2_primary_user_identifier_value, user_group2_primary_user_source, user_group2_primary_user_accountId

Optional

Example response

{
    "response": {
        "status": {
            "success": "true",
            "code": 200,
            "message": "Success"
        },
        "customer": {
            "id": "565118794",
            "mobile": "919353491050",
            "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": "whatsapp"
                            },
                            {
                                "last_interaction_time": "null",
                                "used_status": false,
                                "count": 0,
                                "type": "line"
                            },
                            {
                                "last_interaction_time": "null",
                                "used_status": false,
                                "count": 0,
                                "type": "zalo"
                            },
                            {
                                "last_interaction_time": "null",
                                "used_status": false,
                                "count": 0,
                                "type": "phone"
                            },
                            {
                                "last_interaction_time": "null",
                                "used_status": false,
                                "count": 0,
                                "type": "missed_call"
                            },
                            {
                                "last_interaction_time": "null",
                                "used_status": false,
                                "count": 0,
                                "type": "email"
                            },
                            {
                                "last_interaction_time": "null",
                                "used_status": false,
                                "count": 0,
                                "type": "sms"
                            }
                        ]
                    }
                ]
            },
            "item_status": {
                "success": "true",
                "code": 1000,
                "message": "Customer successfully retrieved"
            }
        }
    }
}

Response parameters

FieldTypeDescription
.responseObjectIndicates the response of the operation.
..statusObjectIndicates the status of the operation.
...successstringIndicates the success of the operation.
...codeintegerCode representing the status of the operation.
...messagestringMessage describing the status of the operation.
..customerArrayAn array of customer objects.
...idintegerCustomer identifier.
...mobilestringCustomer’s mobile number.
...emailstringCustomer’s valid email address.
...external_idstringCustomer’s external identifier.
...interactionsObjectObject containing the details of the interactions.
....networkArrayArray of the network details.
.....namestringName of the customer.
.....interactionArrayAn array containing interaction details.
......last_interaction_timestringThe date and time when the last interaction message was sent (format: "DD-MM-YYYY HH:mm:ss").
......used_statusenumThe status of the message (e.g., "TRUE, or FALSE").
......countnumberThe count of interactions.
......typestringThe name of the interaction (e.g., "email").

Error codes

CodeDescription
500All requests have failed due to errors. Invalid or unsupported inputs passed.

Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!