Add Customer API

The Add Customer API will help you in creating/adding customer in the Kapture Database.

Add Customer.

POST https://<sub domain>.kapturecrm.com/ms/customer/customer/api/v1/add-update

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 added. Here are the list of parameters. Note:- Combination of name and phone or name and email is required to push customer data.

{
    "customer_info": {
        "customer_name": "ABC",
        "phone": "9380491387",
        "email_id": "",
        "locality": "",
        "city": "",
        "state": "",
        "country": "India",
        "address": "jalsa",
        "type": "",
        "classification": "",
        "pincode": "",
        "customer_code": "",
        "customer_id": "",
        "customer_assign_emp_name": "",
        "customer_assign_emp_code": "",
        "customer_assign_emp_email": "",
        "zone": "",
        "customer_remarks": "",
        "individual": false,
        "organization": true,
        "channel_partner": false,
        "remarks": "testing",
        "primary_source": "",
        "secondary_source": "",
        "tertiary_source": "",
        "additional_fields": {},
        "associate_fields": {},
        "update": false
    },
    "contact_info": [
        {
            "contact_id": "",
            "title": "no",
            "first_name": "Sashankk",
            "last_name": "Goenkaaa",
            "contact_person_name": "",
            "country_code": "",
            "contact_person_phone": "9380491387",
            "contact_person_email": "",
            "additional_contact_phone": "",
            "dob": "",
            "gender": "Male",
            "update": false,
            "matchEmailPhone": false
        }
    ],
    "enquiry_info": {
        "enquiry_id": "",
        "assign_emp_name": "",
        "assign_emp_code": "",
        "assign_emp_email": "",
        "round_robin_key": "",
        "next_follow_up_date": "",
        "action": "",
        "subStatus": "",
        "additional_fields": {},
        "associate_fields": {},
        "update": false,
        "remarks": "testing"
    }
}

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 created customer. If successful, the response will include the customer ID and the other relevant information.

{
    "status": "success",
    "customer": {
        "result": true,
        "customer_id": 191690263,
        "action": "CUSTOMER",
        "action_event": "ADD_CUSTOMER",
        "contact_id": 210004093
    },
    "message": "Customer Added successfully !Contact Added successfully !"
}

Error Codes

Example of a working curl

curl --location 'https://devapi.kapturecrm.com/ms/customer/customer/api/v1/add-update' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <Your Token>' \
--header 'Cookie: JSESSIONID=; _KAPTURECRM_SESSION=' \
--data '{
    "customer_info": {
        "customer_name": "ABC",
        "phone": "9380491357",
        "email_id": "",
        "locality": "",
        "city": "",
        "state": "",
        "country": "India",
        "address": "jalsa",
        "type": "",
        "classification": "",
        "pincode": "",
        "customer_code": "",
        "customer_id": "",
        "customer_assign_emp_name": "",
        "customer_assign_emp_code": "",
        "customer_assign_emp_email": "",
        "zone": "",
        "customer_remarks": "",
        "individual": false,
        "organization": true,
        "channel_partner": false,
        "remarks": "testing",
        "primary_source": "",
        "secondary_source": "",
        "tertiary_source": "",
        "additional_fields": {},
        "associate_fields": {},
        "update": false
    },
    "contact_info": [
        {
            "contact_id": "",
            "title": "no",
            "first_name": "",
            "last_name": "",
            "contact_person_name": "",
            "country_code": "",
            "contact_person_phone": "9380491357",
            "contact_person_email": "",
            "additional_contact_phone": "",
            "dob": "",
            "gender": "Male",
            "update": false,
            "matchEmailPhone": false
        }
    ],
    "enquiry_info": {
        "enquiry_id": "",
        "assign_emp_name": "",
        "assign_emp_code": "",
        "assign_emp_email": "",
        "round_robin_key": "",
        "next_follow_up_date": "",
        "action": "",
        "subStatus": "",
        "additional_fields": {},
        "associate_fields": {},
        "update": false,
        "remarks": "testing"
    }
}'

Last updated