Resource Definitions:Contacts/ID
From API Documentation
(Difference between revisions)
												
			
		 (→GET)  | 
		 (→GET)  | 
		||
| (4 intermediate revisions not shown) | |||
| Line 1: | Line 1: | ||
| - | The contacts/ID resource is an individual contact entry associated with your agent account.  | + | The ''contacts/ID'' resource is an individual contact entry associated with your agent account, where "ID" is the contact's contact_id number.  | 
  '''''Example URI:''''' <nowiki>http://api.rezora.com/v1/contacts/123456</nowiki>  |   '''''Example URI:''''' <nowiki>http://api.rezora.com/v1/contacts/123456</nowiki>  | ||
| Line 30: | Line 30: | ||
* contact_date  | * contact_date  | ||
* contact_self - ''possible values: 0, 1 (cannot delete)''  | * contact_self - ''possible values: 0, 1 (cannot delete)''  | ||
| + | * contact_unsubscribe - ''possible values: 0 (subscribed), 1 (unsubscribed)''  | ||
=== Example Responses ===  | === Example Responses ===  | ||
| Line 60: | Line 61: | ||
   <contact_date>2010-07-16 22:34:01</contact_date>  |    <contact_date>2010-07-16 22:34:01</contact_date>  | ||
   <contact_self>0</contact_self>  |    <contact_self>0</contact_self>  | ||
| + |   <contact_unsubscribe>0</contact_unsubscribe>  | ||
  </contact>  |   </contact>  | ||
</contacts>  | </contacts>  | ||
| Line 89: | Line 91: | ||
   "contact_home_zip":"12345",  |    "contact_home_zip":"12345",  | ||
   "contact_date":"2010-07-16 22:34:01",  |    "contact_date":"2010-07-16 22:34:01",  | ||
| - |    "contact_self":"0"  | + |    "contact_self":"0",  | 
| + |   "contact_unsubscribe":"0"  | ||
  }  |   }  | ||
]  | ]  | ||
| Line 98: | Line 101: | ||
<source lang="text">  | <source lang="text">  | ||
"contact_id"|"contact_name"|"contact_email"|"contact_type"|"contact_title"|"contact_company"|"contact_phone_home"|"contact_phone_work"|"contact_phone_mobile"|"contact_phone_fax"|"contact_business_street"|"contact_business_street2"|"contact_business_city"|"contact_business_state"|"contact_business_zip"|"contact_home_street"|"contact_home_street2"|"contact_home_city"|"contact_home_state"|"contact_home_zip"|"contact_date"|"contact_self"  | "contact_id"|"contact_name"|"contact_email"|"contact_type"|"contact_title"|"contact_company"|"contact_phone_home"|"contact_phone_work"|"contact_phone_mobile"|"contact_phone_fax"|"contact_business_street"|"contact_business_street2"|"contact_business_city"|"contact_business_state"|"contact_business_zip"|"contact_home_street"|"contact_home_street2"|"contact_home_city"|"contact_home_state"|"contact_home_zip"|"contact_date"|"contact_self"  | ||
| - | "123456"|"Jane Smith"|"jane.smith@company.com"|"Active"|"Consultant"|"Acme Consulting"|"303-555-1234"|"303-555-1235"|"303-555-1236"|"303-555-1237"|"123 Church Street"|"Suite 12"|"Shady Acres"|"CO"|"12345"|"124 Church Street"|""|"Shady Acres"|"CO"|"12345"|"2010-07-16 22:34:01"|"0"  | + | "123456"|"Jane Smith"|"jane.smith@company.com"|"Active"|"Consultant"|"Acme Consulting"|"303-555-1234"|"303-555-1235"|"303-555-1236"|"303-555-1237"|"123 Church Street"|"Suite 12"|"Shady Acres"|"CO"|"12345"|"124 Church Street"|""|"Shady Acres"|"CO"|"12345"|"2010-07-16 22:34:01"|"0"|"0"  | 
</source>  | </source>  | ||
</div>  | </div>  | ||
| Line 106: | Line 109: | ||
* contact_name  | * contact_name  | ||
| - | * contact_email '''<span style="color: #f00;">*</span>''' ''  | + | * contact_email '''<span style="color: #f00;">*</span>''' - ''must be a valid email address, must be unique''  | 
| - | * contact_type ''  | + | * contact_type - ''possible values: Hot, Active, Inactive, empty string (indicates no type)''  | 
* contact_title  | * contact_title  | ||
* contact_company  | * contact_company  | ||
| Line 217: | Line 220: | ||
== DELETE ==  | == DELETE ==  | ||
| - | Permanently removes an individual contact, and returns a success code.  | + | Permanently removes an individual contact, and returns a success code. Note the you CANNOT delete the self contact (contact_self = 1).    | 
=== Example Response Data ===  | === Example Response Data ===  | ||
| Line 248: | Line 251: | ||
</div>  | </div>  | ||
[[Category:Resource Definitions]]  | [[Category:Resource Definitions]]  | ||
| + | [[Category:Agent Resources]]  | ||
Latest revision as of 21:39, 3 February 2012
The contacts/ID resource is an individual contact entry associated with your agent account, where "ID" is the contact's contact_id number.
Example URI: http://api.rezora.com/v1/contacts/123456
Available methods are:
Contents | 
GET
Returns an individual contact. The contact record includes the following fields:
- contact_id
 - contact_name
 - contact_email
 - contact_type - possible values: Hot, Active, Inactive, empty string (indicates no type)
 - contact_title
 - contact_company
 - contact_phone_home
 - contact_phone_work
 - contact_phone_mobile
 - contact_phone_fax
 - contact_business_street
 - contact_business_street2
 - contact_business_city
 - contact_business_state
 - contact_business_zip
 - contact_home_street
 - contact_home_street2
 - contact_home_city
 - contact_home_state
 - contact_home_zip
 - contact_date
 - contact_self - possible values: 0, 1 (cannot delete)
 - contact_unsubscribe - possible values: 0 (subscribed), 1 (unsubscribed)
 
Example Responses
XML Response
<?xml version="1.0" encoding="UTF-8"?> <contacts version="1.0"> <contact> <contact_id>123456</contact_id> <contact_name>Jane Smith</contact_name> <contact_email>jane.smith@company.com</contact_email> <contact_type>Active</contact_type> <contact_title>Consultant</contact_title> <contact_company>Acme Consulting</contact_company> <contact_phone_home>303-555-1234</contact_phone_home> <contact_phone_work>303-555-1235</contact_phone_work> <contact_phone_mobile>303-555-1236</contact_phone_mobile> <contact_phone_fax>303-555-1237</contact_phone_fax> <contact_business_street>123 Church Street</contact_business_street> <contact_business_street2>Suite 12</contact_business_street2> <contact_business_city>Shady Acres</contact_business_city> <contact_business_state>CO</contact_business_state> <contact_business_zip>12345</contact_business_zip> <contact_home_street>124 Church Street</contact_home_street> <contact_home_street2></contact_home_street2> <contact_home_city>Shady Acres</contact_home_city> <contact_home_state>CO</contact_home_state> <contact_home_zip>12345</contact_home_zip> <contact_date>2010-07-16 22:34:01</contact_date> <contact_self>0</contact_self> <contact_unsubscribe>0</contact_unsubscribe> </contact> </contacts>
JSON Response
[ { "contact_id":"123456", "contact_name":"Jane Smith", "contact_email":"jane.smith@company.com", "contact_type":"Active", "contact_title":"Consultant", "contact_company":"Acme Consulting", "contact_phone_home":"303-555-1234", "contact_phone_work":"303-555-1235", "contact_phone_mobile":"303-555-1236", "contact_phone_fax":"303-555-1237", "contact_business_street":"123 Church Street", "contact_business_street2":"Suite 12", "contact_business_city":"Shady Acres", "contact_business_state":"CO", "contact_business_zip":"12345", "contact_home_street":"124 Church Street", "contact_home_street2":"", "contact_home_city":"Shady Acres", "contact_home_state":"CO", "contact_home_zip":"12345", "contact_date":"2010-07-16 22:34:01", "contact_self":"0", "contact_unsubscribe":"0" } ]
CSV Response
"contact_id"|"contact_name"|"contact_email"|"contact_type"|"contact_title"|"contact_company"|"contact_phone_home"|"contact_phone_work"|"contact_phone_mobile"|"contact_phone_fax"|"contact_business_street"|"contact_business_street2"|"contact_business_city"|"contact_business_state"|"contact_business_zip"|"contact_home_street"|"contact_home_street2"|"contact_home_city"|"contact_home_state"|"contact_home_zip"|"contact_date"|"contact_self" "123456"|"Jane Smith"|"jane.smith@company.com"|"Active"|"Consultant"|"Acme Consulting"|"303-555-1234"|"303-555-1235"|"303-555-1236"|"303-555-1237"|"123 Church Street"|"Suite 12"|"Shady Acres"|"CO"|"12345"|"124 Church Street"|""|"Shady Acres"|"CO"|"12345"|"2010-07-16 22:34:01"|"0"|"0"
PUT
Updates an existing contact, and returns a success code. You may include the following fields (required fields marked with a red asterisk (*)):
- contact_name
 - contact_email * - must be a valid email address, must be unique
 - contact_type - possible values: Hot, Active, Inactive, empty string (indicates no type)
 - contact_title
 - contact_company
 - contact_phone_home
 - contact_phone_work
 - contact_phone_mobile
 - contact_phone_fax
 - contact_business_street
 - contact_business_street2
 - contact_business_city
 - contact_business_state
 - contact_business_zip
 - contact_home_street
 - contact_home_street2
 - contact_home_city
 - contact_home_state
 - contact_home_zip
 
Example Request Data
XML Request
<?xml version="1.0" encoding="UTF-8"?> <data> <contact_name>Jane Smith</contact_name> <contact_email>jane.smith@company.com</contact_email> <contact_type>Active</contact_type> <contact_title>Consultant</contact_title> <contact_company>Acme Consulting</contact_company> <contact_phone_home>303-555-1234</contact_phone_home> <contact_phone_work>303-555-1235</contact_phone_work> <contact_phone_mobile>303-555-1236</contact_phone_mobile> <contact_phone_fax>303-555-1237</contact_phone_fax> <contact_business_street>123 Church Street</contact_business_street> <contact_business_street2>Suite 12</contact_business_street2> <contact_business_city>Shady Acres</contact_business_city> <contact_business_state>CO</contact_business_state> <contact_business_zip>12345</contact_business_zip> <contact_home_street>124 Church Street</contact_home_street> <contact_home_street2></contact_home_street2> <contact_home_city>Shady Acres</contact_home_city> <contact_home_state>CO</contact_home_state> <contact_home_zip>12345</contact_home_zip> </data>
JSON Request
{ "data":{ "contact_name":"Jane Smith", "contact_email":"jane.smith@company.com", "contact_type":"Active", "contact_title":"Consultant", "contact_company":"Acme Consulting", "contact_phone_home":"303-555-1234", "contact_phone_work":"303-555-1235", "contact_phone_mobile":"303-555-1236", "contact_phone_fax":"303-555-1237", "contact_business_street":"123 Church Street", "contact_business_street2":"Suite 12", "contact_business_city":"Shady Acres", "contact_business_state":"CO", "contact_business_zip":"12345", "contact_home_street":"124 Church Street", "contact_home_street2":"", "contact_home_city":"Shady Acres", "contact_home_state":"CO", "contact_home_zip":"12345" } }
TEXT Request
contact_name=Jane+Smith&contact_email=jane.smith%40company.com&contact_type=Active&contact_title=Consultant&contact_company=Acme+Consulting&contact_phone_home=303-555-1234&contact_phone_work=303-555-1235&contact_phone_mobile=303-555-1236&contact_phone_fax=303-555-1237&contact_business_street=123+Church+Street&contact_business_street2=Suite+12&contact_business_city=Shady+Acres&contact_business_state=CO&contact_business_zip=12345&contact_home_street=124+Church+Street&contact_home_street2=&contact_home_city=Shady+Acres&contact_home_state=CO&contact_home_zip=12345
Example Response Data
XML Response
<?xml version="1.0" encoding="UTF-8"?> <contacts version="1.0"> <contact> <status>200</status> </contact> </contacts>
JSON Response
[ { "status":"200" } ]
CSV Response
"status" "200"
DELETE
Permanently removes an individual contact, and returns a success code. Note the you CANNOT delete the self contact (contact_self = 1).
Example Response Data
XML Response
<?xml version="1.0" encoding="UTF-8"?> <contacts version="1.0"> <contact> <status>200</status> </contact> </contacts>
JSON Response
[ { "status":"200" } ]
CSV Response
"status" "200"
