Submit a Ticket My Tickets
Welcome
Login  Sign up

ADDEDIT Contact API Version 2 (DEPRECATED)

ADDEDIT Contact API Version 2

Updated on 2014-04-28
Current Version: Version 2
Deprecated Version: V1
Requests Allowed: GET&SOAP


Summary:

Allows to create or update an existing contact details in CAKE 


Resource/WSDL Page:

http://<your_domain_here>/api/2/addedit.asmx?op=Contact 


Parameters

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

Must be a valid API key (existing and not expired)

Example Values: Fo35NRAqvFLXoZxqB4aViaiYM7iVMhh

entity_type
Required
Type: ENTITYTYPES
Length (Max/Min): NA

Required affiliate, advertiser, buyer, list_manager

Example Values:  

entity_id
Required
Type: INT
Length (Max/Min): NA

Entities ID [affiliate ID / advertiser ID / buyer ID / list_manager ID]

Example Values: 123456

contact_id
Required
Type: INT
Length (Max/Min): NA

Contact ID ["0" New Contact / Contact ID Update Contact] 0 to create, > 0 to edit

Example Values: 0

role_id
Required
Type: BYTE
Length (Max/Min): NA

0 to auto select on creation, not used on edit

Example Values: 1

include_in_mass_emails
Required
Type: BOOL
Length (Max/Min): NA

Allow Contact to Receive System Emails? ["TRUE", "FALSE"]

Example Values: True

contact_first_name
Required
Type: STRING
Length (Max/Min): NA

Contact's first name

Example Values: FirstName

contact_middle_name
Required
Type: STRING
Length (Max/Min): NA

Contact's Middle Name

Example Values: MiddleName

contact_last_name
Required
Type: STRING
Length (Max/Min): NA

Contact's last name

Example Values: LastName

contact_email_address
Required
Type: STRING
Length (Max/Min): NA

Contact's email address

Example Values: [email protected]

contact_password
Required
Type: STRING
Length (Max/Min): NA

NULL or empty sets it to NULL

Example Values: password

contact_title
Required
Type: STRING
Length (Max/Min): NA

Title of Contact

Example Values: Director

contact_department_id
Required
Type: BYTE
Length (Max/Min): NA

Department Contact is From ["0" ignore field]{See get.asmx > Departments}

Example Values: 0

contact_phone_work
Required
Type: STRING
Length (Max/Min): NA

Contact's work phone number

Example Values: 555-867-5309

contact_phone_cell
Required
Type: STRING
Length (Max/Min): NA

Contact's cell phone number

Example Values: 555-234-5454

contact_im_service
Required
Type: STRING
Length (Max/Min): NA

Contact IM Service ["0" = AIM, "1" = Google, "2" = MSN, "3" = Skype, "4" = Yahoo, "-1"= Ignore IM Contact Service]

Example Values: 1

contact_im_name
Required
Type: STRING
Length (Max/Min): 

Contact's im name

Example Values: IMContact

contact_timezone
Required
Type: STRING
Length (Max/Min): NA

Contact timezone

Example Values: PST

contact_language_id
Required
Type: BYTE
Length (Max/Min): NA

Contact Language ID {See get.asmx > Languages}.  0 sets it to NULL.

Example Values: 1

 **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/2/addedit.asmx/Contact?api_key=dNJFmId9rI&entity_type=affiliate&entity_id=1&contact_id=0&include_in_mass_emails=FALSE&contact_first_name=First&contact_middle_name=Middle%20Name&contact_last_name=Last&[email protected]&contact_password=h@ck3r&contact_title=QA%20Engineer&contact_department_id=0&contact_phone_work=9495482253&contact_phone_cell=9492761052&contact_phone_fax=&contact_im_service=0&contact_im_name=myAIMaccount&contact_timezone=PST&contact_language_id=1

 

Sample XML Response:

<contact_addedit_response>
<success>true</success>
<message>Contact First Last Created</message>
<contact_id>3590</contact_id>
</contact_addedit_response>



Example Error Messages:  

Error Message

Likely Cause

Invalid API Key

API key does not exist or is expired

Invalid Entity Type

entity_type does not equal a valid entity type

Invalid Entity ID

entity_id does not match a valid entity for the specified entity type

Invalid Role ID

role_id does not match a role in the system

Invalid Role/Entity Pair

role_id does not match a valid role for the entity_type/entity_id passed in

Invalid Contact First Name

contact_first_name is NULL or empty or exceeds 25 characters

Invalid Contact Middle Name

contact_middle_name exceeds 25 characters

Invalid Contact Last Name

contact_last_name is NULL or empty or exceeds 60 characters

Invalid Contact Email Address

contact_email_address is NULL or empty or exceeds 60 characters

Invalid Contact Password

contact_password exceeds 25 characters

Invalid Contact Title

contact_title exceeds 30 characters

Invalid Contact Phone Work

contact_phone_work exceeds 30 characters

Invalid Contact Phone Cell

contact_phone_cell exceeds 30 characters

Invalid Contact Fax

contact_phone_fax exceeds 30 characters

Invalid Contact IM Service

contact_im_service exceeds 30 characters

Invalid Contact IM Name

contact_im_name exceeds 50 characters

Invalid Contact Time Zone

time_zone does not match a valid timezone in the system

Invalid Contact Language

contact_language_id does not correspond to a supported language

Invalid Contact Department

contact_department_id does not correspond to a department

Invalid Email Address

contact_email_address is invalid

Invalid Contact ID

contact_id does not correspond to a contact in the system

Did you find it helpful? Yes No

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