Kapture API
  • Welcome!
  • Reference
    • API Reference
      • Add Ticket API
      • Update Ticket API
      • Get Ticket API
      • Pull Ticket API by Date Range
      • Add Customer API
      • Update Customer API
      • Get Customer API
      • Pull Customer API by Date Range
      • Add Order API
      • Update Order API
      • Pull Order API
      • Get FAQ Content API
      • Get FAQ Category API
      • Search FAQ Content API
Powered by GitBook
On this page
  • Get Customer.
  • Authentication:
  • Request Body
  • Response Body
  • Error Codes
  • Example of a working curl

Was this helpful?

  1. Reference
  2. API Reference

Get Customer API

The Get Customer API will help you in getting the list of existing customer details in the Kapture Database.

PreviousUpdate Customer APINextPull Customer API by Date Range

Last updated 1 year ago

Was this helpful?

Get Customer.

POST

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.

Name
Mandatory
Type
Description

kapture_customer_id

Yes

Number

The Id of the customer which is generated in Kapture Database

email_id

No

String

Email Address of the customer

phone

No

Number

Phone number of the customer

[
    {
        "kapture_customer_id": "191121684",
        "email_id": "xyz@gmail.com",
        "phone": "1234567890"
    }
]

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.

Response
Response 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

{"Customer Details": "Information given by you does not exist in our sytsem.","status": "failed"}

Details provided doesn't match with records available in the system.

{
    "Customer Details": {
        "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
            }
        ],
        "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
    },
    "status": "success"
}

Error Codes

Error Codes
Description

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/search-customer-by-customer-id.html' \
--header 'Authorization: Basic <Your Token>' \
--header 'Content-Type: application/json' \
--header 'Cookie: JSESSIONID=; _KAPTURECRM_SESSION=' \
--data-raw '[
    {
        "kapture_customer_id": "191121684",
        "email_id": "xyz@gmail.com",
        "phone": "1234567890"
    }
]'
import requests
import json

url = "https://devapi.kapturecrm.com/search-customer-by-customer-id.html"

payload = json.dumps([
  {
    "kapture_customer_id": "191121684",
    "email_id": "xyz@gmail.com",
    "phone": "1234567890"
  }
])
headers = {
  'Authorization': 'Basic <Your Token>',
  'Content-Type': 'application/json',
  'Cookie': 'JSESSIONID=; _KAPTURECRM_SESSION='
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://devapi.kapturecrm.com/search-customer-by-customer-id.html',
  'headers': {
    'Authorization': 'Basic <Your Token>',
    'Content-Type': 'application/json',
    'Cookie': 'JSESSIONID=; _KAPTURECRM_SESSION='
  },
  body: JSON.stringify([
    {
      "kapture_customer_id": "191121684",
      "email_id": "xyz@gmail.com",
      "phone": "1234567890"
    }
  ])

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

https://devapi.kapturecrm.com/search-customer-by-customer-id.html