Sierra Interactive - API Sample

This sample demonstrates how to send Sierra Interactive API requests from javascript programs. Pelease refer the API documentation for details.

General notes

Download javascript code used in creating this sample page. Please review the same. Please replace the sample API key with your API key and make the API requests.

Work with Lead API Methods

Test leads API methods below:
  • Pressing the Add Lead button will call the Add Lead API method by passing preset values in the addNewLead javascript function. On success, id of the newly added lead will be populated in the Lead ID text field
  • Pressing the Update Lead will call the Update Lead API method. It will update the lead identified by lead-id or lead-email value specified in the text field. The lead will be updated by passing pre-set values in the updateExistingLead javascript function.
  • Pressing the Get Lead will call the Get Lead API method. It will retrive the details of lead identified by lead-id or lead-email value specified in the text field. And, populate them in the Lead API Response text area. Please check the getLead javascript function.
  • Pressing the Find Leads will call the Find Lead API method. It will retrive the leads matching the search criteria specified in the findLeads javascript function. The matching lead records will be populated in the Lead API Response text area.
  • Pressing the Get Lead & Validate Password will call the Get Lead API method. It will retrive the details of lead identified by lead-id or lead-email value specified in the text field and compare lead's password with the value specified in the Password to validate field.

Work with Saved Listings API Methods

Test saved-listing API methods below
  • Pressing the Add Saved Listing button will call the Add Saved Listing API method by passing the values specified in the text fields. Please check the savedListingsApi.add javascript function.
  • Pressing the Remove Saved Listing button will call the Remove Saved Listing API method by passing the values specified in the text fields. Please check the savedListingsApi.remove javascript function.
  • Pressing the Get Saved Listings button will call the Get Saved Listings API method. It will retrive the saved listings for the lead identified by lead-id or lead-email value specified in the text field. And, populate them in the Saved Listing API Response text area. Please check the savedListingsApi.get javascript function.

Work with Hidden Listings API Methods

Test hidden-listing API methods below
  • Pressing the Add Hidden Listing button will call the Add Hidden Listing API method by passing the values specified in the text fields. Please check the hiddenListingsApi.add javascript function.
  • Pressing the Remove Hidden Listing button will call the Remove Hidden Listing API method by passing the values specified in the text fields. Please check the hiddenListingsApi.remove javascript function.
  • Pressing the Get Hidden Listings button will call the Get Hidden Listings API method. It will retrive the hidden listings for the lead identified by lead-id or lead-email value specified in the text field. And, populate them in the Hidden Listing API Response text area. Please check the hiddenListingsApi.get javascript function.

Work with Listings API Methods

Test Listing API methods below
  • Pressing the Price Changes button will call the Retrieve Listing Price Change History API method by passing the values specified in the text fields. Please check the listings.priceChanges javascript function.
  • Pressing the More Info button will call the Submit More Info Request API method by passing the preset values in the requestInfo javascript function. Please check the listings.requestInfo javascript function.
  • Pressing the Schedule Showing button will call the Submit Schedule a Showing Request API method by passing the preset values in the scheduleShowing javascript function. Please check the listings.scheduleShowing javascript function.

Work with Agent API Method

Test Agent API method below:
  • Pressing the Find Agents will call the Find Agent API method. It will retrive the agents matching the search criteria specified in the findAgents javascript function. The matching agent records will be populated in the Agent API Response text area.

Work with Saved Search API Methods

Test saved search API methods below:
  • Pressing the Add Saved Search button will call the Add Saved Search API method by passing preset values in the savedSearchApi.add javascript function. On success, id of the newly added saved search will be populated in the Saved Search ID text field
  • Pressing the Update Saved Search will call the Update Saved Search API method. It will update the saved search identified by saved-search id value specified in the text field. The saved search will be updated by passing pre-set values in the savedSearchApi.update javascript function.
  • Pressing the Get Saved Search will call the Get Saved Search API method. It will retrive the details of saved search identified by saved search id value specified in the text field. And, populate them in the Saved Search API Response text area. Please check the savedSearchApi.get javascript function.
  • Pressing the Find Saved Searches will call the Find Saved Search API method. It will retrive the saved-searches matching the search criteria specified in the savedSearchApi.find javascript function. The matching saved-search records will be populated in the Saved Search API Response text area.
  • Pressing the Remove Saved Search button will call the Remove Saved Search API method by passing the values specified in the text field. Please check the savedSearchApi.remove javascript function.

Work with Office API Method

Test Office API method below:
  • Pressing the Find Offices will call the Find Office API method. It will retrive the offices matching the search criteria specified in the findOffices javascript function. The matching office records will be populated in the Office API Response text area.

Work with Phone Call API Methods

Test phone call API methods below:
  • Pressing the Get Phone Call will call the Get Phone Call API method. It will retrive the details of phone call identified by phone call id value specified in the text field. And, populate them in the Phone Call API Response text area. Please check the phoneCallAPi.get javascript function.

Work with WebHook API Methods

Test WebHook API methods below:

Work with Lead Tags API Method

Test Lead Tags API method below:
  • Pressing the Find Tags will call the Find Lead Tags API method. It will retrive the tags matching the search criteria specified in the below input fields. The matching tags records will be populated in the Lead Tags API Response text area.

Work with Users API Method

Test Users API method below:
  • Pressing the Get User will call the Get User API method. It will retrieve the details of lead identified by user-id value specified in the text field. And, populate them in the User API Response text area. Please check the getUser javascript function.
  • Pressing the Find Users will call the Find Users API method. It will retrieve the users matching the search criteria specified in the findUsers javascript function. The matching users records will be populated in the Users API Response text area.

Work with Lead Ponds API Method

Test Ponds API method below:
  • Pressing the Get Pond will call the Get Lead Pond API method. It will retrieve the details of lead pond identified by pond-id value specified in the text field. And, populate them in the Lead Ponds API Response text area. Please check the getLeadPond javascript function.
  • Pressing the Find Ponds will call the Find Lead Ponds API method. It will retrieve the ponds matching the search criteria specified in the findLeadPonds javascript function. The matching lead pond records will be populated in the Lead Ponds API Response text area.

Work with Lead Site Visit API Method

Test Lead Site Visit API method below:
  • Pressing the Add Site Visit button will call the Add Site Visit API method. It will add a site visit for the specified lead with the data passed in addLeadSiteVisit javascript function.