Pull Customer API by Date Range

The Pull Customer API will help you in getting the list of existing customer in the Kapture Database for the given date range.

Pull Customer.

POST https://<sub domain>.kapturecrm.com/select-customer-between-start-and-end-dates.html

NOTE: Please replace with your sub domain name in the API.

Authentication:

To access this API endpoint, you need to include your API key in the request headers. For authentication, use the following header:

Basic <Your Token>

Request Body

The request body should be a JSON object containing the details of the customer to be fetched. Here are the list of parameters. Note: Either of kapture_customer_id,email_id or phone is mandatory to fetch data.

{
    "cm_id": 1000298,
    "isAllCustomerPage": false, //Accepts boolean value [true/false], get configuration 
  and search based on all customer page search criteria         
     	   	"name": "",
    "phone": "",
    "email": "",
    "designationType": "",
    "customer_id": "",
    "customerCode": "",
    "zoneIdStr": "",
    "zone_id": 0, //When zoneIdStr value is empty, this will be 
    checked
 	"assignedToId": 0,
    "assignedToIdStr": "", //When assignedToId value is empty, this will be 
    checked
 	"isOrganisation": true, //Accepts boolean value [true/false]
    "isIndividual": "true", //Accepts boolean value [true/false], condition is 
     checked only when isOrganisation value is false
 	"isChannelPartner": "", //Accepts boolean value [true/false], condition is 
    checked only when isIndividual value is false
      		"createStartDate": "2024-05-01", //Date format - [yyyy-mm-dd]
    "createEndDate": "2024-05-02", //Date format - [yyyy-mm-dd]
    "primarySourceId": 0,
    "secondarySourceId": 0,
    "tertiarySourceId": 0,
    "attr1": "",
    "attr2": "",
    "attr3": "",
    "attr4": "",
    "attr5": "",
    "attr6": "",
    "attr7": "",
    "attr8": "",
    "attr9": "",
    "attr10": "",
    "attr11": "",
    "attr12": "",
    "attr13": "",
    "attr14": "",
    "attr15": "",
    "limit": "", //Default limit is 100 to display records
    "offset": "" // To skip a certain number of rows in the result set of a query
}

Please map in the request body if there's any extra associate body according to your use case.

Response Body

The API responds with a JSON object containing the details of the updated customer. If successful, the response will include the customer ID and the other relevant information.

{
    "message": [
        {
            "id": 191121684,
            "cmId": 1000298,
            "isOrganization": true,
            "name": "Sashank",
            "website": "",
            "address": " ",
            "state": "",
            "city": "",
            "country": "",
            "latitude": "",
            "longitude": "",
            "currentStatus": "N",
            "generationDate": "May 2, 2024 4:15:42 PM",
            "creatorId": 0,
            "channelPartnerId": 0,
            "remarks": "",
            "ratePlanId": 0,
            "customerCode": "",
            "isChannelPartner": false,
            "pinCode": "",
            "campaignId": 0,
            "campaignItemId": 0,
            "campaignActivityId": 0,
            "totalNoOfEnquiries": 1,
            "feedbackOnCustomer": "0",
            "contacts": [
                {
                    "id": 209432475,
                    "cmId": 1000298,
                    "leadId": 191121684,
                    "contactPerson": "Sashank",
                    "gender": " ",
                    "phone": "9380491326",
                    "additionalPhone": "",
                    "email": "sashank@gmail.com",
                    "isPrimaryContact": true,
                    "isActive": true,
                    "generationDate": {
                        "year": 2024,
                        "month": 4,
                        "dayOfMonth": 2,
                        "hourOfDay": 16,
                        "minute": 15,
                        "second": 42
                    },
                    "parentContactId": 0,
                    "subOfficeId": 0,
                    "creatorId": 0,
                    "age": 0,
                    "maritalStatus": " ",
                    "isGuest": false,
                    "phoneCountryCode": "",
                    "enquiryId": 0,
                    "orderId": 0,
                    "isMergeEnable": false,
                    "isMobileMasked": false,
                    "isEmailMasked": false,
                    "showBirthYear": false
                }
            ],
            "lastModificationTime": {
                "year": 2024,
                "month": 4,
                "dayOfMonth": 2,
                "hourOfDay": 16,
                "minute": 15,
                "second": 42
            },
            "imageReferenceId": "CUS_2024-05-02 16:15:42.249",
            "classification": "",
            "customerType": "",
            "customerLevel": 0,
            "zone": 0,
            "companyParentId": 0,
            "assignedToId": 0,
            "maxCreditAmt": 0.0,
            "maxCreditPeriod": 0,
            "historyEmpId": 0,
            "channelPartnerEmpId": 0,
            "deleted": false,
            "companyStatus": "A",
            "isExistingCustomer": false,
            "isExistingContact": false,
            "syncStatus": false,
            "syncdLocationId": "0",
            "crossRemarks": "",
            "syncedStepNumber": 0,
            "outStandingAmount": 0.0,
            "salesAdminZone": 0,
            "referralId": 0,
            "isApi": false
        },
        {
            "id": 191125635,
            "cmId": 1000298,
            "isOrganization": true,
            "name": "rahul",
            "website": "",
            "address": " ",
            "state": "",
            "city": "",
            "country": "",
            "latitude": "",
            "longitude": "",
            "currentStatus": "N",
            "generationDate": "May 2, 2024 4:38:14 PM",
            "creatorId": 0,
            "channelPartnerId": 0,
            "remarks": "",
            "ratePlanId": 0,
            "customerCode": "",
            "isChannelPartner": false,
            "pinCode": "",
            "campaignId": 0,
            "campaignItemId": 0,
            "campaignActivityId": 0,
            "totalNoOfEnquiries": 1,
            "feedbackOnCustomer": "0",
            "contacts": [
                {
                    "id": 209436434,
                    "cmId": 1000298,
                    "leadId": 191125635,
                    "contactPerson": "rahul",
                    "gender": " ",
                    "phone": "1234567890",
                    "additionalPhone": "",
                    "email": "xyz@gmail.com",
                    "isPrimaryContact": true,
                    "isActive": true,
                    "generationDate": {
                        "year": 2024,
                        "month": 4,
                        "dayOfMonth": 2,
                        "hourOfDay": 16,
                        "minute": 38,
                        "second": 14
                    },
                    "parentContactId": 0,
                    "subOfficeId": 0,
                    "creatorId": 0,
                    "age": 0,
                    "maritalStatus": " ",
                    "isGuest": false,
                    "phoneCountryCode": "",
                    "enquiryId": 0,
                    "orderId": 0,
                    "isMergeEnable": false,
                    "isMobileMasked": false,
                    "isEmailMasked": false,
                    "showBirthYear": false
                }
            ],
            "lastModificationTime": {
                "year": 2024,
                "month": 4,
                "dayOfMonth": 2,
                "hourOfDay": 16,
                "minute": 38,
                "second": 14
            },
            "imageReferenceId": "CUS_2024-05-02 16:38:14.026",
            "classification": "",
            "customerType": "",
            "customerLevel": 0,
            "zone": 0,
            "companyParentId": 0,
            "assignedToId": 0,
            "maxCreditAmt": 0.0,
            "maxCreditPeriod": 0,
            "historyEmpId": 0,
            "channelPartnerEmpId": 0,
            "deleted": false,
            "companyStatus": "A",
            "isExistingCustomer": false,
            "isExistingContact": false,
            "syncStatus": false,
            "syncdLocationId": "0",
            "crossRemarks": "",
            "syncedStepNumber": 0,
            "outStandingAmount": 0.0,
            "salesAdminZone": 0,
            "referralId": 0,
            "isApi": false
        }
    ],
    "status": "success"
}

Error Codes

Example of a working curl

curl --location 'https://devapi.kapturecrm.com/ms/customer-search/customer-search/api/v1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <Your Token>' \
--header 'Cookie: JSESSIONID=; _KAPTURECRM_SESSION=' \
--data '{
    "cm_id": ,
    "isAllCustomerPage": false, 
  and search based on all customer page search criteria         
     	   	"name": "",
    "phone": "",
    "email": "",
    "designationType": "",
    "customer_id": "",
    "customerCode": "",
    "zoneIdStr": "",
    "zone_id": 0, 
    checked
 	"assignedToId": 0,
    "assignedToIdStr": "", 
    checked
 	"isOrganisation": true, 
    "isIndividual": "true", 
     checked only when isOrganisation value is false
 	"isChannelPartner": "", 
    checked only when isIndividual value is false
      		"createStartDate": "2024-05-07", 
    "createEndDate": "2024-05-08", 
    "primarySourceId": 0,
    "secondarySourceId": 0,
    "tertiarySourceId": 0,
    "attr1": "",
    "attr2": "",
    "attr3": "",
    "attr4": "",
    "attr5": "",
    "attr6": "",
    "attr7": "",
    "attr8": "",
    "attr9": "",
    "attr10": "",
    "attr11": "",
    "attr12": "",
    "attr13": "",
    "attr14": "",
    "attr15": "",
    "limit": "", 
    "offset": "" 
}'

Last updated