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

2/4/2016

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

11/14/2017

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

11/14/2017

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

11/14/2017

Added Phone Types to Lead Enumerations response.

12/04/2017

Added optional mls_id and mls_name to POST PropertyViewUpdate.

12/28/2017

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

5/21/2018

Added address to GET LeadProperties as a raw address string.

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"

  ]

}