Add Customer

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

This API registers customers in the organization with the primary identifiers being either the mobile number, email ID, or external ID. To add a customer, you must provide at least one of these parameters.

Example request

curl --location 'https://eu.api.capillarytech.com/v1.1/customer/add?format=json' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data-raw '{
    "root": {
        "customer": [
            {
                "mobile": 9177xx811213,
                "email": "[email protected]",
                "external_id": "12on123",
                "firstname": "Raj",
                "lastname": "loyal",
                "updated_on": "2025-05-29 09:10:00",
                "registered_till": "rutuja_capillary",
                "associated_with": "rutuja_capillary",
                "type": "NON_LOYALTY",
                "source": "INSTORE",
                "accountId": "123456",
                "fraud_status": 
{
                    "status": "Fraud_Suspected"
                },
                "commChannels": [
                {
                    "type": "mobile",
                    "value": "9177xx811213",
                    "primary": "true",
                    "verified": "true",
                    "meta": {
                        "residence": "true"
                    }
                }
                ],
                "custom_fields": {
                    "field": [
                        {
                            "name": "City_name",
                            "value": "Bangalore"
                        },
                        {
                            "name": "address",
                            "value": "BTM"
                        }
                    ]
                },
                "extended_fields": {
                    "field": [
                        {
                                "name": "age",
                                "value": "25"
                        }
                    ]
                }
            }
        ]
    }
}

curl --location 'https://eu.api.capillarytech.com/v1.1/customer/add?format=json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic =' \
--header 'Cookie: _cfuvid=uvtbHlSAbCYurdYMb0psZmvW1nY0gy1KWoNRJIAVQWk-1757036882526-0.0.1.1-604800000' \
--data '{
    "root": {
        "customer": [
            {
                "external_id": "123445901",
                "registered_on": "2024-07-29 11:11:11",
                "registered_till": "till_name",
                "associated_with": "till_name"
            }
        ]
    }
}'

Prerequisites

  • Access group resource: Write access to customer group resource. For more information on access control, see the access group documentation.
  • Authentication: Basic or OAuth authentication details. For more information on authentication, see the Authentication documentation.
  • Define all the necessary configurations. The mandatory attributes for customer registration depend on the configurations set on InTouch Settings > Registration Configuration.
  • Define custom and extended fields according to your requirements, if you need to use them during registration.

Header information

You can define certain attributes in the API header section, and also specify the Audit-related user context details.

Header NameDescription
Authentication/Authorization TypeBasic Auth
Request / Content Typeapplication/json
Response Typeapplication/json

Adding user context details

User Context refers to the entity information of the user who is performing actions such as adding or updating the data. This context includes attributes that help identify and provide details about the user and help track the user who made the changes.

Further to view the user context details in the audit log, you need to enable the query parameter includeUserContext=true in the audit log API..

Header valueDescription
USER-CONTEXT-ENTITY-TYPERefers to the classification of the user. This field does not have predefined validations, and you can define any values according to your specific requirements. For example, you could classify a user as an "Intouch Admin User". This field is not displayed in Member Care.
USER-CONTEXT-ENTITY-IDRefers to a unique identifier associated with the user entity type. For instance, it could be an Intouch admin user ID such as 3124587. This field does not have predefined validations, and you can define any values according to your specific requirements. This field is not displayed in Member Care.
USER-CONTEXT-ENTITY-SOURCERefers to the source through which changes are made. The standard values for this field are:
  • API

  • IMPORT

  • CONNECT_PLUS

  • MEMBER_CARE

  • REQUEST_WORKFLOW

    Note: You can raise a JIRA request to the sustenance team and add more values, as per your requirement.

USER-CONTEXT-ENTITY-SOURCE-IDRefers to ID if associated with the user source. This field does not have any validations.

Body parameters

FieldTypeRequiredDescription
.rootObjectYesRoot is a container for all the data.
..customerArrayYesAn array of customer objects. At least one customer identifier is required.
...mobilestringConditionalCustomer’s mobile number. Add a mobile number with the country code. Only numeric characters are supported (0-9). Maximum length is 20 characters. For other validation details, refer to the mobile number validation documentation.
...emailstringConditionalCustomer’s valid email address. Supported characters: a-z A-Z 0-9 - _ + . and @. Maximum length is 100 characters.
...external_idstringConditionalCustomer’s external identifier. If your organization has configured external ID length validation, the value must fall within the configured minimum and maximum length. Special characters are not recommended. Maximum length is 250 characters. See External ID validation for details.
...firstnamestringOptionalCustomer’s first name. Alphanumeric, spaces, hyphens, apostrophes are supported. The maximum length is 50 characters.
...lastnamestringOptionalCustomer’s last name. Alphanumeric, spaces, hyphens, apostrophes are supported. The maximum length is 50 characters.
...updated_ondatetimeOptionalDate and time when the customer was last updated. Format: YYYY-MM-DD HH:MM:SS For example: 2025-02-26 09:10:00
...registered_tillstringOptionalTill name registered with the customer. Maximum length is 50 characters.
...associated_withstringOptionalTill name associated with the customer. Maximum length is 50 characters.
...typeenumOptionalCustomer type. Values allowed are loyalty, non_loyalty.
...sourcestringOptionalSource from where the customer's data is collected or registered from. For example: an in-store system. Values allowed are InStore, Facebook, WebEngage, WeChat, E-commerce, Website, Line, Mobile App, and more.
...accountIdstringOptionalUnique identifier associated with the specific source or channel through which the customer's profile was created or registered.
...fraud_statusArrayOptionalCustomer’s fraud status. Values allowed are NORMAL, OUTLIER, FRAUD, INTERNAL, INVALID.
....statusenumOptionalCustomer's fraud status.
...commChannelsArrayYesMedium through which a customer can receive messages or notifications from the brand. Values allowed are SMS, email, mobile push notifications, WeChat, LINE, WhatsApp, and others.
.....typestringOptionalModes of communication with the customer. Values allowed are mobile, email, card number.
.....valuestringOptionalValue of the type of communication.
.....primarybooleanOptionalIndicates if the communication type is the primary contact.
.....verifiedstringOptionalIndicates if this communication type is verified.
.....metaArrayOptionalContains meta information of the customer.
......residencebooleanOptionalMeta information.
...custom_fieldsObjectOptionalCustom fields are used to store information specific to a brand's needs, such as customer preferences or product attributes. To use these fields during registration, you must define them beforehand.
....fieldArrayOptionalArray of custom fields.
......namestringOptionalName of the custom field.
......valuestringOptionalValue for the custom field.
...extended_fieldsObjectOptionalExtended fields are predefined, standardized fields that capture additional information for various entities, such as customers or transactions. To use them during registration, they must be pre-defined.
....fieldArrayOptionalArray of extended fields.
......namestringOptionalName of the extended field.
......valuestringOptionalValue of the extended field.

Example response

{
    "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": [
                            {
                                "awarded_points": 100,
                                "total_points": 100,
                                "customer_id": "424133043",
                                "type": "points"
                            },
                            {
                                "awarded_points": 100,                               
                                "customer_id": "424133021",
                                "is_referrer": "true",
                                "type": "points"
                            }
                        ]
                    },
                    "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"
                            ]
                        }
                    }
                }
            ]
        }
    }
}
{
    "response": {
        "status": {
            "success": "false",
            "code": 500,
            "message": "All requests have failed due to errors",
            "total": "1",
            "success_count": "0"
        },
        "customers": {
            "customer": [
                {
                }
          ]
         }
       }
 }

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.
...totalstringTotal count in the response.
...success_countstringCount of successful operations.
..customersObjectCustomer entity is the focal point around which all the data revolves.
...customerArrayArray of customer objects.
....user_idintegerUnique identifier for the customer.
....firstnamestringCustomer’s first name.
....lastnamestringCustomer’s last name.
....mobilestringCustomer’s mobile number.
....emailstringCustomer’s valid email address.
....external_idstringCustomer’s external identifier.
....lifetime_pointsintegerCustomer’s total lifetime points accumulated.
....loyalty_pointsintegerCustomer’s current loyalty points.
....current_slabstringCustomer’s current slab in the loyalty program.
....tier_expiry_datedatetimeCustomer's current tier expiry date.
....points_summariesObjectAn overview of the customer's points.
.....points_summaryArrayA summary of customers points.
....lifetime_purchasesintegerCustomer’s total lifetime purchases made.
....registered_onstringDate and time when the customer registered.
....updated_onstringDate and time when the customer's information was last updated.
....typestringType of customer.
....sourcestringSource through which the customer was acquired.
....fraud_statusstringFraud status of the customer.
....reasonstringReason field (not populated in this response).
....custom_fieldsObjectCustom fields are used to store information specific to a brand's needs, such as customer preferences or product attributes.
.....fieldArrayArray of custom fields.
......namestringName of the custom field.
......valuestringValue for the custom field.
....extended_fieldsObjectExtended fields are predefined, standardized fields that capture additional information for various entities, such as customers or transactions. To use them during registration, they must be pre-defined.
.....fieldArrayArray of extended fields.
......namestringName of the extended field.
......valuestringValue of the extended field.
....subscriptionObjectCustomer Subscription determines whether a customer has opted or not opted, receiving promotional or transactional communications from specific sources.
....side_effectsObjectObject containing side effects (additional information) for the customer creation, if any. If the header SKIP-DOWNSTREAM is set true, the side effects will not appear.
.....effectArrayArray containing details of side effects.
....item_statusObjectObject containing details of item status.
.....successstringIndicates the success of the customer item operation.
.....codestringCode representing the status of the customer item operation.
.....messagestringMessage describing the status of the customer item operation.
.....warningsObjectWarning codes associated with the operation.
......warningArrayArray containing the warnings.

Error codes

CodeDescription
500All requests have failed due to errors. Invalid or unsupported inputs passed.
1003External ID validation failed. The external ID does not meet the configured length requirements. Ensure the external ID length is between the minimum and maximum length configured for your organization.
1006Mobile number validation failed. The mobile number does not match the expected format or required configuration is missing for the country.
1007Error in customer registration: No Valid Mobile Number or External ID or Email provided required for registration. No valid mobile number, external ID, or email provided.
1043External ID is required. This error occurs when your organization has configured external ID as a mandatory identifier but no external ID was provided.
8014Mobile number validation failed due to missing or invalid country configuration. This occurs if the organization's base country is not set or if required country fields are missing.

External ID validation

The API validates the external_id field based on your organization's configuration settings. Understanding these validation rules helps prevent registration errors.

Validation rules

The external ID is validated against the following organization-level configurations:

ConfigurationDescription
CONF_CLIENT_EXTERNAL_ID_MIN_LENGTHMinimum required length for the external ID. Default is 0 (no minimum).
CONF_CLIENT_EXTERNAL_ID_MAX_LENGTHMaximum allowed length for the external ID. Default is 0 (no validation).
CONF_USERS_IS_EXTERNAL_ID_REQUIREDWhen enabled, external ID becomes a mandatory identifier for registration.

How validation works

  • If CONF_CLIENT_EXTERNAL_ID_MAX_LENGTH is set to 0, length validation is skipped.
  • If both min and max length are configured, the external ID must have a character count between these values (inclusive).
  • Empty or null external IDs pass validation unless CONF_USERS_IS_EXTERNAL_ID_REQUIRED is enabled.
  • The maximum absolute length for an external ID is 250 characters.

Example

If your organization has configured:

  • CONF_CLIENT_EXTERNAL_ID_MIN_LENGTH = 8
  • CONF_CLIENT_EXTERNAL_ID_MAX_LENGTH = 12

Then:

  • "ABC123" (6 characters) → Invalid (error code 1003)
  • "ABC12345" (8 characters) → Valid
  • "ABC123456789" (12 characters) → Valid
  • "ABC1234567890" (13 characters) → Invalid (error code 1003)
📘

Configuration

To configure external ID validation settings for your organization, contact Capillary support.

Additional notes

API behavior

  • 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.
  • Auto-generation of external ID must be explicitly enabled if required by your registration process.
Query Params
string
Headers
string
Responses

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json