Associate Customer

Lets you batch register customers, or associate a customer with company or hierarchy. This API registers parent and child customers (if not registered), and associates the customer with hierarchy code, company role, parent and child customers.

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

Batch support is for normal customer registration

Example request

 curl -L 'https://eu.api.capillarytech.com/v2/customers/bulk?source=INSTORE' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic bmFtYW5fZG9jOmEzY' \
-H 'Cookie: _cfuvid=nAfguio5PXQ6zxSX8B_GPBt_GJsUWoHZKt0fFxRpkvE-1773126986434-0.0.1.1-604800000' \
-d '[
    {
        "profiles": [
            {
                "firstName": "Rajesh",
                "lastName": "Sharma",
                "source": "INSTORE",
                "identifiers": [
                    {
                        "type": "mobile",
                        "value": "919998872122"
                    }
                ]
            }
        ],
        "loyaltyInfo": {
            "loyaltyType": "loyalty"
        },
        "associationDetails": {
            "hierarchyCode": "SIL0101",
            "roleCode": "CEO",
            "fleetCompany": {
                "name": "C Company",
                "hierarchyDefinitionCode": "SIL0101",
                "externalId": "dc_123"
            }
        }
    },
    {
        "profiles": [
            {
                "firstName": "Priya",
                "lastName": "Verma",
                "source": "INSTORE",
                "identifiers": [
                    {
                        "type": "mobile",
                        "value": "919998872123"
                    }
                ]
            }
        ],
        "loyaltyInfo": {
            "loyaltyType": "loyalty"
        },
        "associationDetails": {
            "hierarchyCode": "SIL0101",
            "roleCode": "Zonal_Manager",
            "fleetCompany": {
                "name": "C Company",
                "hierarchyDefinitionCode": "SIL0101",
                "externalId": "dc_123"
            }
        }
    },
    {
        "profiles": [
            {
                "firstName": "Amit",
                "lastName": "Patel",
                "source": "INSTORE",
                "identifiers": [
                    {
                        "type": "mobile",
                        "value": "919998872124"
                    }
                ]
            }
        ],
        "loyaltyInfo": {
            "loyaltyType": "loyalty"
        },
        "associationDetails": {
            "hierarchyCode": "SIL0101",
            "roleCode": "City_Manager",
            "fleetCompany": {
                "name": "C Company",
                "hierarchyDefinitionCode": "SIL0101",
                "externalId": "dc_123"
            }
        }
    },
    {
        "profiles": [
            {
                "firstName": "Sunita",
                "lastName": "Reddy",
                "source": "INSTORE",
                "identifiers": [
                    {
                        "type": "mobile",
                        "value": "919998872125"
                    }
                ]
            }
        ],
        "loyaltyInfo": {
            "loyaltyType": "loyalty"
        },
        "associationDetails": {
            "hierarchyCode": "SIL0101",
            "roleCode": "Associate",
            "fleetCompany": {
                "name": "C Company",
                "hierarchyDefinitionCode": "SIL0101",
                "externalId": "dc_123"
            }
        }
    },
    {
        "profiles": [
            {
                "firstName": "Vikram",
                "lastName": "Singh",
                "source": "INSTORE",
                "identifiers": [
                    {
                        "type": "mobile",
                        "value": "919998872126"
                    }
                ]
            }
        ],
        "loyaltyInfo": {
            "loyaltyType": "loyalty"
        },
        "associationDetails": {
            "hierarchyCode": "SIL0101",
            "roleCode": "Drivers",
            "fleetCompany": {
                "name": "C Company",
                "hierarchyDefinitionCode": "SIL0101",
                "externalId": "dc_123"
            }
        }
    }
]'

Request Body Parameters

ParameterTypeDescription
loyaltyTypeenumLoyalty status of the customer.
profilesobjMeta information of the customer.
identifiersobjIdentifiers of the customer in type and value.
typeenumType of the customer identifier. .
valuestringValue of the specified identifier.
seriesIdintCard series ID (for card series generated in Capillary). .
seriesCodestringUnique card series code (for external card series).
statusLabelstringUser defined card status.
lastViewedDateDateDate when the customer recently opened the app.
hierarchyCodestringUnique code of the hierarchy to associate with the customer/company. All configurations set for the hierarchy will be applicable to the customer/company.
roleCodestringPre defined role code - Role of the customer in the hierarchy.
parentCustomerobjUser profile of the parent customer.
fleetCompanyobjDetails of the company the customer is associated with.
childCustomersobjProfiles of the child customers.
externalIdstringExternal ID of the company.
profilesobjDetails of the customer to associate.
FirstnamestringFirst name of the customer.
LastnamestringLast name of the customer.
identifiersobjIdentifiers of the customer in type and value.
typeenumType of the customer identifier.
valuestringValue of the specified identifier.
commChannelsobjAvailable communication channels of the customer.
createDatedate-timeTime and date of registration in YYYY-MM-DDTHH:MM:SS+HH:MM format.
associatedWithstringThe TILL code associated with the customer registration.
extendedFieldsobjCustomer level extended field details of the customer in key:value pairs.
fieldsobjCustom field details of customers in key-value pairs.

Response parameter

ParameterDescription
idUnique ID of the entity.
profilesArray of profiles associated with the entity.
firstNameFirst name of the profile.
lastNameLast name of the profile.
attributionInformation about the profile's creation and modification.
fieldsAdditional fields associated with the profile.
identifiersArray of identifiers associated with the profile.
commChannelsCommunication channels (like email, mobile) associated with the profile.
sourceSource of the profile.
userIdUser ID associated with the profile.
accountIdAccount ID associated with the profile.
conflictingProfileListList of profiles that have conflicts.
autoUpdateTimeTime of automatic update of the profile.
loyaltyInfoLoyalty information associated with the entity.
segmentsSegments associated with the entity.
referralCodeReferral code for the entity.
associationDetailsDetails about the association of the entity.
extendedFieldsExtended fields associated with the entity.
warningsArray of warnings related to the entity.
childEntitiesArray of child entities associated with the main entity.
childCountTotal count of child entities.
childFailureCountCount of child entities that failed.
childSuccessCountCount of child entities that succeeded.
Body Params
loyaltyInfo
object
profiles
object

Meta information of the customer.

json
Headers
string
Responses

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