Bulk Lead retrieval API

· 3 min read

API PREREQUISITES:

Your Teleduce account should be activated with Lead API mode

URLhttps://teleduce.corefactors.in/lead/retrieval/
HeaderAPI-KEY :<CUSTOMER API-KEY>
MethodGET
API Dataapplication /json (for POST)


OPTIONAL FILTER  PARAMETERS:

ParametersParameter ValueDescription
modified_at_rangetoday, this week, this month or start_date,end_date(YYYY-MM-DD,YYYY-MM-DD)We can get the data based on given Modified date
created_at_rangetoday, this week, this month or start_date,end_date(YYYY-MM-DD,YYYY-MM-DD)We can get the data based on given Created date

PAGINATION  PARAMETERS:

ParametersParameter ValueDescription
pageE.g: 1 or 2Lead data size
Note:
1.
Maximum data allowed in a single call is 100 Leads
2. If more than 100 leads are present, then to get them you can give subsequent requests with optional parameter “page” whose value should always be >= 1
3. To know if more leads are there or not , you can use the response data parameter “is_more_leads_available”  in Success Response. 
4. If is_more_leads_available = True you can give the next request to Lead API with below parameter values  
    page = current_page + 1 
record_size = current_record_size (if provided in previous request)
5. Default Values if not provided
page = 1
record_size = 100
6.If you want to customise the Number of Leads in a single request you can use optional parameter “record_size” whose value should always be between 1-100

record_sizeE.g : 50 or 100Lead data size
Note:
1.
Maximum data allowed in a single call is 100 Leads
2. If more than 100 leads are present, then to get them you can give subsequent requests with optional parameter “page” whose value should always be >= 1
3. To know if more leads are there or not , you can use the response data parameter “is_more_leads_available”  in Success Response. 
4. If is_more_leads_available = True you can give the next request to Lead API with below parameter values  
    page = current_page + 1 
record_size = current_record_size (if provided in previous request)
5. Default Values if not provided
page = 1
record_size = 100
6.If you want to customise the Number of Leads in a single request you can use optional parameter “record_size” whose value should always be between 1-100

PYTHON SAMPLE CODE:

import requests
import json

url           = “https://teleduce.corefactors.in/lead/retrieval/”  
header   = {
                      “API-KEY”:”xxxxxxxxxxxx”,
                     ‘Content-Type’: ‘application/json’
                  }
reqdata = requests.get(url, headers=header )
print (reqdata.content) 

SUCCESS RESPONSE FORMAT :

{
    “response_code”: “7000”,
    “is_more_leads_available”: true,
    “response”: [
        {
            “created_at”: “2019-06-18T12:28:22.364”,
            “Lead Revenue”: “0.00”,
            “Research”: “”,
            “Description”: “Crm Solution Providers//want to give the demo// he is resselling the software to the “,
            “Mobile”: “99142491xx”,
            “Leads Stages”: “Prospects”,
            “modified_at”: “2019-06-19T15:32:06.977”,
            “Requirement”: “”,
            “Lead Source”: “JustDial”,
            “Email”: “mpsb78@gmail.com”,
            “First Name”: “Maninder”,
            “Industry “: “Others”,
            “Lead Lost Reason”: “”,
            “Lead Owner”: “Akshay”,
            “ID”: “LD569615”,
            “PAN Number”: “”,
            “Lead Status”: “Open”,
            “Lead Group”: “lknn.m”,
            “Company Name”: “Corefactors”,
            “Lead type”: null
        }

ERROR RESPONSE FORMAT : 

    {

        “reponse” : “xxxxxxxxxx”,

        “response_code”: “xxxxx”,

         “response_type” : “error”,   

    }

API RESPONSE CODE and RESPONSES

S.NoCodeCode Description
17000 Succes
27001No Authentication Key
37002Invalid Authentication Key
47003Invalid Values for Page or Recordsize Parameter. Permitted range: > 1
57004Invalid Value for Recordsize Parameter. Permitted range: 1-100
67005Invalid Values for Page or Recordsize Parameter. Permitted Numericals in the range > 1
77006Invalid Value for created_at_range .Allowed format YYYY-MM-DD,YYYY-MM-DD
87007Invalid Value for modified_at_range .Allowed format YYYY-MM-DD,YYYY-MM-DD
97008No More Leads

————————————————————————————————————————————————-

For any support required on API. Please write to support@corefactors.in.