Submit a Ticket My Tickets
Welcome
Login  Sign up

ADDEDIT BuyerContract API Version 1

ADDEDIT BuyerContract API V1

Updated on 2015-10-01
Current Version: Version 1
Deprecated Version: NA
Requests Allowed: GET&SOAP

 

Summary:

Returns "Buyer Contract ### Created" or "Buyer Contract ### Updated"

 

Resource/WSDL Page:

http://<your_domain_here>/api/1/addedit.asmx?op=BuyerContract


Parameters

api_key
Required
Type: STRING
Max Length: 50 Char.
Must be a valid API key (existing and Not expired)
Example Values: Fo35NRAqvFLXoZxqB4aVMhh
buyer_contract_id
Required
Type: INTEGER
Max Length: N/A
Buyer Contract’s CAKE entity ID. Obtained via EXPORT BuyerContracts API
Pass 0 to create a new Buyer Contract.
Passing a value greater than 0 will edit the Buyer Contract with that ID.

buyer_id
Required
Type: INTEGER
Max Length: N/A
Buyer’s CAKE entity ID. Obtained via EXPORT Buyers API
Pass 0 to skip.
If creating a Buyer Contract, the Buyer’s ID must be included.

vertical_id
Required
Type: INTEGER
Max Length: N/A
ID of the Vertical the Buyer Contract is in. Use GET Verticals API
Pass 0 to skip.
If creating a Buyer Contract, the Vertical ID must be included.

buyer_contract_name
Required
Type: STRING
Max Length: 50 Char.


Set or change the Buyer’s name.
Pass NULL to remove and set to blank. Otherwise skip by passing no value.

account_status_id
Required
Type: INTEGER
Max Length: N/A
Buyer Contract’s Status

Obtained via GET AccountStatuses API

Pass 0 to skip

Example Values: 1
offer_id
Required
Type: INTEGER
Max Length: N/A
ID of the Offer this Buyer Contract can purchase from. Obtained via EXPORT Offers API
Pass 0 to skip or use Offer ID to set.
Pass -1 to clear out the Offer ID.
Example Values: 1

replace_returns
Required
Type: ENUM
Max Length: N/A
This identifies whether leads purchased by this Buyer Contract can be returned.
Pass "on" to turn on.
Pass "off" to turn off.
Pass "no_change" to skip.
replacements_non_returnable
Required
Type: ENUM
Max Length: N/A
This identifies whether leads sold to this Buyer Contract as replacements can be returned.
Pass "on" to turn on and replacement leads can’t be returned.
Pass "off" to turn off and replacement leads can be returned.
Pass "no_change" to skip.
max_return_age_days
Required
Type: INTEGER
Max Length: N/A


The maximum number of days after a lead is purchased by this Buyer Contract that it can be returned.
Pass -1 to skip.

buy_upsells
Required
Type: ENUM
Max Length: N/A
This identifies whether the Buyer Contract can buy leads generated through an upsell offer.
Pass "on" to turn on.
Pass "off" to turn off.
Pass "no_change" to skip.
vintage_leads
Required
Type: ENUM
Max Length: N/A
This identifies whether leads purchased by this Buyer Contract will be flagged as vintage leads.
Pass "on" to turn on.
Pass "off" to turn off.
Pass "no_change" to skip.
min_lead_age_minutes
Required
Type: INTEGER
Max Length: N/A


The minimum age in minutes a lead must be before it can be sold to this Buyer Contract.
Pass -1 to skip.

max_lead_age_minutes
Required
Type: INTEGER
Max Length: N/A


The maximum age in minutes a lead can be before it cannot be sold to this Buyer Contract.
Pass -1 to skip.

posting_wait_seconds
Required
Type: INTEGER
Max Length: N/A
The number of seconds to wait after selling a lead to this Buyer Contract before posting the lead to the Buyer’s system.
Pass -1 to skip.

default_confirmation_page_link
Required
Type: STRING
Max Length: 100 Char.
The default link to send consumers to when this Buyer Contract purchases a lead.

Pass NULL to remove and set blank. Otherwise, skip by passing no value.
Example Values: http%3A%2F%2Fwww.example.com%2Fleadpost (URL Encoded)
max_post_errors
Required
Type: INTEGER
Max Length: N/A
The maximum number of post errors out of 10 that can occur before the Buyer Contract is turned off.
Pass 1-10 to allow the contract to automatically be turned off.
Pass 11 to have the contract never shut off.
Pass -1 to skip.
send_alert_only
Required
Type: ENUM
Max Length: N/A
This identifies whether the Buyer Contract will send an alert, but not shut off when max_post_errors are met.
Pass "on" to turn on.
Pass "off" to turn off.
Pass "no_change" to skip.

rank
Required
Type: INTEGER
Max Length: N/A
The numerical ordering of Buyer Contracts for lead delivery.

0 will receive the lead first. Whole numbers only.
pass -1 to skip on EDIT
email_template_id
Required
Type: INTEGER
Max Length: N/A
The ID of the email template to use for email lead delivery on this Buyer Contract.
See GET Email Templates API
Pass 0 to skip.
Pass -1 to clear value.
portal_template_id
Required
Type: INTEGER
Max Length: N/A
The ID of the email template the Buyer would use to send emails to all leads purchased by this Buyer Contract.
See GET Email Templates API Version 1
Pass 0 to skip.
Pass -1 to clear value.


**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/1/addedit.asmx/BuyerContract?api_key=3YmDJeT3VHTFhDqAjr2OlQ&buyer_contract_id=0&buyer_id=1326&vertical_id=607&buyer_contract_name=Test+Buyer+Contract+6&account_status_id=1&offer_id=0&replace_returns=off&replacements_non_returnable=off&max_return_age_days=-1&buy_upsells=off&vintage_leads=off&min_lead_age_minutes=-1&max_lead_age_minutes=-1&posting_wait_seconds=-1&default_confirmation_page_link=NULL&max_post_errors=-1&send_alert_only=off&rank=0&email_template_id=-1&portal_template_id=-1 

 


Sample XML Response:


<buyer_contract_addedit_response><success>true</success><message>Buyer Contract (Test Buyer Contract 6) Created Successfully</message><row_count>0</row_count><buyer_contract_id>1887</buyer_contract_id></buyer_contract_addedit_response>



Example Error Messages:

Error Message
Likely Cause
Invalid API Key
API Key does not exist or is expired
Invalid Buyer ID
buyer_id is <0 or is >0, but doesn’t match an existing Buyer’s ID.
Invalid Buyer Contract ID
buyer_contract_id is <0 or is >0, but doesn’t match an existing employee contact in CAKE.
Invalid Account Status ID
account_status_id value is not in list of available status ID’s.
Buyer Contract Name Already Exists
buyer_contract_name contains a pre-existing value.
Missing Required Fields
The fields listed are required, but missing. All fields are required to be passed.


Did you find it helpful? Yes No

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