|
Heap Simple API If you want to send information or retrieve information from Heap programmatically, you've come to the right place. Now, while we have made every effort to make Heap's API (application programming interface) as simple as possible, the reality is you need to have some knowledge of how websites work. Creating Leads, Opportunities, Customers and Archives
Let's say I need to create a lead named Jane Doe who works at ACME Ltd. Ok so first I have to let Heap know who I am so I send the following variables (using POST):
Creating People
Just like leads, opportunities, customers and archives, people are created with the same basic method. First I have to send login_email and login_password over POST. Then send the variable "create" with a value of "person". Ok, now I have to send info about the new person:
Note about category: On Leads, Opportunities, Customers, Archives and People, multiple categories can be specified by adding a unix new line between each category. Note about duplicates: The Leads, Opportunities, Customers, Archives and People, have three modes of duplicate checking:
Creating Events
Ok let's create an event. First I have to send login_email and login_password over POST. Then send the variable "create" with a value of "event". Ok, now let's send the info about the event:
Creating Messages
Messages are the simplest items to create through the API. Just send login_email and login_password over POST. Then send the variable "create" with a value of "message". Then just create the message using the following variables:
Retrieving Leads, Opportunities, Customers and Archives
Ok, just like when you create content, you have to send login_email and login_password over POST when you retrieve information. But instead of "create" you send the POST variable "get" with one of the following values:
Code:
<?xml version="1.0"?>Retrieving People
Alright let's search for a person, just like before you send login_email and login_password over POST and send the variable "get" over POST with the value "people". This time I'm going to search for "bigfish.com" using the "search" variable (again sent over POST).
Code:
<?xml version="1.0"?>Retrieving Events
Ok, I want to retrieve any event associated to "Josh Taylor", so I am going to send login_email and login_password over POST and send the variable "get" over POST with the value "event" and search value of "Josh Taylor". Please note that the search variable also searches title of events, descriptions and locations. Ok here is what I get:
Code:
<?xml version="1.0"?> Retrieving Messages
Ok, I want to retrieve any message associated to "Josh Taylor", so I am going to send login_email and login_password over POST and send the variable "get" over POST with the value "message" and search value of "Josh Taylor". Please note that the search variable also searches title of messages, poster of the message and message body. Ok here is what I get:
Code:
Where do I post all this data?
http://SUBDOMAIN.crmondemand.biz/api.php
Your subdomain is the first part (before the first period) of the web address you use to login to your Heap account. So, for instance, the company above would sign in to their Heap account at http://creativearc.crmondemand.biz/. Thus their subdomain would be creativearc. Related Documents:
Create Lead and Follow-up Events
Example PHP code to create a lead and follow-up events
Save in Custom Values
Example PHP code to create a lead, follow-up events and save in custom values
Retrieving Search Results
Example PHP code to retrieve search results and return them as an array |