Lead API
Last updated
Last updated
This API is used to get lead, add lead, edit lead, etc. in the Sales CRM module.
Only the sales manager has the privilege of edit leads.
Method
GET
Media Type
application/json
URL
http://[server]/dolphin/apiv1/graph/leads?start=0&count=2
Header
Authorization : Bearer [generatedToken]
Body
Status
200
Response
{ “status”: “success”, “data”: [ { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1602660927716, “createdBy”: “b743ccc118f9f55c84a79d43406a0381”, “modifiedDate”: 1602661537230, “modifiedBy”: “b743ccc118f9f55c84a79d43406a0381”, “title”: “[title]”, “label”: [label], “contactId”: “[contact_id]”, “companyId”: “[company_id]”, “salesOwner”: “f4bfd668e76290e0867e39a7bb216e5a”, “userAccess”: “[everyone, owner, group, selectedGroup]”, “seen”: true, “source”: “import” }, { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1602660873533, “createdBy”: “b743ccc118f9f55c84a79d43406a0381”, “modifiedDate”: 1602660873533, “modifiedBy”: “b743ccc118f9f55c84a79d43406a0381”, “title”: “[title]”, “value”: [value], “label”: [label], “contactId”: “[contact_id]”, “companyId”: “[company_id]”, “salesOwner”: “4d5cbac32f51e1d7c8924f8c1493994d”, “userAccess”: “[everyone, owner, group, selectedGroup]”, “userAccessId”: [ “[userAccessId]” ], “source”: “others” } ], “hasMore”: true, “nextIndex”: 2, “prevIndex”: 0, “totalResults”: 3 }
Method
GET
Media Type
application/json
URL
http://[server]/dolphin/apiv1/graph/leads/[lead_id]
Header
Authorization : Bearer [generatedToken] leadId : [lead_id]
Body
Status
200
Response
{ “status”: “success”, “data”: { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1602661192074, “createdBy”: “b743ccc118f9f55c84a79d43406a0381”, “modifiedDate”: 1602661353028, “modifiedBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”, “title”: “[title]”, “value”: [value], “label”: [label], “contactId”: “[contact_id]”, “companyId”: “[company_id]”, “salesOwner”: “c04ca68f4c031e5c7cd6d3675b67e3a5”, “userAccess”: “[everyone, owner, group, selectedGroup]”, “converted”: true, “convertedDate”: 1602661353028, “seen”: true, “source”: “linkedin” }, “hasMore”: false, “nextIndex”: 0, “prevIndex”: 0, “totalResults”: 0 }
Method
GET
Media Type
application/json
URL
http://[server]/dolphin/apiv1/graph/leads/archived?start=0&count=2
Header
Authorization : Bearer [generatedToken]
Body
Status
200
Response
{ “status”: “success”, “data”: [ { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1602218858357, “createdBy”: “b743ccc118f9f55c84a79d43406a0381”, “modifiedDate”: 1602660751025, “modifiedBy”: “b743ccc118f9f55c84a79d43406a0381”, “title”: “[title]”, “value”: [value], “label”: [label], “contactId”: “[contact_id]”, “companyId”: “[company_id]”, “salesOwner”: “2e6cb05e5c20f1ffda1a1801128546ef”, “userAccess”: “[everyone, owner, group, selectedGroup]”, “archived”: true, “archivedDate”: 1602660751025, “seen”: true, “source”: “import” } ], “hasMore”: false, “nextIndex”: 0, “prevIndex”: 0, “totalResults”: 1 }
Method
GET
Media Type
application/json
URL
http://[server]/dolphin/apiv1/graph/leads/unarchived?start=0&count=2
Header
Authorization : Bearer [generatedToken]
Body
Status
200
Response
{ “status”: “success”, “data”: [ { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1602660927716, “createdBy”: “b743ccc118f9f55c84a79d43406a0381”, “modifiedDate”: 1602661537230, “modifiedBy”: “b743ccc118f9f55c84a79d43406a0381”, “title”: “[title]”, “label”: [label], “contactId”: “[contact_id]”, “companyId”: “[company_id]”, “salesOwner”: “f4bfd668e76290e0867e39a7bb216e5a”, “userAccess”: “[everyone, owner, group, selectedGroup]”, “seen”: true, “source”: “import” }, { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1602660873533, “createdBy”: “b743ccc118f9f55c84a79d43406a0381”, “modifiedDate”: 1602660873533, “modifiedBy”: “b743ccc118f9f55c84a79d43406a0381”, “title”: “[title]”, “value”: [value], “label”: [label], “contactId”: “[contact_id]”, “companyId”: “[company_id]”, “salesOwner”: “4d5cbac32f51e1d7c8924f8c1493994d”, “userAccess”: “[everyone, owner, group, selectedGroup]”, “userAccessId”: [ “[userAccessId]” ], “source”: “others” } ], “hasMore”: true, “nextIndex”: 2, “prevIndex”: 0, “totalResults”: 3 }
Method
GET
Media Type
application/json
URL
http://[server]/dolphin/apiv1/graph/leads/filter?start=0&count=2&label=[cold,warm,hot]
Header
Authorization : Bearer [generatedToken]
Body
Status
200
Response
{ “status”: “success”, “data”: [ { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1602660927716, “createdBy”: “b743ccc118f9f55c84a79d43406a0381”, “modifiedDate”: 1602661537230, “modifiedBy”: “b743ccc118f9f55c84a79d43406a0381”, “title”: “[title]”, “label”: [label], “contactId”: “[contact_id]”, “companyId”: “[company_id]”, “salesOwner”: “f4bfd668e76290e0867e39a7bb216e5a”, “userAccess”: “[everyone, owner, group, selectedGroup]”, “seen”: true, “source”: “import” }, { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1602660873533, “createdBy”: “b743ccc118f9f55c84a79d43406a0381”, “modifiedDate”: 1602660873533, “modifiedBy”: “b743ccc118f9f55c84a79d43406a0381”, “title”: “[title]”, “value”: [value], “label”: [label], “contactId”: “[contact_id]”, “companyId”: “[company_id]”, “salesOwner”: “4d5cbac32f51e1d7c8924f8c1493994d”, “userAccess”: “[everyone, owner, group, selectedGroup]”, “userAccessId”: [ “[userAccessId]” ], “source”: “others” } ], “hasMore”: true, “nextIndex”: 2, “prevIndex”: 0, “totalResults”: 3 }
Method
PUT
Media Type
application/json
URL
http://[server]/dolphin/apiv1/graph/leads/add
Header
Authorization : Bearer [generatedToken]
Body
{ “title”: “[title]”, “value”: [value], “contactId”: “[contact_id]”, “companyId”: “[company_id]”, “salesOwner”: “[sales_owner]”, “userAccess”: “[everyone, owner, group, selectedGroup]” }
Note : If the selected user access is selectedGroup, then you must enter userAccessId.
Status
200
Response
{ “status”: “success”, “data”: { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1603267998407, “createdBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”, “modifiedDate”: 1603267998407, “modifiedBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”, “title”: “[title]”, “value”: [value], “contactId”: “[contact_id]”, “companyId”: “[company_id]”, “salesOwner”: “[sales_owner]”, “userAccess”: “[everyone, owner, group, selectedGroup]”, “source”: “API” }, “hasMore”: false, “nextIndex”: 0, “prevIndex”: 0, “totalResults”: 0 }
Method
PUT
Media Type
application/json
URL
http://[server]/dolphin/apiv1/graph/leads/edit
Header
Authorization : Bearer [generatedToken]
Body
Body Example : { “id” : “[id]”, “title”: “[title]”, “value”: [value], “contactId”: “[Contact_id]”, “companyId”: “[Company_id]”, “salesOwner”: “[sales_owner]”, “userAccess”: “[everyone, owner, group, selectedGroup]” }
Note : If you update user access to selectedGroup, then you must enter userAccessId.
Status
200
Response
{ “status”: “success”, “data”: { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1603268380313, “createdBy”: “4ff19a781cddbb4efe036f4e53b86fe9”, “modifiedDate”: 1603268380313, “modifiedBy”: “4ff19a781cddbb4efe036f4e53b86fe9”, “title”: “[title]”, “value”: [value], “contactId”: “[contact_id]”, “companyId”: “[company_id]”, “salesOwner”: “[sales_owner]”, “userAccess”: “[everyone, owner, group, selectedGroup]” }, “hasMore”: false, “nextIndex”: 0, “prevIndex”: 0, “totalResults”: 0 }
Method
PUT
Media Type
application/json
URL
http://[server]/dolphin/apiv1/graph/leads/edit/multiple
Header
Authorization : Bearer [generatedToken]
Body
Body Example : [ { “id” : “[id]”, “title”: “[title]”, “value”: [value], “contactId”: “[contact_id]”, “companyId”: “[company_id]”, “salesOwner”: “[sales_owner]”, “userAccess”: “[everyone, owner, group, selectedGroup]” }, { “id” : “[id]”, “title”: “[title]”, “value”: [value], “contactId”: “[contact_id]”, “companyId”: “[company_id]”, “salesOwner”: “[sales_owner]”, “userAccess”: “[everyone, owner, group, selectedGroup]” } ]
Note : If you update user access to selectedGroup, then you must enter userAccessId.
Status
200
Response
{ “status”: “success”, “data”: [ { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1603269687789, “createdBy”: “4ff19a781cddbb4efe036f4e53b86fe9”, “modifiedDate”: 1603269687789, “modifiedBy”: “4ff19a781cddbb4efe036f4e53b86fe9”, “title”: “[title]”, “value”: [value], “contactId”: “[contact_id]”, “companyId”: “[company_id]”, “salesOwner”: “[sales_owner]”, “userAccess”: “[everyone, owner, group, selectedGroup]” }, { “id”: “[id]”, “owner”: “[owner_id]”, “createdDate”: 1603269688259, “createdBy”: “4ff19a781cddbb4efe036f4e53b86fe9”, “modifiedDate”: 1603269688259, “modifiedBy”: “4ff19a781cddbb4efe036f4e53b86fe9”, “title”: “[title]”, “value”: [value], “contactId”: “[contact_id]”, “companyId”: “[company_id]”, “salesOwner”: “[sales_owner]”, “userAccess”: “[everyone, owner, group, selectedGroup]” } ], “hasMore”: false, “nextIndex”: 0, “prevIndex”: 0, “totalResults”: 0 }