Update Customer API

The Update Customer API will help you in updating the existing customer details in the Kapture Database.

Update 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 updated. Here are the list of parameters.

NameMandatoryTypeDescription

customer_id

Yes

Number

The Id of the customer which is generated in Kapture Database

name

No

Text

Name of the customer

email

No

String

Email Address of the customer

phone

No

Number

Phone number of the customer

{
    "customer_info": {
        "customer_name": "ABC",
        "phone": "9380491257",
        "email_id": "",
        "locality": "",
        "city": "",
        "state": "",
        "country": "India",
        "address": "jalsa",
        "type": "",
        "classification": "",
        "pincode": "",
        "customer_code": "",
        "customer_id": "191690263",
        "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": "Salman",
            "last_name": "Khan",
            "contact_person_name": "",
            "country_code": "",
            "contact_person_phone": "9380491257",
            "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 updated customer. If successful, the response will include the customer ID and the other relevant information.

ResponseResponse Messages

{ ..., "status": "success"}

Customer data pushed successfully.

{"message": "Invalid Auth Key","status": "failed"}

Authorization key is either not passed in header, or incorrect, or expired/disabled

{"message": "Name, Email Id, and Phone Number required", "status": "failed"}

name and phone|email are either missing or empty in request body.

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

Error Codes

Error CodesDescription

400

Bad Request - Invalid parameters or missing data

401

Unauthorized - Invalid or missing API key

403

Forbidden - Insufficient permissions

404

Not Found - Resource or endpoint not found

500

Internal Server Error - Server-side issue

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": "9380491257",
        "email_id": "",
        "locality": "",
        "city": "",
        "state": "",
        "country": "India",
        "address": "jalsa",
        "type": "",
        "classification": "",
        "pincode": "",
        "customer_code": "",
        "customer_id": "191690263",
        "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": "Salman",
            "last_name": "Khan",
            "contact_person_name": "",
            "country_code": "",
            "contact_person_phone": "9380491257",
            "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