20. Leads
Interface
It allows you:
to view leads
to view an attachment from lead
to view list of attachments from lead
to add attachments to lead
to delete attachments from lead
Columns that can be used as filters:
Lead_ID
LeadName
DocumentNo
Active
Created
CreatedBy
Updated
UpdatedBy
TaxID
Email
Phone
Phone2
SalesVolumePrev
BPartner_ID
BPartnerName
BPartnerLocation_ID
BPartnerLocationName
BPartnerSR_ID
BPartnerSRName
Contact_ID
ContactName
SalesRep_ID
SalesRepName
City_ID
CityName
Region_ID
RegionName
Request_ID
DateNextAction
LastResult
Project_ID
Project
ProjectName
InterestArea_ID
InterestAreaName
LeadType_ID
LeadTypeName
CommRep_ID
CommRepName
Modified
ModifiedBy
Actions can be done:
List
API Method
List:
URL: https://api.socratecloud.com/webapi/rest/lead/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}
Method: GET
Return: JSON object with next format:
{
"data": [
{
"OrganizationName": "Demo SRL",
"Lead_ID": 1000263,
"LeadName": "Vanzare piesa tractor",
"DocumentNo": "1000000",
"IsActive": true,
"Created": "2020-03-10 10:51:24+0200",
"CreatedBy": "SuperUser",
"Updated": "2020-06-26 14:40:06+0300",
"UpdatedBy": "AdminTitular",
"TaxID": "3269578",
"Address_1": " BLD. PIPERA, ET.6",
"Address_2": null,
"LeadURL": null,
"Email": null,
"Phone": "0721test",
"Phone2": null,
"Title": null,
"LeadRating": "1",
"Summary": "Testare APILead",
"Help": null,
"Postal": null,
"Postal_Add": null,
"DUNS": null,
"Description": null,
"NAICS": null,
"NumberEmployees": null,
"Fax": null,
"SendNewEmail": false,
"SalesVolume": null,
"SalesVolumePrev": null,
"FiscalYear": null,
"FiscalYearPrev": null,
"CurrentSolution": null,
"DateCompletePlan": null,
"LeadSize": null,
"Processed": false,
"LeadType_ID": 1000058,
"LeadTypeName": "Inbound",
"LeadQualificationName": null,
"SalesRep_ID": 1001776,
"SalesRepName": "Test Ifrim",
"CommRep_ID": 0,
"CommRepName": null,
"LastOffer_ID": 1175061,
"LastOrder_ID": 0,
"OffersCounter": 1,
"OrdersCounter": 0,
"BPartner_ID": 1019063,
"BPartnerName": "Test SRL",
"BPartnerLocation_ID": 1018844,
"BPartnerLocationName": " BLD. PIPERA, ET.6",
"BPartnerSizeName": null,
"BPartnerGroupName": "Clienti",
"BPartnerStatusName": null,
"BPartnerSR_ID": 1001010,
"BPartnerSRName": "Test Ifrim",
"Contact_ID": 1015075,
"ContactName": "Test Marcel",
"City_ID": 2140913594,
"CityName": "VOLUNTARI",
"Region_ID": 2140900024,
"RegionName": "Ilfov",
"CountryName": "Romania",
"SourceName": "Phone",
"StatusName": "Contact nou",
"SalesRegionName": "R-Vnz-Demo-RO-NOD",
"CampaignName": "[Panasonic][P][Q2_2019][2000EUR][F64 0%]",
"Project_ID": 1011495,
"Project": "1003500",
"ProjectName": "Vanzare piesa tractor",
"Request_ID": 1007033,
"RequestAmt": 0,
"DateNextAction": "2020-06-30 14:45:00+0300",
"Priority": "7",
"LastResult": "Sesizare creată",
"InterestArea_ID": 0,
"InterestAreaName": null,
"JobName": null,
"GreetingName": "SC",
"IndustryCodeName": null,
"ProductFamilyName": null,
"PrimaryCompetitorName": null
}
],
"totalRows": 1
}
View attachment:
URL: https://api.socratecloud.com/webapi/rest/lead/attachment/{version}?LeadNo={LeadNo}&FileName={FileName}&accessToken={access_token}
Method: GET
Return: File or 204/"No Content" if no attachment found
Add attachment:
URL: https://api.socratecloud.com/webapi/rest/lead/attachment/add/{version}?LeadNo={LeadNo}&FileName={FileName}&accessToken={access_token}
Method: POST
Return 'Ok' for success or error message (start with "ERROR: ")
Delete attachment:
URL: https://api.socratecloud.com/webapi/rest/lead/attachment/delete/{version}?LeadNo={LeadNo}&FileName={FileName}&accessToken={access_token}
Method: POST
Return 'Ok' for success or error message (start with "ERROR: ")
View attachments list:
URL: https://api.socratecloud.com/webapi/rest/lead/attachment/list/{version}?LeadNo={LeadNo}&accessToken={access_token}
Method: GET
Return: JSON with the following format:
{
"data": [
{
"FileName": "descriere.txt",
"Bytes": 20273
},
{
"FileName": "800x600.jpg",
"Bytes": 7767
}
],
"totalRows": 2
}