Add Customer

Introduction

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.

Pre-requisites

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.
  • 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 TypeShould be Basic Auth
Request / Content TypeShould be application/json
Response TypeShould be application/json
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.

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.

Body parameters


FieldTypeRequiredDescription
customerObjectYesThe customer entity is the focal point around which all data revolves. It includes customer information about purchase history, behavioral activities, loyalty details, the user groups they are part of, reward and coupon details, and other related information.
.mobilestringYesThe customer’s mobile number. Add a mobile number with the country code. Only numeric characters are supported (0-9).
.emailstringYesThe customer’s valid email address. Supported characters: a-z A-Z 0-9 - _ + . and @
.external_idstringYesThe customer’s external identifier. Special characters are not recommended. Maximum length is 250 characters.
.firstnamestringThe customer’s first name. Alphanumeric, spaces, hyphens, apostrophes are supported. The maximum length is 100 characters.
.lastnamestringThe customer’s last name. Alphanumeric, spaces, hyphens, apostrophes are supported. The maximum length is 100 characters.
.updated_ondatetimeThe date and time when the customer was last updated. Format: YYYY-MM-DD HH:MM:SS Example: 2025-02-26 09:10:00
.registered_tillstringThe till name registered with the customer. Maximum length is 50 characters.
.associated_withstringThe till name associated with the customer. Maximum length is 50 characters.
.typeenumThe customer type. Values allowed are loyalty, non_loyalty.
.sourcestringThe source from where the customer's data is collected or registered from. Example: an in-store system. Values allowed are InStore, Facebook, WebEngage, WeChat, E-commerce, Website, Line, Mobile App, and more.
.accountIdstringA unique identifier associated with the specific source or channel through which the customer's profile was created or registered.
.fraud_statusenumThe customer’s fraud status. Values allowed are NORMAL, OUTLIER, FRAUD, INTERNAL, INVALID.
..statusstring
.commChannelsObjectThe medium 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.
..typestringModes of communication with the customer. Values allowed are mobile, email, card number.
..valuestringValue of the type of communication.
..primarystringIndicates if the communication type is the primary contact.
..verifiedstringIndicates if this communication type is verified.
..metaObjectContains meta information of the customer.
.custom_fieldsObjectCustom 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.
..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.
..namestringName of the extended field.
..valuestringValue of the extended field.

Response parameters


FieldTypeDescription
.successstringIndicates the success of the operation.
.codestringThe code representing the status of the operation.
.messagestringThe message describing the status of the operation.
.totalstringThe total count in the response.
.success_countstringThe count of successful operations.
customerObject
.user_idstringThe unique identifier for the customer.
.firstnamestringThe customer’s first name.
.lastnamestringThe customer’s last name.
.mobilestringThe customer’s mobile number.
.emailstringThe customer’s valid email address.
.external_idstringThe customer’s external identifier.
.lifetime_pointsstringCustomer’s total lifetime points accumulated.
.loyalty_pointsstringCustomer’s current loyalty points.
.current_slabstringCustomer’s current slab in the loyalty program.
.tier_expiry_datedatetimeCustomer's current tier expiry date.
points_summariesObject
..programIdstringThe ID of the program associated with the points summary.
..redeemedstringThe number of points redeemed.
..expiredstringThe number of points expired.
..returnedstringThe number of points returned.
..adjustedstringThe number of points adjusted.
..lifetimePointsstringThe lifetime points in the summary.
..loyaltyPointsstringThe loyalty points in the summary.
..cumulativePurchasesstringThe cumulative purchases in the summary.
..currentSlabstringThe current slab in the points summary.
..nextSlabstringThe next slab in the points summary.
..nextSlabSerialNumberstringThe serial number of the next slab.
..nextSlabDescriptionstringThe description of the next slab.
..slabSNostringThe serial number of the slab.
..slabExpiryDatedatetimeThe expiry date of the slab.
..totalPointsstringThe total points of the slab.
customerObject
.lifetime_purchasesstringCustomer’s total lifetime purchases made.
.registered_ondatetimeThe date and time when the customer registered.
.updated_ondatetimeThe date and time when the customer's information was last updated.
.typestringThe type of customer.
.sourcestringThe source through which the customer was acquired.
.fraud_statusenumThe fraud status of the customer
.reasonstringThe reason 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.
..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.
..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.
sideEffectsObjectObject containing side effects (additional information) for the customer creation, if any.
..entityTypestringEntity which receives points. Possible values: USER, USERGROUP2, GROUP2
..rawAwardedPointsstringTotal number of points awarded without any rounding applied.
..customerIdstringUnique ID of the customer who is awarded points
..awardedPointsstringTotal number of points awarded with rounding applied.
..typestringType of award rewarded to the customer.
..isReferrerbooleanIndicates if the customer is a referrer.
item_statusObject
..successstringIndicates the success of the customer item operation.
..codestringThe code representing the status of the customer item operation.
..messagestringThe message describing the status of the customer item operation.
..warningstringWarning codes associated with the operation.

Error codes

Error CodeDescription
500All requests have failed due to errors. Invalid or unsupported inputs passed.
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.

Additional Notes

  1. 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.
Language
Click Try It! to start a request and see the response here!