Prophet CRM API
The Prophet CRM API is a RESTful Api.
We recommend the thorough documentation of ODATA2 API conventions here: ODATA V2 Documentation
Additionally, we recommend Postman when interacting with the API.
Auth: Basic (Login via auth headers)
In Postman, put the Prophet user credential in Authorization tab:
For programing language, use based64 to encode username:password, so you get a the encoded value, i.e. dXNlcm5hbWU6cGFzc3dvcmQ=
Append Basic to the front of the Based64 Encoded username:password so you have something like “Basic dXNlcm5hbWU6cGFzc3dvcmQ=” as your authorization header value, and then set the Authorization header of the request to that authorization header value.
let auth = 'Basic ' + Buffer.from(username + ':' + password).toString('base64');
request.headers.authorization = 'Authorization: ' + auth;
HTTP Request Body
JSON, occasionally XML for linking entities.
Read Only Tables:
Read Only tables have 'Views' denoted in the table name. /ContactViews /CompanyViews /OpportunityViews
Currently queries to /CustomFieldValueTextNumerics and /CustomFieldValueTextMemos are now supported.
Supported HTTP Calls
Get Patch Post Delete
Example of a GET call returning a specific Contact by their Id.
/Contacts /ContactViews /ContactNoteTrackings
/Opportunities /OpportunityViews /OpportunityStageChangeHistory /OpportunityProducts
/Users /'entity' $expand AssignedUsers
Templates are customized by system administrators. Fields are located on templates.
Companies and Contacts utilize a global template while Opportunities utilize the template for the designated department.
Users and Opportunities are associated with a specific department. Each department has an assigned Opportunity Template.
/CustomFieldDefinitions /CustomFieldDefinitionDropdownValues /CustomFieldValueTexts /CustomFieldValueDates /CustomFieldValueDropdowns
Defines the field name and location within Prophet.
Represents a system dropdown value, the template it is associated with, and the field location.
"Value": "Left Voicemail",
Represents a dropdown value entered by a user on an entity. Includes the entity, the DropDownValueId, and the field location.
Represents a text value entered by a user, the entity it is associated with, and the location of the field where the text is entered.
Represents a date value entered by a user, the entity it is associated with, and the location of the field where the date has been entered.
/Notes /'entity' $expand Notes
On the Note entries the ‘TrackTypeId’ is referencing a DropDown Value corresponding to the ‘Activity Type’. The Text of the note will include non-printable characters to represent line feeds and carriage returns.
Contacts, Companies, and Opportunities are the only entities which will have Notes associated with them.
"Text": "----------- 2/4/2020 6:31 PM (UTC-08:00) - Modified by: Mark Foltz ----------- Activity\r\nSuperSonics Opportunity created\r\nCompany: The Walt Disney Company\r\nContact(s): Walt Disney, Robert Iger, Luc Skywalker",
/Products /ProductGroups /OpportunityProducts
Creating entities is executed with a POST call. Most newly created entities are then linked to other entities or custom fields with a PUT (ex. Contact is linked to a User and/or Custom Fields).
Method = POST Success = 201 To create an entity POST the entity to URL's. /Contacts /Companies /Opportunities /Notes /CustomFieldValueTexts /CustomFieldValueDates /CustomFieldValueDropdowns /Addresses
Example 1: To create a Company, include all the fields of a company record that in the GET method, also need to supply a new GUID for the new record. If link to an existing Contact, put the contact ID in PrimaryContactId, otherwise leave it null.
Example 2: To create a new Contact, include all the fields of a contact record that in the GET method. If the Company does not exists, create one and put its Id in MainCompanyId:
Method = PUT Success = 203 To link entities send a PUT: (Example links a Contact to a User) URL: /
</uri>Commonly Linked Entities: Contacts/Companies/Opportunities -> User (AssignedUsers) Contacts/Companies/Opportunities -> CustomFields Contacts/Companies/Opportunities -> Addresses Companies/Opportunities -> Contacts (AssignedContacts) Contacts/Opportunities -> Companies (AssignedCompanies) Contacts/Companies -> Opportunities (AssignedOpportunities) Notes -> Contacts/Companies/Opportunities
Contacts/Companies/Opportunities can be linked to multiple Users, Custom Fields, and Notes.
Users can be linked to multiple Contacts/Companies/Opportunities.
Contacts can be linked to multiple Opportunities, but only one Company. Contacts can be linked to one company, must have the Company Id in the “MainCompanyId” as well as be linked.
Companies can be linked to multiple Contacts and multiple Opportunities. They may only have two addresses, a Primary Address and a Shipping Address.
Opportunities can be linked to multiple Contacts from various companies. Opportunities may only be linked to one Company, and must have the Company’s Id in the “MainCompanyId” field.
Method = GET
Success = return the latest Contact that match the conditions
To check if Contact exists based on "First Name/Last Name/Email or First Name/Last Name/Business Phone":
/Contacts?$filter=(Email%20eq%20'YourUrlEncodedEmail' and FirstName%20eq%20'YourUrlEncodedFirstName'%20and%20LastName%20eq%20'YourUrlEncodedFirstName')%20or%20(FirstName%20eq%20'YourUrlEncodedFirstName'%20and%20LastName%20eq%20'YourUrlEncodedFirstName'%20and%20BusinessPhone%20eq%20'YourUrlEncodedBusinessPhone')&$top=1&$orderby=UpdatedDate%20desc
To check if Company exists based on "Company Name":
Method = PUT
Success = 204
To update a Contact, need every field and its value from the GET method and specify the contact ID in the URL.
To update a Company, need every field and its value from the GET method. If link to an existing Contact, put the contact ID in PrimaryContactId
Method = DELETE
Success = 204
To delete an entity, send a DELETE URL without body :