Add Customer

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

ParameterDescription
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
firstnameThe first name of the customer
lastnameThe last name of the customer
updated_onThe date and time the customer was last updated
registered_tillThe till name with whom the customer is going to be registered.
associated_withThe till name with whom the customer is going to be associated with.
typeThe type of customer
fraud_statusThe 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

ParameterDescription
status.successIndicates the success of the operation
status.codeThe code representing the status of the operation
status.messageThe message describing the status of the operation
status.totalThe total count in the response
status.success_countThe count of successful operations
customer.user_idThe unique identifier for the customer
customer.firstnameThe first name of the customer
customer.lastnameThe last name of the customer
customer.mobileThe mobile number of the customer
customer.emailThe email address of the customer
customer.external_idAn external identifier for the customer
customer.lifetime_pointsThe total lifetime points accumulated by the customer
customer.loyalty_pointsThe current loyalty points of the customer
customer.current_slabThe current slab of the customer in the loyalty program
customer.tier_expiry_dateThe expiry date of the customer's current tier
points_summary.programIdThe ID of the program associated with the points summary
points_summary.redeemedThe number of points redeemed
points_summary.expiredThe number of points expired
points_summary.returnedThe number of points returned
points_summary.adjustedThe number of points adjusted
points_summary.lifetimePointsThe lifetime points in the summary
points_summary.loyaltyPointsThe loyalty points in the summary
points_summary.cumulativePurchasesThe cumulative purchases in the summary
points_summary.currentSlabThe current slab in the points summary
points_summary.slabSNoThe serial number of the slab
points_summary.slabExpiryDateThe expiry date of the slab
customer.lifetime_purchasesThe total lifetime purchases made by the customer
customer.registered_onThe date and time when the customer registered
customer.updated_onThe date and time when the customer's information was last updated
customer.typeThe type of customer
customer.sourceThe source through which the customer was acquired
customer.fraud_statusThe fraud status of the customer
customer.reasonThe reason field (not populated in this response)
item_status.successIndicates the success of the customer item operation
item_status.codeThe code representing the status of the customer item operation
item_status.messageThe message describing the status of the customer item operation
item_status.warnings.warningWarning 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"
                            ]
                        }
                    }
                }
            ]
        }
    }
}
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!