Returning Leads Via REST API

Follow

You can learn how to return leads from the portal via this article, else to return leads via the REST API, continue reading here.  This article will help you if you want to return leads from your own CRM or you want to grant access for your Buyers to return leads that you send them via an API (rather than manually).

To successfully return leads via the API you will need....
- Access to REST API so you can create the function
- LeadID
- BuyerID (BID)
- List of Return Codes (reason for return).  This can be found under Campaigns > Settings > Lists

Creating a Key
Raise a ticket if you do not see REST API under your Admin > Tech Hub > REST API.  

1) Create a key (Administrator or Buyer). 
If you are creating a key for a Buyer, select the Buyer from the drop down.

2) Select the permission "Return" under Leads

Note: If you untick "Reverse supplier payout", payout awarded to the supplier will remain in tact.  If you are your only supplier, then this is irrelevant.

Return Codes
When returning a lead you need to declare the reason.  Codes are available under Campaigns > Settings > Lists.  Here you have the option to make a note of the Return Feedback codes.  For example, the code for Do Not Call Complaint is DNCC, the code for a Duplicate is "DUPE".

Example Request

https://account.leadbyte.co.uk/restapi/v1.2/leads/return
{
	"key": "c99d835179c97500ab8750098u75554",
	"leadId": 84145,
	"BID": "1",
	"reason": "DNCC"
}

Example Response

{
	"status": "Success",
	"message": "",
	"details": {
		"84145": "Return Queued"
	}
}


Subject to Approval
When leads are returned, you have the option to automatically accept the return OR review it first.  Under the Edit Buyer screen (Campaigns > Buyers) you have the option to set returns to be subject to approval.  All returned leads will drop into the Buyer Returns screen under the Leads tab.

Screenshot_2021-02-06_at_12.09.52.png
(Buyer Returns)

Screenshot_2021-02-06_at_12.10.28.png
(subject to approval)


Security Note
We encourage you to IP Whitelist to lockdown requests being made to this service.

 

Was this article helpful?
0 out of 0 found this helpful

Comments