post https://{host}/v1.1/customer/add
Registers customers in the org’s loyalty program with the primary identifier (mobile number/email id/external id).
Make sure you have the appropriate access control configured. For more information, see access group documentation.
API Behaviour
- If
CONFIG_SKIP_SECONDARY_ID_ON_PRIMARY_MISMATCH
is enabled, if the primary identifier is different but any of the secondary identifiers exist, a new customer is registered with the primary identifier ignoring the secondary identifier. The config is available on the Registration Page of InTouch Profile > Organization Settings > Miscellaneous.- Also, this config overrides
CONF_PRIMARY_IDENTIFIER_STRICT_CHECK
.
- Also, this config overrides
- Adds custom field details.
- Adds extended field values.
API endpoint
https://eucrm.cc.capillarytech.com/v1.1/customer/add
Header information
You can define certain attributes in the API header section and define the user context details. For more information, refer to the user context section in the Audit Details documentation.
Body Parameters
The mandatory attributes for customer registration depend on the configurations set on InTouch Settings > Registration Configuration. You need to know your org configurations before using this API.
Parameter | Description |
---|---|
mobile** | The mobile number of the customer. Note: For mobile numbers, add the mobile number with the country code. |
email** | The email address of the customer |
external_id** | An external identifier for the customer |
firstname | The first name of the customer |
lastname | The last name of the customer |
updated_on | The date and time the customer was last updated |
registered_till | The till name with whom the customer is going to be registered. |
associated_with | The till name with whom the customer is going to be associated with. |
type | The type of customer |
fraud_status | The fraud status of the customer |
City_name (custom field) | The city where the customer resides |
address (custom field) | The address of the customer |
bde_mobile_number (custom field) | The mobile number of the BDE associated with the customer |
bde_name (custom field) | The name of the BDE associated with the customer |
firm_name (custom field) | The name of the firm associated with the customer |
club (custom field) | The club associated with the customer |
pincode (custom field) | The pin code of the customer's address |
pwgConsumption (custom field) | The PWG consumption status of the customer. |
state (custom field) | The state where the customer resides. |
profile_image_name (custom field) | The name of the customer's profile image file. |
{
"root": {
"customer": [
{
"mobile": "919876532218",
"email": "[email protected]",
"external_id": "",
"firstname": "testuwser",
"lastname": "promo54",
"updated_on": "2023-07-11 10:12:00",
"registered_till": "",
"associated_with": "",
"type": "LOYALTY",
"fraud_status": {
"status": ""
},
"custom_fields": {
"field": [
{
"name": "City_name",
"value": "Bangalore"
},
{
"name": "address",
"value": "Bangalore1234"
},
{
"name": "bde_mobile_number",
"value": "12345678"
},
{
"name": "bde_name",
"value": "pidilite"
},
{
"name": "firm_name",
"value": "pidilite1"
},
{
"name": "club",
"value": "pidilite2"
},
{
"name": "pincode",
"value": "54321"
},
{
"name": "pwgConsumption",
"value": "true"
},
{
"name": "state",
"value": "pidilite5"
},
{
"name": "profile_image_name",
"value": "customerprofile1"
}
]
}
}
]
}
}
{
"root": {
"customer": [
{
"external_id": "123445901"
"registered_on": "2024-07-29 11:11:11",
"registered_till": "till_name",
"associated_with": "till_name"
}
]
}
}
**
To add a customer, you must provide at least one of the parameters marked with **
Response Parameters
Parameter | Description |
---|---|
status.success | Indicates the success of the operation |
status.code | The code representing the status of the operation |
status.message | The message describing the status of the operation |
status.total | The total count in the response |
status.success_count | The count of successful operations |
customer.user_id | The unique identifier for the customer |
customer.firstname | The first name of the customer |
customer.lastname | The last name of the customer |
customer.mobile | The mobile number of the customer |
customer.email | The email address of the customer |
customer.external_id | An external identifier for the customer |
customer.lifetime_points | The total lifetime points accumulated by the customer |
customer.loyalty_points | The current loyalty points of the customer |
customer.current_slab | The current slab of the customer in the loyalty program |
customer.tier_expiry_date | The expiry date of the customer's current tier |
points_summary.programId | The ID of the program associated with the points summary |
points_summary.redeemed | The number of points redeemed |
points_summary.expired | The number of points expired |
points_summary.returned | The number of points returned |
points_summary.adjusted | The number of points adjusted |
points_summary.lifetimePoints | The lifetime points in the summary |
points_summary.loyaltyPoints | The loyalty points in the summary |
points_summary.cumulativePurchases | The cumulative purchases in the summary |
points_summary.currentSlab | The current slab in the points summary |
points_summary.slabSNo | The serial number of the slab |
points_summary.slabExpiryDate | The expiry date of the slab |
customer.lifetime_purchases | The total lifetime purchases made by the customer |
customer.registered_on | The date and time when the customer registered |
customer.updated_on | The date and time when the customer's information was last updated |
customer.type | The type of customer |
customer.source | The source through which the customer was acquired |
customer.fraud_status | The fraud status of the customer |
customer.reason | The reason field (not populated in this response) |
item_status.success | Indicates the success of the customer item operation |
item_status.code | The code representing the status of the customer item operation |
item_status.message | The message describing the status of the customer item operation |
item_status.warnings.warning | Warning codes associated with the operation |
{
"response": {
"status": {
"success": "true",
"code": 200,
"message": "Success",
"total": "1",
"success_count": "1"
},
"customers": {
"customer": [
{
"user_id": 557408687,
"firstname": "testuwser",
"lastname": "promo54",
"mobile": "919876532218",
"email": "[email protected]",
"external_id": "000003880203",
"lifetime_points": 0,
"loyalty_points": 0,
"current_slab": "Base",
"tier_expiry_date": "2124-08-01 23:59:59",
"points_summaries": {
"points_summary": [
{
"programId": "469",
"redeemed": "0",
"expired": "0",
"returned": "0",
"adjusted": "0",
"lifetimePoints": "0",
"loyaltyPoints": "0",
"cumulativePurchases": "0",
"currentSlab": "Base",
"nextSlab": "Bronze",
"nextSlabSerialNumber": "2",
"nextSlabDescription": "Tier 2",
"slabSNo": "1",
"slabExpiryDate": "2124-08-01 23:59:59",
"totalPoints": ""
}
]
},
"lifetime_purchases": 0,
"registered_on": "2024-08-01 07:28:32",
"updated_on": "2023-07-11 10:12:00",
"type": "LOYALTY",
"source": "instore",
"fraud_status": "NONE",
"reason": "",
"custom_fields": {
"field": [
{
"name": "address",
"value": "Bangalore1234"
},
{
"name": "pincode",
"value": "54321"
}
]
},
"extended_fields": {
"field": []
},
"subscriptions": {
"subscription": []
},
"side_effects": {
"effect": [
{
"id": 1233197460,
"coupon_type": "PE",
"coupon_code": "1VSD3JPP",
"valid_till": "2025-07-29 23:59:59",
"description": "Welcome Offer - 10% flat discount",
"type": "coupon"
}
]
},
"item_status": {
"success": "true",
"code": "1000",
"message": "Customer registration successful, Provided Custom Field is invalid",
"warnings": {
"warning": [
"1017"
]
}
}
}
]
}
}
}
{
"response": {
"status": {
"success": "true",
"code": 200,
"message": "Success",
"total": "1",
"success_count": "1"
},
"customers": {
"customer": [
{
"user_id": 84230513,
"firstname": "",
"lastname": "",
"mobile": null,
"email": null,
"external_id": "123445901",
"lifetime_points": 100,
"loyalty_points": 100,
"current_slab": "Base",
"tier_expiry_date": "2124-08-01 23:59:59",
"points_summaries": {
"points_summary": [
{
"programId": "1204",
"redeemed": "0",
"expired": "0",
"returned": "0",
"adjusted": "0",
"lifetimePoints": "100",
"loyaltyPoints": "100",
"cumulativePurchases": "0",
"currentSlab": "Base",
"nextSlab": "Milestone 1",
"nextSlabSerialNumber": "2",
"nextSlabDescription": "Milestone 1",
"slabSNo": "1",
"slabExpiryDate": "2124-08-01 23:59:59",
"totalPoints": ""
}
]
},
"lifetime_purchases": 0,
"registered_on": "2024-08-01 02:31:17",
"updated_on": "2024-08-01 02:31:17",
"type": "LOYALTY",
"source": "instore",
"custom_fields": {
"field": []
},
"extended_fields": {
"field": []
},
"subscriptions": {
"subscription": []
},
"side_effects": {
"effect": [
{
"awarded_points": 100,
"total_points": 100,
"type": "points"
}
]
},
"item_status": {
"success": "true",
"code": "1000",
"message": "Customer registration successful",
"warnings": {
"warning": []
}
}
}
]
}
}
}
{
"response": {
"status": {
"success": "true",
"code": 200,
"message": "Success",
"total": "1",
"success_count": "1"
},
"customers": {
"customer": [
{
"user_id": 553639618,
"firstname": "testuser",
"lastname": "promo4",
"mobile": "919876543218",
"email": "[email protected]",
"external_id": null,
"lifetime_points": 0,
"loyalty_points": 0,
"current_slab": "NONE",
"tier_expiry_date": "2123-09-12 23:59:59",
"points_summaries": {
"points_summary": [
{
"programId": "2088",
"redeemed": "0",
"expired": "0",
"returned": "0",
"adjusted": "0",
"lifetimePoints": "0",
"loyaltyPoints": "0",
"cumulativePurchases": "0",
"currentSlab": "NONE",
"nextSlab": "",
"nextSlabSerialNumber": "-1",
"nextSlabDescription": "",
"slabSNo": "1",
"slabExpiryDate": "2123-09-12 23:59:59",
"totalPoints": ""
}
]
},
"lifetime_purchases": 0,
"registered_on": "2023-09-12 16:05:01",
"updated_on": "2023-07-11 10:12:00",
"type": "LOYALTY",
"source": "instore",
"fraud_status": "NONE",
"reason": "",
"custom_fields": {
"field": []
},
"extended_fields": {
"field": []
},
"subscriptions": {
"subscription": []
},
"side_effects": {
"effect": [
{
"alternate_currency_identifier": "rgpws7",
"alternate_currency_name": "ac1",
"awarded_value": "110",
"type": "alternate_currency"
}
]
},
"item_status": {
"success": "true",
"code": "1000",
"message": "Customer registration successful, Provided Custom Field is invalid",
"warnings": {
"warning": [
"1017"
]
}
}
}
]
}
}
}