INTRODUCTION
Kapture CRM APIs facilitate integration with other Kapture applications and third-party tools by adhering to RESTful principles. These APIs allow you to programmatically fetch and edit data in the different modules, such as Customer, Ticket, Order, Enquiry, Product, FAQ, and so on in Kapture CRM.
GETTING STARTED
The Kapture CRM allows you to access and build your applications or integrations that interact with Kapture CRM. All the APIs follow HTTP rules. The Kapture CRM provides a RESTful interface with JSON-formatted responses to access most Kapture CRM resources. To keep yourself updated about the changes in our APIs, follow the Kapture CRM APIs.
CONCEPTS
Kapture CRM APIs facilitate integration with other Kapture applications and third-party tools by adhering to RESTful principles. These APIs allow you to programmatically fetch and edit data in the different modules, such as Customer, Ticket, Order, Enquiry, Product, FAQ, and so on in Kapture CRM.
WHAT IS AN API?
- API stands for Application Programming Interface. It allows communications and data exchange between two separate software systems or web applications.
- It is a mediator that delivers a client’s request to the server and then returns a response to the client.
WHAT IS AN API REQUEST?
- An API request enables you to fetch data from a data source or to send data.
- Every API request uses an HTTP method.
There are a number of components of an API Request for it to function. Let’s dig into them individually and see how they can be used to build a request.
HTTP POST METHOD
1. We use the POST Method call type.
2. POST method is used to send data to a server to create/update a resource or submit an entity to the resource.
Note: We do not use other HTTP call types namely GET, PUT, PATCH, DELETE.
Fig 1: Syntax of Http Method

CONTENT TYPE
- Content-type serves the same purpose as filename extensions traditionally do on Windows.
- We use application/JSON as the Content-Type.
Here is the screenshot for your reference:
Fig 2: Content Type

Application/json:
- Type name: application
- Subtype name: json
- Required parameters: n/a
- Optional parameters: n/a
JSON:
- JSON is used to send some data from the server to the client, so it can be displayed on a web page, or vice versa.
- It is used to exchange data between applications written in all of these programming languages:
Fig 3: Different Languages

AUTHENTICATION KEY (AUTH KEY)
We use HTTP Basic Authentication which is one of the easiest methods to implement in an API. The authentication key has the prefix- Basic. Authentication to the API is performed using HTTP Basic Auth.
- Content-type serves the same purpose as filename extensions traditionally do on Windows.
- We use application/JSON as the Content-Type.
This method incorporates an Authorization Header into each request and passes a username and password to the authenticating system to prove the user is who they say they are.
Fig 4: AUTH KEY

POINTS TO REMEMBER:
Fig 5: Points to remember

BASIC AUTHENTICATION:
Basic authentication is built into the HTTPS protocol.
- The client sends HTTPS requests with the Authorization header:
Fig 6: Syntax of Basic authentication

- For example, to authorize as kapdemo / kap123 the client will need an Auth Key as shown below:
Fig 7: Auth Key example

API ENDPOINTS
As the name suggests API endpoint is one end of a communication channel or the location from which APIs can access the resources.
- To be more specific, when an API interacts with another system, the touchpoints of this communication are called endpoints.
- An endpoint can comprise a URL of a server.
- Each touchpoint in API communication has to be intact to the success of each API.
An API can work using ‘requests’ and ‘responses’. When an API sends a request to fetch some information from a web server or web application then it receives a response.
Fig 8: API endpoint

Fig 9: POST METHOD

PARAMETERS
Parameters are options that can be passed with the endpoints.
We make use of:
- Header parameters
- Body Parameters/Request Body
HEADER PARAMETERS
come under the request header.
Header includes:
- Authorization parameters ( common across all endpoints).
Authorization parameters include Content-type and Authorization.
Fig 10: Header

BODY PARAMETER/REQUEST BODY
Here we use the POST requests, wherein a JSON object is submitted in the request body. The request body is also called a body parameter.
- We are using only one body parameter to make the request.
- You can include a JSON object with many key-value pairs, look at the below example:
Fig 11: Sample Request Body

paths:
/users:
post:
Summary: Pushes Customer details
consumes:
- application/json
parameters:
- in: body
userName
name
type: string
email
type: string
city
type: string
responses:
"status": "success":
description: Customer data pushed successfully
Attributes used:
Table 1: Parameters Explanation
ATTRIBUTE | TYPE | DESCRIPTION |
name | string | priya |
string | priya456@gmail.com | |
city | string | Bangalore |
LIST OF THE POINTS TO REMEMBER WHILE TESTING AN API IN KAPTURE CRM
SUMMARY OF DETAILS REQUIRED TO TEST AN API:
Fig 12: Summary

Note: Authorization or the Auth key will be generated that confirms the authenticity of the person/agent using that API which means an Auth Key is always required when a client wants to check its customers.
SOME OF THE IMPORTANT PARAMETERS TO REMEMBER:
Table 2: Important Parameters Explanation
SL.NO | ATTRIBUTE | TYPE | DESCRIPTION |
1 | Customer Code | Integer | Manually entered unique code for the customers. |
2 | Customer Assign Emp Id | Integer | It is a unique id of the agent. |
3 | Kapture Customer Id | Integer | It is a unique id generated by the server for every customer added and stored in the Kapture database. |
4 | Customer Assign Emp Name | Varchar | Customer Assign Emp Name: Name of the agent to whom the customer is assigned. |
5 | Customer Assign Emp Email | Varchar | Customer Assign Emp Email: Email of the agent to whom the customer is assigned. |
SOME OF THE HTTP STATUS CODES RESPONSES:
Table 3: HTTP Codes Explanation
SL.NO | CODE | DESCRIPTION |
1 | 400 | “Failed” or “Bad Request” is returned when the request was unacceptable, often due to missing a required parameter. |
2 | 401 | Unauthorized Or “Invalid Auth Key” response is returned for requests with missing or incorrect Auth Key. |
3 | 404 | Not Found. |
4 | 500 | Internal Server Error. |
ADD CUSTOMER API
OBJECTIVE OF ADD CUSTOMER API
The Add Customer API is used to store customer’s details in the Kapture CRM database. This API helps Kapture to keep track of customer’s requirements. There are certain required fields neglecting to add those would prompt a "failure" response that implies, customer’s information would not be added successfully in the database.
Summary of the steps to be followed to integrate this API:
Fig 1: Summary of the steps

SAMPLE REQUEST
{
"customer_name" : "Qwera",
"phone" : "9874563725",
"email_id" : "Qwer1234@gmail.com",
"country" : "India",
"state" : "Karnataka",
"city" : "Bangalore",
"zone" : "",
"campaign_name" : "",
"secSource" : "",
"tertSource" : "",
"customer_assign_emp_code" : "",
"customer_assign_emp_name" : "",
"customer_assign_emp_email" : "",
"kapture_customer_id" : "",
"contact_id" : "",
"contact_person_name" : "Aadii",
"contact_person_phone" : "8978783457",
"contact_person_email" : "Aadi4568@gmail.com",
"additional_contact_phone" : "",
"country_code" : "+91",
"gender" : "M"
}
REQUEST BODY PARAMETERS EXPLANATION
Table 1: Request Body Parameters
SL.NO | ATTRIBUTE | TYPE | DESCRIPTION |
1 | Customer_name | Varchar (mandatory) | Name of the client. |
2 | Phone | Integer (mandatory) | Contact number of the client. |
3 | Email_id | Varchar (mandatory) | Email id of the client. |
4 | Country | String (optional) | Country of the client. |
5 | State | String (optional) | State of the client. |
6 | City | String (optional) | City of the client. |
7 | Zone | String (optional) | Zone of the client. Ex: North, South, East, West etc. |
8 | campaign_name | String (optional) | The primary point of contact of the customer. |
9 | secSource | String (optional) | The secondary point of contact of the customer. |
10 | tertSource | String (optional) | The tertiary point of contact of the customer. |
11 | customer_assign_emp_code | Integer (optional) | Code of the employee to which the customer is mapped. |
12 | customer_assign_emp_name | String (mandatory) | Name of the employee to which the customer is mapped. |
13 | customer_assign_emp_email | String (mandatory) | Email of the employee to which the customer is mapped. |
14 | kapture_customer_id | Integer (gets generated) | Unique customer Id generated after adding the customer. |
15 | contact_id | Integer (gets generated) | Unique contact Id generated after adding the customer. |
16 | contact_person_name | String (mandatory) | Name of the customer. |
17 | contact_person_phone | Integer (mandatory) | Contact number of the customer. |
18 | contact_person_email | String (optional) | Email id of the customer. |
19 | additional_contact_phone | Integer (optional) | Additional contact number of the customer. |
20 | country_code | Integer (mandatory) | The numeric geographical codes developed to represent countries. Example +91 for India. |
21 | gender | Char (mandatory) | Socially constructed characteristics, M or F. |
API RESPONSE
Response is generated as shown in the screenshot given below.
{
"Enquiry": {
"cmId": 2469,
"enquiry_id": 0,
"customer_name": "Qwera",
"customer_assign_emp_name": "",
"customer_assign_emp_code": "",
"customer_assign_emp_email": "",
"phone": "9874563725",
"email_id": "Qwer1234@gmail.com",
"city": "Bangalore",
"state": "Karnataka",
"country": "India",
"kapture_customer_id": 65033646,
"zone": "",
"campaign_name": "",
"secSource": "",
"tertSource": "",
"disposition_id": 0,
"country_code": "+91",
"age": 0,
"kapture_profile_id": 0,
"contact_person_name": "Aadii",
"contact_person_phone": "8978783457",
"contact_person_email": "Aadi4568@gmail.com",
"additional_contact_phone": "",
"gender": "M",
"contact_id": 71186613,
"reference_id": 0,
"action_update": false,
"product_update": false,
"enquiry_details_update": false,
"individual": false,
"organization": false,
"channel_partner": false,
"orderId": 0,
"referral_id": 0,
"channel_partner_id": 0,
"order_detail_associate_object": false,
"customer_detail_associate_object": false,
"update_enquiry_for_existing_customer": false,
"new_contact_for_existing_customer": false,
"productList": []
},
"message": "validation successfull",
"status": "success"
}
RESPONSE PARAMETER EXPLANATION
Table 2: Response Parameters
SL.NO | ATTRIBUTE | TYPE | DESCRIPTION |
1 | cmId | Integer | A unique Client Creation Id. |
2 | Kapture Customer Id | Integer | It is a unique id generated by the server for every customer added and stored in the Kapture database. |
3 | contact_id | Integer | A unique id generated to contact the client. |
THE DATA IS ADDED UNDER “ALL CUSTOMER”
This screenshot shows the presence of the added data in Kapture's database. To find out the added details from Kapture’s database, follow the simple steps shown below with the help of a diagram.
Fig 2: Steps leading to All Customer

Customers can be searched using Kapture customer id, phone number or email.
In this case we have searched the customer using his kapture_customer_id.
Fig 3: Customer Details

FAILURE RESPONSES
Table 3: Failure Responses
SL.NO | CONDITION | RESPONSE | ERROR CODE |
1 | When there is Invalid Auth Key. | "message": "Invalid Auth Key", "status": "failed" |
401 |
2 | When Phone Number or Email-id is missing. | "message": "Name and (Phone Number or Email Id) are required fields", "status": "failed" |
400 |
3 | When Wrong Email-id is entered. | "message": "Invalid email id.", "status": "failed" |
400 |
4 | When the phone number is wrong. | "message": "Invalid phone number,
number must contain 10 digits and must start from 6 or above", "status": "failed" |
400 |
5 | When the phone number is duplicated. | "message": "This mobile number already exists. Please enter a new one.", "status": "failed" |
400 |
6 | When a duplicate email is entered. | "message": "This email-id
already exists. Please enter a new one.", "status": "failed" |
400 |
7 | If email and phone both are duplicate. | "message":" ,Both email and mobile number already exist. Please enter new details.", "status": "failed" |
400 |
CUSTOMER PULL API
OBJECTIVE OF CUSTOMER PULL API
Customer Pull API is to fetch a list of customers or customer details from the Kapture database to the customer database. This API facilitates Kapture to keep track of customer’s details and access it whenever needed. There are certain required fields neglecting to add those would prompt a "failure" response that implies, customer’s information would not be fetched successfully from the database.
Summary of the steps to be followed to integrate this API:
Fig 1: Summary of the steps

SAMPLE REQUEST
[{
"start_date" : "2021-03-14",
"end_date" : "2021-03-14"
}]
BODY PARAMETERS EXPLANATION
Table 1: Request Body Parameters
SL.NO | ATTRIBUTE | TYPE | DESCRIPTION |
1 | start_date | Integer (mandatory) | The date from which customers data is required. It follows this format- YYYY-MM-DD hh:mm:ss. |
2 | end_date | Integer (mandatory) | The last date upto which data will be collected. It follows this format- YYYY-MM-DD hh:mm:ss. |
API RESPONSE
Response is generated as given below.
{
"message": [
{
"id": 65245,
"cmId": 2469,
"isOrganization": false,
"name": "Ker",
"city": "",
"country": "",
"currentStatus": "F",
"generationDate": "Mar 14, 2021 2:21:11 PM",
"creatorId": 941,
"creatorName": "Ri",
"channelPartnerId": 0,
"remarks": "
NAME Ker
PHONE 06-3582
EMAIL ker@ .in
MESSAGE Hello there\r\n\r\nBuy face mask to protect your loved ones from the deadly CoronaVirus. We wholesale N95 Masks and Surgical Masks for both adult and kids. The prices begin at $0.19 each. If interested, please visit our site: pharmacyoutlets.online\r\n\r\nRegards,\r\n\r\nKapture CRM Demo Form
PRIMARY_SOURCE Website
",
"ratePlanId": 0,
"customerCode": "",
"cityPotential": "false",
"isChannelPartner": false,
"pinCode": "",
"locality": "",
"campaignId": 127,
"campaignItemId": 0,
"campaignActivityId": 0,
"totalNoOfEnquiries": 1,
"feedbackOnCustomer": "0",
"contacts": [
{
"id": 71478,
"cmId": 2469,
"leadId": 65245,
"contactPerson": "Ker",
"gender": " ",
"phone": "63582",
"email": "ker@ .in",
"isPrimaryContact": true,
"isActive": false,
"generationDate": {
"year": 2021,
"month": 2,
"dayOfMonth": 14,
"hourOfDay": 14,
"minute": 21,
"second": 11
},
"parentContactId": 0,
"subOfficeId": 0,
"creatorId": 94170,
"age": 0,
"maritalStatus": " ",
"isGuest": false,
"companyName": "",
"enquiryId": 0,
"orderId": 0,
"isMergeEnable": false,
"isMobileMasked": false,
"isEmailMasked": false
}
],
"lastModificationTime": {
"year": 2021,
"month": 2,
"dayOfMonth": 14,
"hourOfDay": 14,
"minute": 21,
"second": 11
},
"imageReferenceId": "CUS_2021-03-14 14:21:10.866",
"customerType": "",
"customerLevel": 0,
"zone": 49827,
"companyParentId": 0,
"assignedToId": 941,
"assignedToName": "Rii",
"customerSubType": "",
"maxCreditAmt": 0,
"maxCreditPeriod": 0,
"historyEmpId": 0,
"channelPartnerEmpId": 0,
"deleted": false,
"companyStatus": "A",
"isExistingCustomer": false,
"isExistingContact": false,
"syncStatus": false,
"syncdLocationId": "",
"crossRemarks": "",
"syncedStepNumber": 0,
"outStandingAmount": 0,
"salesAdminZone": 0,
"referralId": 0,
"isApi": false
}
],
"status": "success"
}
RESPONSE PARAMETER EXPLANATION
Table 2: Response Parameters
SL.NO | ATTRIBUTE | TYPE | DESCRIPTION |
1 | id/leadId | Integer | Unique Id of the customer. |
2 | cmId | Integer | Unique Client Creation id. |
3 | generationDate | Integer | Date on which data is being fetched. It follows this format- YYYY-MM-DD hh:mm:ss. |
4 | creatorId | Integer | Id of the employee who created it. |
5 | campaignId | Integer | Primary source management Id. |
6 | contactPerson / name | String | Name of the person who is the point of contact of the client. |
7 | phone | Integer | Contact number of the customer. |
8 | String | Email of customer. | |
9 | Primary_source | String | First point of contact from where customer has reached out the organization/client (example:website) |
10 | assignedToName | String | Name of the agent to which particular customer is assigned. |
11 | assignedToId | String | Id of the agent to which particular customer is assigned. |
12 | totalNoOfEnquiries | Integer | The number of enquiries the customer had. |
13 | isExistingCustomer | String | If the customer is already stored in the database. |
14 | isExistingContact | String | If the customer’s contact is already stored in the database. |
FAILURE RESPONSES
Table 3: Failure Responses
SL.NO | CONDITION | RESPONSE | ERROR CODE |
1 | When there is Invalid Auth Key. | "message": "Invalid Auth Key", "status": "failed" |
401 |
2 | When dates are not added or invalid dates are added. | "message": "No customer between dates.", "status": "failed" |
- |
GET CUSTOMER API
OBJECTIVE OF GET CUSTOMER API
Get Customer API is used to retrieve a list of customers or customer details. If you are making use of a non-unique field such as customer name then you can expect multiple responses.
If you want to retrieve information about a specific customer, you should use the customer ID.
If you do not have the customer ID stored, you can also look up customers based on the Customer Code.
Summary of the steps to be followed to integrate this API:
Fig 1: Summary of the steps

SAMPLE REQUEST
[{
"kapture_customer_id" : "61371820",
"customer_id" : "",
"email_id" : "nisch123@gmail.com",
"phone" : "9845765226"
}]
REQUEST BODY PARAMETERS
Table 1: Request Body Parameters
SL.NO | ATTRIBUTE | TYPE | DESCRIPTION |
1 | Kapture Customer Id | Integer (mandatory) | It is a unique id generated for the customer by the server and stored in the Kapture database. |
2 | customer_id | Integer (mandatory) | It is a unique id generated for the customer by the server and stored in the Kapture database. |
3 | email_id | Varchar | Email id of the customer. |
4 | phone | Integer | Contact number of the customer. |
API RESPONSE
Response is generated as given below.
{
"Customer Details": {
"id": 61371820,
"cmId": 2469,
"isOrganization": false,
"name": "Nishchal",
"companyPhone": "9845765226",
"website": "",
"address": "",
"state": "Karnataka",
"city": "",
"country": "India",
"latitude": "",
"longitude": "",
"currentStatus": "N",
"generationDate": "Jan 6, 2021 6:01:45 PM",
"creatorId": 0,
"creatorName": "",
"channelPartnerId": 0,
"remarks": "",
"ratePlanId": 0,
"customerCode": "",
"isChannelPartner": false,
"pinCode": "",
"locality": "",
"campaignId": 0,
"campaignItemId": 0,
"campaignActivityId": 0,
"totalNoOfEnquiries": 1,
"contacts": [
{
"id": 66531398,
"cmId": 2469,
"leadId": 61371820,
"title": "",
"contactPerson": "",
"designation": "",
"gender": "F",
"phone": "",
"additionalPhone": "",
"email": "",
"additionalEmail": "",
"landline": "",
"isPrimaryContact": true,
"isActive": false,
"generationDate": {
"year": 2021,
"month": 0,
"dayOfMonth": 6,
"hourOfDay": 18,
"minute": 1,
"second": 45
},
"designationType": "",
"division": "",
"parentContactId": 0,
"subOfficeId": 0,
"creatorId": 0,
"age": 0,
"maritalStatus": " ",
"isGuest": false,
"phoneCountryCode": "",
"companyName": "Nishchal",
"enquiryId": 0,
"isMergeEnable": false
}
],
"imageReferenceId": "CUS_2021-01-06 18:01:45.439",
"classification": "",
"customerType": "",
"customerLevel": 0,
"zone": 0,
"companyParentId": 0,
"assignedToId": 0,
"assignedToName": "",
"customerSubType": "",
"attr1": "",
"attr2": "",
"attr3": "",
"attr4": "",
"attr5": "",
"attr6": "",
"attr7": "",
"attr8": "",
"attr9": "",
"attr10": "",
"attr11": "",
"attr12": "",
"attr13": "",
"attr14": "",
"attr15": "",
"maxCreditAmt": 0.0,
"maxCreditPeriod": 0,
"historyEmpId": 0,
"channelPartnerEmpId": 0,
"deleted": false,
"companyStatus": "A",
"isExistingCustomer": false,
"isExistingContact": false,
"syncStatus": false,
"syncdLocationId": "",
"crossRemarks": "",
"syncedStepNumber": 0,
"outStandingAmount": 0.0,
"salesAdminZone": 0,
"referralId": 0,
"isApi": false
},
"status": "success"
}
RESPONSE PARAMETERS EXPLANATION:
Table 2: Response Parameters
SL.NO | ATTRIBUTE | TYPE | DESCRIPTION |
1 | id/leadId | Integer | Unique Id of the customer. |
2 | cmId | Integer | Unique Client Creation id. |
3 | name | Varchar | Name of the customer. |
4 | generationDate | Integer | Date on which data is being fetched. It follows this format- YYYY-MM-DD hh:mm:ss. |
5 | companyPhone | Integer | Contact number of the customer. |
6 | totalNoOfEnquiries | Integer | The number of enquiries the customer had. |
THE CUSTOMER CAN BE FETCHED FROM “ALL CUSTOMER”
This screenshot shows the presence of the customer in Kapture's database. To find out the customer from Kapture’s database, follow the simple steps shown below with the help of a diagram.
Fig 2: Steps leading to All Customer

Customers can be searched using kapture_customer_id, phone number or email.
In this case we have searched the customer using his kapture_customer_id.
The customer is fetched and shown under All Customer.
Fig 3: Customer Details

FAILURE RESPONSES
Table 3: Failure Responses
SL.NO | CONDITION | RESPONSE | ERROR CODE |
1 | When there is Invalid Auth Key. | "message": "Invalid Auth Key", "status": "failed" |
401 |
2 | When wrong details are added. | "Customer Details": "Information given by you does not exist in our sytsem.", "status": "failed" |
- |
UPDATE CUSTOMER API
OBJECTIVE OF UPDATE CUSTOMER API
Update customer API is used to update existing customer details. You can update any of the fields listed under this API.
Summary of the steps to be followed to integrate this API:
Fig 1: Summary of the steps

SAMPLE REQUEST
Updating Phone number of the customer.
{
"customer_name" : "Qweraa",
"phone" : "",
"email_id" : "",
"kapture_customer_id" : "65033646"
}
REQUEST BODY PARAMETERS
Table 1: Request Body Parameters
SL.NO | ATTRIBUTE | TYPE | DESCRIPTION |
1 | Kapture Customer Id | Integer (mandatory) | It is a unique id generated for the customer by the server and stored in the Kapture database. |
2 | customer_name | Varchar | Name of the customer. |
3 | phone | Integer | Contact number of the customer. |
API RESPONSE
Response is generated as given below.
{
"Enquiry": {
"cmId": 2469,
"enquiry_id": 0,
"customer_name": "Qweraa",
"phone": "",
"email_id": "",
"kapture_customer_id": 65033646,
"disposition_id": 0,
"age": 0,
"kapture_profile_id": 0,
"contact_id": 0,
"reference_id": 0,
"action_update": false,
"product_update": false,
"enquiry_details_update": false,
"individual": false,
"organization": false,
"channel_partner": false,
"orderId": 0,
"referral_id": 0,
"channel_partner_id": 0,
"order_detail_associate_object": false,
"customer_detail_associate_object": false,
"update_enquiry_for_existing_customer": false,
"new_contact_for_existing_customer": false,
"productList": []
},
"message": "validation successfull",
"status": "success"
}
RESPONSE PARAMETERS EXPLANATION:
Table 2: Response Parameters
SL.NO | ATTRIBUTE | TYPE | DESCRIPTION |
1 | cmId | Integer | Unique Client Creation id. |
2 | cmId | Integer | Unique Client Creation id. |
3 | customer_name | Varchar | Name of the customer. |
4 | phone | Integer | Contact number of the customer. |
5 | kapture_customer_id | Integer | It is a unique id generated by the server and stored in the Kapture database. |
THE UPDATED CUSTOMER DETAILS CAN BE FOUND UNDER “ALL CUSTOMER”
This screenshot shows the presence of the updated customer details in Kapture's database. To find out the customer from Kapture’s database, follow the simple steps shown below with the help of a diagram.
Fig 2: Steps leading to All Customer

Customers can be searched using kapture_customer_id, phone number or email.
In this case we have searched the customer using his kapture_customer_id.
The client name has been changed from “Qwera” to “Qweraa”
Fig 3: Customer Details

FAILURE RESPONSES
Table 3: Failure Responses
SL.NO | CONDITION | RESPONSE | ERROR CODE |
1 | When there is Invalid Auth Key. | "message": "Invalid Auth Key", "status": "failed" |
401 |