BASICS

Brokermint provides an API that can be used to create, retrieve, update, and delete virtually all of the resources stored and manipulated by the system. This interface incorporates several elements of the REST tradition, making access to these actions consistent and intuitive.

In a nutshell: collections are accessed via a URL ending in a plural noun such as .../transactions, and to target an individual resource instance, append its numerical id .../transactions/85. To tell the API whether you are viewing, updating, or deleting the resource, make use of the “HTTP verbs,” GET, PUT, PATCH, and DELETE. To create a new resource, send a POST request to the collection’s URL .../transactions. The API’s response will be the content of the requested resource(s) or the data from the as-updated resource.

The Brokermint API allows client software to retrieve and operate on a user’s data by making HTTP requests to transfer JSON-encapsulated data.

Because the Brokermint API is accessible by anything that can make HTTP requests, not only can API client software be written in almost any available programming language, but people can interact with it directly through any tool that’s capable of making requests and receiving responses.

AUTHENTICATION

All API requests have to be authenticated with credentials for a specific Brokermint account, on whose behalf the request is being made. Credentials are currently a single per-account user API Token. The API Token has to be passed with each API request as “api_key” parameter.

REST API V1

This section of the Brokermint API documentation is a reference to all of the endpoints (URL paths) the API supports, the operations (request types) that can be performed with those endpoints, and the schema of the resource data encodings they return. It is applicable to API v1 only.

DATE AND TIME FIELDS

All date and time fields are represented by 13-digit unix timestamp (number of milliseconds since Unix epoch – 00:00:00 UTC on 1 January 1970)

ENDPOINTS

TRANSACTIONS

  • List: GET https://my.brokermint.com/api/v1/transactions
  •     – FILTERS
            – created_since (format: YYYY-MM-DD or 13-digit unix timestamp)
            – updated_since (format: YYYY-MM-DD or 13-digit unix timestamp)
            – closed_since (format: YYYY-MM-DD or 13-digit unix timestamp)
            – owned_by (format: TYPE-ID, i.g. “User-230” or “Contact-1245”)

  • Show: GET https://my.brokermint.com/api/v1/transactions/<transaction-id>
  • Create: POST https://my.brokermint.com/api/v1/transactions
  • Update: PUT https://my.brokermint.com/api/v1/transactions/<transaction-id>
  • Delete: DELETE https://my.brokermint.com/api/v1/transactions/<transaction-id>

RESOURCE: TRANSACTIONS

[
    {
        id: 12345,
        address: '11332 Demo St',
        city: 'San Diego',
        state: 'CA',
        zip: '92123',
        status: 'listing',
    },
    {
        id: 876,
        address: '1121 Atlantic st',
        city: 'Carlsbad',
        state: 'CA',
        zip: '92079',
        status: 'pending',
    },
    {
        ...
]

RESOURCE: TRANSACTION

{
    id: 12345,
    address: '11332 Demo St',
    city: 'San Diego',
    state: 'CA',
    zip: '92123',
    status: 'listed',
    transaction_type: 'traditional sale',
    price: 415000,
    representing: 'buyer',
    acceptance_date: 1428278400000,
    expiration_date: '',
    custom_attributes: [
        {
            name: 'description',
            label: 'Description',
            type: 'text',
            required: false,
            required_if_status: ''
        },
        {
            name: 'property_type',
            label: 'Property type',
            type: 'dropdown',
            required: false,
            required_if_status: '',
            options: [
                 'Not specified',
                 'Single family',
                 'Duplex',
                 'Multi unit',
                 'Condo',
                 'Townhouse',
                 'Mobile',
                 'Manufactured',
                 'Apartment',
                 'Land',
                 'Farm',
                 'Commercial',
                 'Other'
            ]
        },
        {
            name: 'file_date',
            label: 'File date',
            type: 'date',
            required: false,
            required_if_status: 'closed'
        }
    ],
    total_gross_commission: 6,
    created_at: 1428278400000,
    updated_at: 1429148200000,
    closed_at: 1440575080000,
    closing_date: 1443571200000,
    listing_date: '',
    listing_side_representer: {
      id: 341,
      type: 'Account'
    },
    buying_side_representer: {
      id: 12,
      type: 'Contact'
    },
    timezone: -7
}

* updated_at and created_at are read-only fields
** custom_attributes is a single field and subject for full replacement by received value
 

 

CONTACTS

  • List: GET https://my.brokermint.com/api/v1/contacts
  •     – FILTERS
            – created_since (format: YYYY-MM-DD or 13-digit unix timestamp)
            – updated_since (format: YYYY-MM-DD or 13-digit unix timestamp)
        – EXTRA PARAMS
            – full_info=1 shows full contact information
            – external_ids={list of ids divided by comma} – filters output by specified external id

  • Show: GET https://my.brokermint.com/api/v1/contacts/<contact-id>
  • Create: POST https://my.brokermint.com/api/v1/contacts
  • Update: PUT https://my.brokermint.com/api/v1/contacts/<contact-id>
  • Delete: DELETE https://my.brokermint.com/api/v1/contacts/<contact-id>

RESOURCE: CONTACTS

[
    {
        id: 342,
        first_name: 'Alex',
        last_name: 'Glen',
        email: 'alex@glen.com',
        contact_type: 'lead'
    },
    {
        id: 343,
        first_name: 'Michelle',
        last_name: 'Glen',
        email: 'michelle@glen.com',
        contact_type: 'client'
    },
    {
        ...
]

RESOURCE: CONTACT

{
    id: 870,
    contact_type: 'client',
    first_name: 'Andrew',
    last_name: 'McGreen',
    company: '',
    address: '',
    city: '',
    state: '',
    zip: '',
    email: '',
    phone: '',
    mobile_phone: '',
    fax: '',
    comments: [],
    created_at: 1429147920000,
    updated_at: 1429147920000,
    lead_source: '',
    custom_attributes: [],
    created_by: 226,
    private: true,
    external_id:'F4501'
}

 

 

 

TRANSACTION_PARTICIPANTS

  • List: GET https://my.brokermint.com/api/v1/transactions/<transaction-id>/participants
  • Show participant-contact: GET https://my.brokermint.com/api/v1/transactions/<transaction-id>/participants/contacts/<contact-id>
  • Show participant-user: GET https://my.brokermint.com/api/v1/transactions/<transaction-id>/participants/users/<user-id>
  • Create participant-contact: POST https://my.brokermint.com/api/v1/transactions/<transaction-id>/participants/contacts
  • Create participant-user: POST https://my.brokermint.com/api/v1/transactions/<transaction-id>/participants/users
  • Update participant-contact: PUT https://my.brokermint.com/api/v1/transactions/<transaction-id>/participants/contacts/<contact-id>
  • Update participant-user: PUT https://my.brokermint.com/api/v1/transactions/<transaction-id>/participants/users/<user-id>
  • Delete participant-contact: DELETE https://my.brokermint.com/api/v1/transactions/<transaction-id>/participants/contacts/<contact-id>
  • Delete participant-contact: DELETE https://my.brokermint.com/api/v1/transactions/<transaction-id>/participants/users/<user-id>

RESOURCE: TRANSACTION_PARTICIPANTS

[
    {
        id: 342,
        type: 'User',
        role: 'Agent',
        owner: true
    },
    {
        id: 342,
        type: 'Contact',
        role: 'Buyer',
        owner: false
    },
    {
        ...
]

RESOURCE: TRANSACTION_PARTICIPANT (CONTACT / USER)

    {
        id: 342,
        type: 'User',
        role: 'Agent',
        owner: true
    }

 

 

 

USERS

  • SSO Token: GET https://my.brokermint.com/api/v1/users/<user-id>/sso_token
  • List: GET https://my.brokermint.com/api/v1/users
  •     – FILTERS
            – created_since (format: YYYY-MM-DD or 13-digit unix timestamp)
            – updated_since (format: YYYY-MM-DD or 13-digit unix timestamp)
        – EXTRA PARAMS
            – full_info=1 shows full user information
            – external_ids={list of ids divided by comma} – filters output by specified external id

  • Show: GET https://my.brokermint.com/api/v1/users/<user-id>

RESOURCE: SSO TOKEN

{
        sso_token: "kDsnaiAaG3EQK7yxgo1dtYN9Tp7u101DxS0Rw6IhgC5HXN6FCMcTagaaqNeTZREBuPxIQn17ONf7ISSf6HeHO89PIv8e5lj6hfgpXx+U+/6CXUmq/polXNUBDGhqw9sAa0FmJn/DroFkRilLS1EY7DNxk1OUMyIrNPokBoZ87XY="
}

* To login a user into the brokermint website using sso token direct the user to the URL https://my.brokermint.com/users/sign_in_by_token?token=<token>

RESOURCE: USERS

[
    {
        id: 342,
        first_name: 'Alex',
        last_name: 'Bring',
        email: 'alex.bring@gmail.com'
    },
    {
        id: 401,
        first_name: 'Stacy',
        last_name: 'Lunetta',
        email: 'sl@lunetta.com'
    },
    {
        ...
]

RESOURCE: USER

{
        id: 222,
        first_name: "MARTY",
        last_name: "WILLON",
        email: "marty@mycoolrealty.com",
        phone: "",
        company: "",
        created_at: 1429147920000,
        updated_at: 1429147920000,
        role: "Agent",
        anniversary_date: null,
        avatar_url: "https://s3-us-west-2.amazonaws.com/brokermint.dev/avatars/7sdfd76f.gif,
        birthday: 261538320000,
        active: true",
        external_id: "SF02390U"
}

 

 

 

TRANSACTION COMMISSIONS

  • List: GET https://my.brokermint.com/api/v1/transaction/<transaction-id>/commissions

RESOURCE

[
  {
        id: 48037,
        item_index: 0,
        name: "",
        item_type: "award_distribution",
        side: "listing",
        payer_id: 1,
        payer_type: "Account",
        payee_id: 1,
        payee_type: "Account",
        sliding_base: null,
        sliding_base_period: null,
        calculated_dollar_amount: 0,
        minimum_dollar_amount: 0,
        pay_to: {
            name: "",
            address: "",
            city: "",
            state: "",
            zip: ""
        },
        custom_sliding_base_period: [],
        sliding_base_amount: null,
        tags: ["1099", "extra comm"],
        tiers: [
            {
                id: 20340,
                commission_item_id: 48037,
                low_limit: 0,
                value: 100,
                uom: "% of tgc",
            }
        ],
        payee_name: "Brokermint LLC (Agent)",
        payee_first_name: "",
        payee_last_name: "",
        payer_name: "Brokermint LLC (Agent)"
  },
  {
        id: 48036,
        item_index: 0,
        name: "",
        item_type: "tgc",
        side: null,
        payer_id: 1,
        payer_type: "Account",
        payee_id: 1,
        payee_type: "Account",
        sliding_base: null,
        sliding_base_period: null,
        calculated_dollar_amount: 0,
        minimum_dollar_amount: 0,
        pay_to: {},
        custom_sliding_base_period: [],
        sliding_base_amount: null,
        tags: ["1099", "extra comm"],
        tiers: [
            {
                id: 20339,
                commission_item_id: 48036,
                low_limit: 0,
                value: 0,
                uom: "$",
            }
        ],
        payee_name: "Brokermint LLC (Agent)",
        payee_first_name: "",
        payee_last_name: "",
        payer_name: "Brokermint LLC (Agent)"
  }
  ...
]

 

 

 

TRANSACTION BACKUP

  • List: GET https://my.brokermint.com/api/v1/backups
  •     – FILTERS
            – completed_since (format: YYYY-MM-DD or 13-digit unix timestamp)
            – exclude_backup_ids (format: exclude_backup_ids=23,44,67)

  • Show: GET https://my.brokermint.com/api/v1/transactions/<transaction-id>/backup

RESOURCE: TRANSACTION BACKUPS

{
        id: 3415,
        completed_at: 1429147920000,
        file_name: '3998_Indiana_St,_Carlton,_MA,_90210.zip',
        link: https://s3-eu-central-1.amazonaws.com/BUCKET/FILE
}

RESOURCE: TRANSACTION BACKUP

{
        link: https://s3-eu-central-1.amazonaws.com/BUCKET/FILE
}

* Download backup link expires in 30 minutes
** It returns 404 if there is no available backup file for the transaction
 

 

 

TRANSACTION DOCUMENTS

  • Create: POST https://my.brokermint.com/api/v1/transactions/<transaction-id>/documents
  • Show: GET https://my.brokermint.com/api/v1/transactions/<transaction-id>/documents/<document-upload-request-id>

RESOURCE: TRANSACTION DOCUMENT: CREATE REQUEST

{
        transaction_id: 4398,
        name: "Listing agreement.pdf",
        content_type: "content_type",   // get defaulted into "text/plain"
        path: "https://s3-eu-central-1.amazonaws.com/BUCKET/FILE"
}

RESOURCE: TRANSACTION DOCUMENT: SHOW RESPONSE

{
        id: 112,
        name: "Listing agreement.pdf",
        upload_status: "processing"
}

* Create – creates a document upload request and returns its ID
* Show – returns status of document upload request (“processing”, “complete” or 404 if request doesn’t exist)
 

 

 

INCOMING TRANSACTION

  • Create: POST https://my.brokermint.com/api/v1/incoming_transactions

RESOURCE: INCOMING TRANSACTION: CREATE REQUEST

{
        source_id: 'salesforce.com',    // unique identifier of the source
        transactions: [
            {
                id: 'SF098323',   // id of an original entity in the source system
                agent_id: 'a760',   // id of assigned agent
                agent_name: 'John Doe',
                address: '12661 Bay Drive 6-A',
                city: 'Harbor Islands',
                state: 'Florida',
                zip: '33154',
                status: 'listing',
                price: 950000,
                listing_date: 1473683400000,
                expiration_date: 1473683400000,
                acceptance_date: 1473683400000,
                closing_date: 1473683400000,
                transaction_type: 'traditional sale',
                custom_attributes: {
                    'Bedrooms': '2',
                    'Total baths': '2',
                    'Legal description': 'SLAND MANOR CONDO - SOUTH TOWER UNIT 6-A',
                    'Property type': 'Condo',
                    'Zoning': 'full',
                    'Showing phone': '(461) 431-7643',
                    'Lockbox':' 'yes',
                    'Owner phone': '(461) 431-7643',
                    'SQFT': '1640',
                    'Agent remarks': 'Amazing 2/2 condo in prest...',
                    'Description': 'Amazing 2/2 condo in prestig...',
                    'MLS #': 'A10145294',
                    'Area': '22',
                    'Owner name': 'Andrea Coolison',
                    'County': 'Miami-Dade County',
                    'Showing instructions': 'Call Listing Agent',
                    'APN': '130',
                    'Public remarks': 'Fully renovated building sits on the canal...'
                }
            },
            {
                // transaction #2 ...
            }
        ]

}

 

 

 

REPORTS

  • List: GET https://my.brokermint.com/api/v1/reports
  • Data: GET https://my.brokermint.com/api/v1/reports/<report-id>
  • Filters: GET https://my.brokermint.com/api/v1/reports/<report-id>/filters

RESOURCE: REPORTS

[
    {
        name: 'Agent profile report',
        id: 'agents_profile'
    },
    {
        name: 'Cancelled sales report',
        id: 'cancelled_sales'
    },
    {
        // report #3 ...
    }
]

RESOURCE: REPORT DATA

[
    {
        id: 53,
        account_id: 1,
        listing_date: 1410505200000,
        expiration_date: 1413097200000,
        created_at: 1410508371000,
        address: '3498 Synos st.',
        city: 'Los Angeles',
        state: 'CA',
        zip: '90210',
        price: 200000,
        transaction_type: 'traditional sale'
    },
    {
        // record #2 ...
    }
]

RESOURCE: REPORT FILTERS

[
    {
        dynamic: true,
        column: 'location',
        options: [
            {
                val: '*',
                text: 'all locations',
            },
            {
                val: 'Test location',
                text: 'Test location'
            },
            {
                val: 'rrr eee',
                text: 'rrr eee'
            }
        ]
    },
    {
        column: 'expiration_date',
        type: 'date',
        comparison: 'range',
        options: [
            {
                val: '0-32945558400000',
                text: 'all expiration dates'
            }
            {
                val: '0-1475539199999',
                text: 'expired'
            }
            {
                val: '1475305200000-1477983599999',
                text: 'expiring this month'
            }
            {
                val: '1477983600000-1480579199999',
                text: 'expiring next month'
            }
            {
                val: '1475305200000-1485935999999',
                text: 'expiring within next 3 month'
            }
        ]
    },
    {
        // filter #3 ...
    }
]

Do you have questions or would like to access our API? Contact us and we will help!