ADDEDIT LeadSaleCaps API V1

Updated on 2015-09-28
Current Version: Version 1
Deprecated Version: NA

Requests Allowed: GET & SOAP

 

Summary:

Create and edit lead sale caps for Buyers or Buyer Contracts 

Resource/WSDL Page:

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

 

Parameters

api_key
Required
Type: STRING
Length (Max/Min): 50

You can obtain this api_key from within CAKE >> Setup >> Permissions in the API Key list.  Must be a valid API key (existing and not expired)

Example Value: 

Fo35NRAqvFLXoZxqB4aViaiYM7iVMhh

buyer_id

Required

Type: INTEGER

Max Length: N/A


ID of Buyer you’re creating or editing the caps on. Use Export Buyers API to obtain

Pass blank to skip if supplying filter_id below.

buyer_contract_id

Required

Type: INTEGER

Max Length: N/A


ID of Buyer Contract you’re creating or editing the caps on. Use Export BuyerContracts API to obtain

Pass blank to skip if supplying filter_id below.

cap_interval_id

Required

Type: INTEGER

Max Length: N/A

ID of cap interval. Use GET CapIntervals API to obtain

NOTE: If setting caps on Buyer Contract, interval Daily (ID 1) is not available as that is done through delivery schedule.

Pass -1 to set to "None".

cap_limit

Required

Type: DECIMAL

Max Length: N/A


The number of leads this Buyer or Buyer Contract can purchase.

Pass -2 to set to NULL

cap_start

Required

Type: DATETIME

Max Length: N/A

Identifies the date when the caps should start.

This field is only required if cap interval is set to custom.

Pass blank to skip.


cap_start_modification_type

Required

Type: ENUM

Max Length: N/A


This states what kind of modification is happening to the filter.

Example Values: change, do_not_change, remove


**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/addedit.asmx/LeadSaleCaps?api_key=dNJFmId9rI&buyer_id=0&buyer_contract_id=1498&cap_interval_id=2&cap_limit=10000&cap_start=01-01-0001&cap_start_modification_type=do_not_change


 

Sample XML Response:


<lead_sale_caps_addedit_response><success>true</success><message>Lead Sale Cap Updated</message></lead_sale_caps_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 less than or equal to 0 or is greater than 0, but doesn’t match an existing Buyer ID in CAKE.

Invalid Buyer Contract ID

buyer_contract_id is less than or equal to 0 or is greater than 0, but doesn’t match an existing Buyer Contract ID in CAKE.

Invalid Interval ID

cap_interval_id value is not in the accepted list of ID’s.

Invalid Cap Start

cap_start value isn’t a valid date or is in an invalid format.