ADDEDIT BuyerContractDeliverySchedule API V1
Updated on 2015-10-07
Current Version: Version 1
Deprecated Version: NA
Requests Allowed: GET&SOAP
Summary:
Returns "Buyer Contract ### Delivery Schedule Created" or "Buyer Contract Delivery Schedule ### Updated"
Resource/WSDL Page:
http://<your_domain_here>/api/1/addedit.asmx?op=BuyerContractDeliverySchedule
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. |
delivery_schedule_id Required Type: INTEGER Max Length: N/A | Identifies the delivery schedule you’d like to edit. Pass 0 to create a new schedule. To get ID’s, see: EXPORT BuyerContracts API |
delivery_schedule_day Required Type: ENUM Max Length: N/A | Sets the day you are building the schedule for. Example Values: sunday, monday, tuesday, wednesday, thurdsay, friday, saturday Pass “no_change” to skip |
time_open Required Type: DATETIME Max Length: N/A | Sets the opening time for the contract. You must pass date and time, but only time will be recorded. Use format MM-DD-YYYY hh:mm |
time_open_modify Required Type: BOOL Max Length: N/A | States whether or not you’re modifying the opening time. Example Values: true, false |
time_closed Required Type: DATETIME | Sets the closing time for the contract. You must pass date and time, but only time will be recorded. Use format MM-DD-YYYY hh:mm |
time_closed_modify Required Type: BOOL Max Length: N/A | States whether or not you’re modifying the closing time. Example Values: true, false |
cap Required Type: INTEGER Max Length: N/A | Sets the daily lead cap for the schedule you are working with. You must supply a value of 0 or greater when creating or editing. NOTE: 0 will set a cap of 0 and lead purchasing won’t be possible. Pass -1 to skip if editing. |
price Required Type: DECIMAL Max Length: N/A | Sets the default price to charge the Buyer for each lead purchased by this Buyer Contract during the schedule in question. |
price_modify Required Type: BOOL Max Length: N/A | States whether or not you’re modifying the price. Example Values: true, false |
schedule_type Required Type: ENUM Max Length: N/A | Sets the exclusivity of the schedule by using the schedule type ID’s. Example Values: exclusive, multisell, hybrid |
sweeper Required Type: ENUM Max Length: N/A | States whether the Sweeper function is enabled for this schedule. Example Values: on, off, no_change |
priority Required Type: ENUM Max Length: N/A | States whether the priority function is enabled for this schedule to enable the use of Buyer Contract rank. Example Values: on, off, no_change |
no_return Required Type: ENUM Max Length: N/A | States whether leads purchased by this Buyer Contract while this schedule is enabled cannot return leads. Example Values: on, off, no_change |
**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
Sample XML Response:
<?xml version=”1.0”encoding=”utf-8”?>
<buyer_contract_delivery_schedule_addedit_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>true</success>
<message>Buyer Contract (1498) Delivery Schedule Added</message>
</buyer_contract_delivery_schedule_addedit_response>
Example Error Messages:
Error Message | Likely Cause |
Invalid API Key | API Key does not exist or is expired |
Invalid Buyer Contract ID | buyer_contract_id is <0 or is >0, but doesn’t match an existing employee contact in CAKE. |
Buyer Schedule Overlap | You’re trying to create a schedule for a day/time that overlaps with a pre-existing schedule. |