4faLwtjP0xY3PEe1Tu5MxHn2kCzoIAqAwlMZOmc1SXlAAN5vQIQlgff0X6NAH-e87MSxNA=w1332-h639

Boston Logic Platform API Documentation

This document includes the documentation for the API endpoints for the Boston Logic Platform. Boston Logic will provide you with an API Key that you should keep private. All endpoints support a JSON response.

Documentation Updates

Date

Description

09/25/2019

Added Development and DevelopmentCategory endpoints

Nested under the Development endpoint, added DevelopmentAddress, DevelopmentAgent, DevelopmentAreaProfile, DevelopmentCategory, DevelopmentFloorPlans, DevelopmentListingSheet, DevelopmentPicture, and DevelopmentPrice endpoints.

09/13/2019

Added additional `property` details (location details, price, type, status, etc) to some endpoints: EmailFriend, FavoriteProperty, Inquiry, Showing, PropertyNote, PropertyView

09/13/2019

Added `signup_fields` key to Leads `show` response, containing price_range, contact_method, timeline, and where_heard

09/13/2019

Added `user_id` to Team, Agent & Employee response

07/10/2019

Added to SavedSearch response data - new_listing, status_changed, price_changed, open_house_changes, any_changes

06/12/2019

Update DynamicForm with form_sections

04/04/2019

Added resource paths where available

Updated showings to return time in UTC

03/22/2019

Added referral_source_domain to Leads endpoints

02/22/2019

Added MarketReportUpdate resources that are nested under MarketReport

02/15/2019

Update SearchObject to accept array of property types/subtypes/statuses

01/25/2019

Update MarketReportUpdate documentation with field max_price

01/11/2019

Add SavedSearch Data endpoint

12/31/2018

Add Lead Search creation endpoint

12/18/2018

Add more attributes & UTM param to lead details response

12/7/2018

New MarketReportUpdate resource

12/6/2018

Added email filters on agents and employees list endpoints

8/24/2018

Added includes parameter to the agents/index endpoint. With the value, agent_mls_ids, we will include that data in the response for each agent

8/1/2018

Added MarketReport endpoints

7/10/2018

Added DynamicForm & FormSubmission endpoints

5/29/2018

Added property_address to GET PropertyViews & FavoriteProps as raw string. Added agent_id & office_id as integer & employee_name as raw string to GET ContactForms.

5/21/2018

Added property_address to GET LeadProperties as a raw address string.

5/18/2018

Added filter by email to GET Leads

12/28/2017

Added mls_id and mls_name to GET PropertyNote and mls_id to GET PropertyView.

12/04/2017

Added optional mls_id and mls_name to POST PropertyViewUpdate.

11/14/2017

Added Phone Types to Lead Enumerations response.

11/14/2017

Added agent accreditations to the Agents post, patch, and get agent response.

11/14/2017

Added agent_id, team_id, owner_id, and owner_type to Lead responses.

2/4/2016

Initial release of Offices, Agents, Employees and Teams endpoints.

Authentication & Security

Boston Logic support staff will provide you with the domain name and an API Key that you will use in combination to authenticate for API calls.  The API Key should be kept private for security purposes.  Any person with your API Key can make changes to your system including creating, updating and deleting records. If you feel your API Key has been compromised or you have lost the key please contact our support staff (help@bostonlogic.com) and they will remove your old key from our system and issue you a new key.  When you make API requests you will pass an HTTP Header with the name “X-BL-API-Key” and the value will be the API Key that was provided.  The combination of the API Key and the domain the HTTP API request was received for will be used to authenticate the request.

Requests and Responses

API requests will only respond to JSON requests.  Each API call should pass an HTTP Header of “Content-Type: application/json” in addition to the “X-BL-API-Key: xxxxxxxxxx” HTTP Header. If the request is an HTTP Post the body of the request should be in JSON format.  We will define the options for the query params on GET requests or the body on POST, PATCH and DELETE requests. Also, we will define the JSON objects that will be used in the body of the response for each API endpoint defined below.

GET requests are used to fetch the list of records or an individual records by id.
POST requests are used to create a new record.
PATCH requests are used to update a record (PUT is also supported however PATCH is the preferred type).
DELETE requests are used to delete a record.

Example request via cURL:

curl -H "Content-Type: application/json" -H "X-BL-API-Key: xxxxxxxxxx" -X GET http://www.domain.com/api/v2/offices

All responses will return a json object in the body.  Responses will always contain a "status" attribute that will be either "success" or "failure" and a "message" attribute.  Successful requests will also contain a "data" attribute that could either be an array of objects or a single object depending on the request.  Failed requests will not contain the "data" attribute, they will contain an "errors" attribute that will be an array of error messages that describe why the request failed.  The status code of the response will not be returned in the body of the response but will be available in the response headers.  See the "Appendix A: Error Codes" for the definition of error codes.  The following is an example of the response body for an errored request:

{

  "status" : "failure",

  "message" : "Office not created",

  "errors" : [

    "Office name must be unique"

  ]

}

Permissions

Each API key will be predefined to a set of permissions per resource. The permissions include Read, Write, and Delete access. API Keys could have different levels of access for each type, for example, Read only access to Offices, but Read, and Write for Agents and Employees.  An unauthorized request would result in a response with a status of 401 and the body of the response would be similar to the following:

{

  "status" : "unauthorized",

  "message" : "Office not created",

  "errors" : [

    "API Key does not have permissions to create offices"

  ]

}