Submit a Ticket My Tickets
Welcome
Login  Sign up

ADDEDIT BuyerContractDeliverySchedule API Version 1

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

GET

https://demo-new.cakemarketing.com/api/1/addedit.asmx/BuyerContractDeliverySchedule?api_key=3YmDJeT3VHTFhDqAjr2OlQ&buyer_contract_id=1498&delivery_schedule_id=0&delivery_schedule_day=tuesday&time_open=01-01-0001+00:00:00&time_open_modify=true&time_closed=01-01-0001+23:59&time_closed_modify=true&cap=200&price=100&price_modify=true&schedule_type=exclusive&sweeper=off&priority=on&no_return=off



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.





Did you find it helpful? Yes No

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