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 |
Must be a valid API key (existing and not expired) Example Values: Fo35NRAqvFLXoZxqB4aViaiYM7iVMhh |
entity_type |
Required affiliate, advertiser, buyer, list_manager Example Values: |
entity_id |
Entities ID [affiliate ID / advertiser ID / buyer ID / list_manager ID] Example Values: 123456 |
contact_id |
Contact ID ["0" New Contact / Contact ID Update Contact] 0 to create, > 0 to edit Example Values: 0 |
role_id |
0 to auto select on creation, not used on edit Example Values: 1 |
include_in_mass_emails |
Allow Contact to Receive System Emails? ["TRUE", "FALSE"] Example Values: True |
contact_first_name |
Contact's first name Example Values: FirstName |
contact_middle_name |
Contact's Middle Name Example Values: MiddleName |
contact_last_name |
Contact's last name Example Values: LastName |
contact_email_address |
Contact's email address Example Values: [email protected] |
contact_password |
NULL or empty sets it to NULL Example Values: password |
contact_title |
Title of Contact Example Values: Director |
contact_department_id |
Department Contact is From ["0" ignore field]{See get.asmx > Departments} Example Values: 0 |
contact_phone_work |
Contact's work phone number Example Values: 555-867-5309 |
contact_phone_cell |
Contact's cell phone number Example Values: 555-234-5454 |
contact_im_service |
Contact IM Service ["0" = AIM, "1" = Google, "2" = MSN, "3" = Skype, "4" = Yahoo, "-1"= Ignore IM Contact Service] Example Values: 1 |
contact_im_name |
Contact's im name Example Values: IMContact |
contact_timezone |
Contact timezone Example Values: PST |
contact_language_id |
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
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 |