Submit a Ticket My Tickets
Welcome
Login  Sign up

TRACK ReturnLead API Version 2

TRACK ReturnLead API Version 2

Updated on 2018-07-23
Current Version: Version 2
Deprecated Version:
Requests Allowed: GET/SOAP


Summary:

This API allows for leads to be returned with an assigned reason ID by an admin.  Leads being returned or leads in the return queue can be approved for credit or to be replaced.


Resource/WSDL Page:

http://<your_domain_here>/api/2/track.asmx?op=ReturnLead


Parameters

api_key
Required
Type: STRING
Length (Max/Min): 50
This api_key must be a valid API key (exisiting and NOT expired). You can obtain this api_key from within CAKE >> Setup >> Permissions in the API Key list.  
Example Value: Fo35NRAqvFLXoZxqB4aViaiYM7iVMhh
lead_id
Required
Type: STRING
Length (Max/Min): N/A
Example Value: "E2R3JKM1"
vertical_id
Required
Type: INT
Length (Max/Min): N/A
Must be an existing Vertical ID. Use GET verticals API:
https://support.getcake.com/solution/articles/13000005375-get-verticals-api-version-2
Required in the event that leads are created in different verticals from the same session        
Example Values: 32                                                                                                                                                        
buyer_contract_id
optional
Type: INT
Length (Max/Min): N/A
Must be an existing buyer contract ID.  Must be buyer contract that purchased the specified lead ID.  Sending a value in this field will specify which sale from a multi-sale is to be returned.
return_type
Required
Type: ENUM
Length (Max/Min): N/A
Set action to take on the returned lead.  Options are approve_to_replace, approve_for_credit or submit_for_approval
  • approve_to_replace approves the lead return and queues the buyer for a replacement lead
  • approve_for_credit approves the lead return and credits the buyer for the lead
  • submit_for_approval sends the lead to the return queue for later processing
  • reject returns the lead to the return queue and then rejects the return attempt 
Example Value: approve_to_replace
return_reason_id
Required
Type: INT
Length (Max/Min): N/A
Must be an existing return reason ID. Use GET ReturnReasons API to get IDs:
http://<your_domain_here>/buyers/api/1/leads.asmx/GetReturnReasons
Example Value: 3
denied_reason_id
optional
Type: INT
Length (Max/Min): N/A
Must be an existing denied reason ID. Use GET RejectReasons API to get IDs:
http://<your_domain_here>/api/1/get.asmx?op=GetRejectReasons
Example Value: 3

 **Note all optional parameters still need to be passed through in the actual call. These parameters do not need a value (therefore you can use a null value). 


Example Request

GET
https://demo-new.cakemarketing.com/api/2/track.asmx?op=ReturnLead



Sample XML Response:


 

<lead_return_response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://cakemarketing.com/api/2/">
<success>bool</success>
<message>string</message>
</lead_return_response>



Example Error Messages: 



Error Message
Likely Cause
Invalid API Key
API Key does not exist or is expired
Lead is Already in Return List
Lead has already been submitted for approval and exists in return queue


 

 


 

 




Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.