---
title: Lead update
description: This API is used to update the lead details.
---

## POST

```
https://kraken.airpay.co.in/airpay/ms/leads/api/createlead
```

## Header

| Field | Type | Description |
| --- | --- | --- |
| content-type | String | application/json (required) |
| affiliate | Text | Will be provided by Airpay (required) |
| checksum | Text | $string = $param.self+ $header.code::$secret_key; sha256(<concate all values+SECRET KEY>); (required) |
| processor-key | Text | Will be provided by airpay ( required) |

## Parameter
| Field                     | Type    | Required | Description                                                                                                                                                                                                                     |
| ------------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| lead_id                   | Text    | Yes      | User ID of the merchant (length 3-70)                                                                                                                                                                                           |
| fname                     | Text    | Yes      | First Name (length 20)                                                                                                                                                                                                          |
| lname                     | Text    | Yes      | Last Name (length 20)                                                                                                                                                                                                           |
| email                     | Text    | Yes      | Email Address (length 25)                                                                                                                                                                                                       |
| phone                     | Numeric | Yes      | Mobile Number (length 10)                                                                                                                                                                                                       |
| company_name              | Text    | Yes      | Company Name (length 10)                                                                                                                                                                                                        |
| company_address           | Text    | No       | Company Address (length 30)                                                                                                                                                                                                     |
| merchant_legal_name       | Text    | Yes      | Legal Name of Merchant (length 20)                                                                                                                                                                                              |
| company_website           | Text    | Yes      | Company Website (length 30)                                                                                                                                                                                                     |
| company_cin               | Text    | No       | Company Identification Number (length 21)                                                                                                                                                                                       |
| company_annual_turnover   | Text    | Yes      | Annual Turnover of the Company (length 10). Valid options: 0 - 1L, 1L - 5L, 5L - 25L, 25L - 50L, 50L - 1Cr, Above 1Cr                                                                                                           |
| business_type             | Numeric | Yes      | Business Type (length 10). Valid options: 1 - Private Ltd Company, 2 - Partnership, 3 - Proprietorship, 4 - Clubs / Societies / Associations, 5 - Trusts, 6 - Others, 7 - Public Ltd Company, 8 - Limited Liability Partnership |
| business_category         | Numeric | Yes      | Business category ID (length 10)                                                                                                                                                                                                |
| business_pan              | Text    | Yes      | Business PAN number (length 10)                                                                                                                                                                                                 |
| business_gstin            | Text    | No       | Business GST number (length 15)                                                                                                                                                                                                 |
| business_address          | Text    | No       | Business address (length 30)                                                                                                                                                                                                    |
| business_city             | Text    | Yes      | City (length 20)                                                                                                                                                                                                                |
| business_pincode          | Text    | No       | Pincode (length 6)                                                                                                                                                                                                              |
| business_state            | Text    | Yes      | State (length 20)                                                                                                                                                                                                               |
| business_country          | Text    | Yes      | Country (length 20)                                                                                                                                                                                                             |
| bank_account_type         | Text    | Yes      | Bank account type (length 10). Valid values: C for Current, S for Savings                                                                                                                                                       |
| bank_account_holder_name  | Text    | Yes      | Bank account holder name (length 20)                                                                                                                                                                                            |
| bank_account_number       | Text    | Yes      | Bank account number (length 20)                                                                                                                                                                                                 |
| bank_ifsc_code            | Text    | Yes      | Bank IFSC code (length 11)                                                                                                                                                                                                      |
| signatory_name            | Text    | Yes      | Full name of the signatory (length 20)                                                                                                                                                                                          |
| signatory_email           | Text    | Yes      | Email address of the signatory (length 20)                                                                                                                                                                                      |
| signatory_phone           | Numeric | Yes      | Mobile number of the signatory (length 10)                                                                                                                                                                                      |
| signatory_address         | Text    | No       | Address of the signatory (length 25)                                                                                                                                                                                            |
| signatory_pep             | Text    | Yes      | Indicates if the signatory is politically exposed (length 10)                                                                                                                                                                   |
| signatory_dob             | Date    | Yes      | Date of birth of the signatory in d-m-Y format (length 10)                                                                                                                                                                      |
| signatory_pan             | Text    | Yes      | PAN number of the signatory (length 10)                                                                                                                                                                                         |
| signatory_primary_contact | Text    | Yes      | Primary contact of the signatory (length 10)                                                                                                                                                                                    |
| signatory_address_proof   | Text    | Yes      | Address proof ID of the signatory (length 10)                                                                                                                                                                                   |
| signatory_pdconsent       | Text    | Yes      | Consent for personal data storage by the signatory (length 10)                                                                                                                                                                  |
| signatory_gender          | Text    | No       | Gender of the signatory (length 10)                                                                                                                                                                                             |

## Request-Example ( before encryption): 

```
{
  "lead_id":"12345",

  "basic_info": {

    "fname": "John S",

    "lname": "Doe",

    "email":"johndoe1@example.com",

    "phone":"1234567890"

  },

  "company_info": {

    "company_name": "ABC Company pvt lmd",

    "company_address": "123 Main St, City",

    "merchant_legal_name": "ABC Legal Name",

    "company_website": "http://www.example.com",

    "company_cin": "U00000AB0000CDE123456",

    "company_annual_turnover": "0 - 1L"

  },

  "business_info": {

    "business_type": 3,

    "business_category": 118,

    "business_pan": "ABCDE1234F",

    "business_gstin": "12ABCDE1234F1Z5",

    "business_address": "Test Apartment",

    "business_city": "Kochi",

    "business_pincode": "123456",

    "business_state": "Kerala",

    "business_country": "India"

  },

  "bank_info": {

    "bank_account_type": "C",

    "bank_account_holder_name": "John S Doe",

    "bank_account_number": "1234567890",

    "bank_ifsc_code": "ABCD1234567"

  },

  "signatory_info": {

    "1": {

      "signatory_name": "Signatory one",

      "signatory_email": "signatoryone@example.com",

      "signatory_phone": "1234567890",

      "signatory_address": "123 Main St, City",

      "signatory_pep": "N",

      "signatory_dob": "01-01-1990",

      "signatory_pan": "ABCDE1234G",

      "signatory_primary_contact": "N",

      "signatory_address_proof" : "122",

      "signatory_pdconsent" : "N",

      "signatory_gender" : "F"
    },

    "2": {

      "signatory_name": "Signatory two",

      "signatory_email": "signatorytwo@example.com",

      "signatory_phone": "1234567890",

      "signatory_address": "Test Apartment",

      "signatory_pep": "N",

      "signatory_dob": "01-01-1990",

      "signatory_pan": "ABCDE1235G",

      "signatory_primary_contact": "Y",

      "signatory_address_proof" : "121",

      "signatory_pdconsent" : "N",

      "signatory_gender" : "m"

    },

    "3": {

      "signatory_name": "Signatory three",

      "signatory_email": "signatorythree@example.com",

      "signatory_phone": "1234567890",

      "signatory_address": "Test Apartment",

      "signatory_pep": "N",

      "signatory_dob": "11-01-1990",

      "signatory_pan": "ABCDE1236G",

      "signatory_primary_contact": "N",

      "signatory_address_proof" : "122",

      "signatory_pdconsent" : "Y",

      "signatory_gender" : "f"

    },

    "4": {

      "signatory_name": "Signatory four",

      "signatory_email": "signatoryfour@example.com",

      "signatory_phone": "1234567890",

      "signatory_address": "Test Apartment",

      "signatory_pep": "N",

      "signatory_dob": "01-01-1990",

      "signatory_pan": "ABCDE1230I",

      "signatory_primary_contact": "Y",

      "signatory_address_proof" : "124",

      "signatory_pdconsent" : "N",

      "signatory_gender" : "M"

    }
  }

}
```
## Request-Example (encrypted):
```
curl --location 'https://kraken.airpay.co.in/airpay/ms/leads/api/createlead' \
--header 'Content-Type: application/json' \
--header 'AFFILIATE: s5018c4e6770be10ceb89171fd8a1b00' \
--header 'CHECKSUM: eda5100cf07619128fc1d384fbb79dbc4fc1b262fd50d4371019c9e6d28294b6' \
--header 'AIRPAYKEY: xvIvkudaKczCf8sapHZv5iadqzPEB9dPRvtLr4idn4SzmMjfuWgVvSsXEn==' \
--data '{
    "query": "jdnk195gdbpj7u2on87NRgYJbXc+JAS0a9As7D2txQ8VaF08lVO+tPCD4y40sfrBus/yuiqi/LBGeMP6PrKGvY2Anli1wufGUl5m88AwH0kWmaTRE3WHmbDsVloDd9OxCLuvNwxPQHF+TzrA3CbCvEB6TJezdW7MwvteNnUBmKKZIGHkrKSpmaFEJJb7iXh1FIGUjlLz3PWxOPq7K8K7NJ4RA5bQiRCg35/YQWqSsVv9q3bUBVjjSl8ukGWOW9Gx0QQ+1WvaOLrf/I3NbnXKTT9dFIJD24JOc="
}'
```

## Success 200

| Field | Type | Description |
| --- | --- | --- |
| status | Numeric | 400- fail,200-success(length 3) |
| message | Text | success, fail |
| data | Text | Json response { "status": status code, "message": response message, "data":[ {"parameter":"array required data"}] } |

## Success-Response(encrypted):

```
{
    "query": "djhajaQ6zANkWYcPwLT7cvQFKI8oTLl87iEMwW33BjoBGTL3ThFcg8NHxe+h90jcI/KFoStiBD5TXocY9d/nbwGBDDBEi4J9Qjsyy9StVSyHB0+H8qOLp4LxPZtRxbw8MWOdVlCKWvCqUDeQamLvKurHFRZF7Fd5FLo+/7CgX7Kp/iRYFKh1JWn1QGmnUMH91exc="
}
```
## Success-Response(decrypted):
```
{
    "status": "200",
    "message": "Success",
    "data": {
        "message": "Lead updated successfully.",
        "lead_id": 12345
    }
}
```
## Error-Response(encrypted):


```
{
    "query": "iv8uib2fh5e3m6ncI7GQQ6zANkWYcPwLT7cvQFKI8oTLl87iEMwW33BjoBGTL3ThFcg8NHxe+h90jcI/KFoStiBD5TXocY9d/nbwGBDDBEi4J9Qjsyy9StVSyHB0+H8qOLp4LxPZtRxbw8MWOdVlCKWvCqUDeQamLvKurHFRZF7Fd5FLo+/7CgX7Kp/iRYFKh1JWn1QGmnUMH91exc="
}
```
## Error-Response(decrypted):
```
{
    "status": "400",
    "message": "Failed",
    "data": {
        "error": {
            "lead_id": "12345",
            "message": ""
        }
    }
}
```