TRACK ReturnLead API Version 1

Updated on 2018-05-29
Current Version: Version 1
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/1/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
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 returns the lead and leaves it in the returns queue for later processing
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

 **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
http://demo.cakemarketing.com/api/1/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/1/">
<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