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
- Any one of the customer identifiers is required.
- 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.
- Access group resource: Write access to customer group resource. For more information on access control, see the access group documentation.
- Authentication: Basic authentication details. For more information on authentication, see the Authentication documentation.
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: |
identifierValue | string | Yes | Value for the identifier value. |
network | enum | Optional | Filter results by communication network. Accepted values are |
type | enum | Optional | Filter results by interaction type. The types of interaction are:
|
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
Field | Type | Description |
---|---|---|
.response | Object | Indicates the response of the operation. |
..status | Object | Indicates the status of the operation. |
...success | string | Indicates the success of the operation. |
...code | integer | Code representing the status of the operation. |
...message | string | Message describing the status of the operation. |
..customer | Array | An array of customer objects. |
...id | integer | Customer identifier. |
...mobile | string | Customer’s mobile number. |
string | Customer’s valid email address. | |
...external_id | string | Customer’s external identifier. |
...interactions | Object | Object containing the details of the interactions. |
....network | Array | Array of the network details. |
.....name | string | Name of the customer. |
.....interaction | Array | An array containing interaction details. |
......last_interaction_time | string | The date and time when the last interaction message was sent (format: "DD-MM-YYYY HH:mm:ss"). |
......used_status | enum | The status of the message (e.g., "TRUE, or FALSE"). |
......count | number | The count of interactions. |
......type | string | The name of the interaction (e.g., "email"). |
Error codes
Code | Description |
---|---|
500 | All requests have failed due to errors. Invalid or unsupported inputs passed. |