A WordPress API library for accessing the IDX Broker API.

version 1.1.0
link API Documentation
package WP-API-Libraries\WP-IDX-Broker-API
author Santiago Garza
author imFORZA

 Methods

__construct function.

__construct(string $api_key, string $partner_key = null, string $outputtype = 'json', string $apiversion = '1.4.0') : void
access public

Parameters

$api_key

string

IDX Broker API key.

$partner_key

string

Ancillarykey.

$outputtype

string

XML or JSON.

$apiversion

string

Version of API to use.

Builds the request for the API call to IDX Broker.

build_request(string $route, array $fields = array()) : \IdxBrokerAPI
fluent This method is part of a fluent interface and will return the same instance

Parameters

$route

string

The route to make the call to.

$fields

array

Array containing the http method and body of call. Optional for GET requests.

Returns

\IdxBrokerAPIIdxBrokerAPI Object.

Remove a clients supplemental property.

delete_clients_supplemental(string $listing_id) : mixed
API

This method is to be used at your own risk. We will NOT be held accountable for programmatic errors in your code or the improper use of search values or options within said values resulting in deletion of supplemental properties.

api DELETE
see Documentation.

Parameters

$listing_id

string

The listingID of a supplmental property.

Returns

mixedNothing on success.

Remove a clients wrapper cache.

delete_clients_wrappercache() : mixed
API

This method is to be used at your own risk. We will NOT be held accountable for programmatic errors in your code or the improper use of search values or options within said values resulting in deletion of supplemental properties.

api DELETE
see Documentation.

Returns

mixedNothing on success.

Remove a lead system wide.

delete_lead(integer $lead_id) : mixed
API

This method is to be used at your own risk. We will NOT be held accountable for programmatic errors in your code or the improper use of search values or options within said values resulting in deletion of leads.

api DELETE
see Documentation.

Parameters

$lead_id

integer

The ID of a lead.

Returns

mixedNothing on success.

Remove a lead note.

delete_leads_note(integer $lead_id, integer $note_id) : mixed
API
api DELETE
see Documentation.

Parameters

$lead_id

integer

The ID of a lead.

$note_id

integer

The ID of the note to delete.

Returns

mixedNothing on success.

Remove a lead saved property.

delete_leads_property(integer $lead_id, integer $property_id) : mixed
API
api DELETE
see Documentation.

Parameters

$lead_id

integer

The ID of a lead.

$property_id

integer

The ID of a property to delete.

Returns

mixedNothing on success.

Get your account type.

get_clients_accounttype() : string
API
api GET
see Documentation.

Returns

stringAccount type.

View agent information on a multi-user account.

get_clients_agents(array $args = array()) : array
API
api GET
see Documentation.

Parameters

$args

array

Query args to send in to API call.

Returns

arrayAll agents on the account or those matching filter values.

Get the default api version.

get_clients_apiversion() : array
API
api GET
see Documentation.

Returns

arrayThe default api version.

Returns the cities available in each of a client's city lists. Since a client can build any number of city lists this method requires the ID of which list you want to view. To get a list of all city lists available do not send the primary request ID. The default list on each account has the id combinedActiveMLS

get_clients_cities(string $list_id = '', string|array $rf = '') : array
API
api GET
see Documentation.

Parameters

$list_id

string

City list id.

$rf

stringarray

A string or an array of strings of return field names.

Returns

arrayAll cities in a given list or, if no list ID is provided, a list of list IDs.

Returns the IDs and names for each of a client's city lists including MLS city lists. To get the list of all city lists available do not send the primary request ID. The default list on each account has the ID combinedActiveMLS

get_clients_citieslistname() : array
API
api GET
see Documentation.

Returns

arrayA list of city list IDs and names.

Returns the counties available in each of a client's county lists. Since a client can build any number of county lists this method requires the ID of which list you want to view. To get a list of all county lists available do not send the primary request ID. The default list on each account has the id combinedActiveMLS.

get_clients_counties(string $list_id = '', string|array $rf = '') : array
API
api GET
see Documentation.

Parameters

$list_id

string

If no ID is given a list of IDs is returned.

$rf

stringarray

A string or an array of strings of fields to return in the output..

Returns

arrayAll counties in a given list or, if no list ID is provided, a list of list IDs.

Returns the IDs and names for each of a client's counties lists including MLS counties lists. To get the list of all counties lists available do not send the primary request ID. The default list on each account has the ID combinedActiveMLS

get_clients_countieslistname() : array
API
api GET
see Documentation.

Returns

arrayA list of counties list IDs and names

Returns the allowed returnable fields for a given listingID.

get_clients_listallowedfields(string $idx_id, string $listing_id) : array
API

Note: Valid ancillarykey is required in the request header.

api GET
see Documentation.

Parameters

$idx_id

string

The idxID of MLS.

$listing_id

string

The listing ID.

Returns

arrayList of fields that are returnable for the listingID.

This is a simple, access anywhere, method for getting a list of all API components available.

get_clients_listcomponents() : array
API
api GET
see Documentation.

Returns

arrayAll available APIs/Components.

Returns the detailed information for a given listingID.

get_clients_listing(string $idx_id, string $listing_id, string $rf = '', boolean $disclaimers = '') : array
API

Note: Valid ancillarykey is required in the request header.

api GET
see Documentation.

Parameters

$idx_id

string

The idxID of MLS.

$listing_id

string

The listing ID.

$rf

string

Array of fields to return in the output.

$disclaimers

boolean

Include MLS disclaimer/courtesy in the response.

Returns

arrayList of fields that are returnable for the listingID.

A simple method for listing all available methods in the current API component. This method will also list which request methods (GET, PUT, POST, or DELETE) are supported by each method in addition to each method status.

get_clients_listmethods() : array
API
api GET
see Documentation.

Returns

arrayBasic information about all available methods in this API.

View all offices on a mutli-user account.

get_clients_offices(array $args = array()) : array
API
api GET
see Documentation.

Parameters

$args

array

Query args to send in to API call.

Returns

arrayAll offices on the account or those matching filter values.

Returns the postalcodes available in each of a client's postalcode lists. Since a client can build any number of postalcode lists this method requires the ID of which list you want to view. To get a list of all postalcode lists available do not send the primary request ID. The default list on each account has the id combinedActiveMLS.

get_clients_postalcodes(string $list_id = '', array $args = array()) : array
API

Note: This method was previously called as "zipcodes" but was changed to keep API format more international. Calls to "zipcodes" will be forwarded to "postalcodes" and "zipcodes" is listed as deprecated in the method list.

api GET
see Documentation.

Parameters

$list_id

string

If no ID is given a list of IDs is returned.

$args

array

Query args to send in to API call.

Returns

arrayAll postalcodes in a given list or, if no list ID is provided, a list of list IDs.

Returns the IDs and names for each of a client's postalcode lists including MLS postalcode lists. To get the list of all postal code lists available do not send the primary request ID. The default list on each account has the ID combinedActiveMLS

get_clients_postalcodeslistname() : array
API
api GET
see Documentation.

Returns

arrayA list of city list IDs and names

Returns the search results for a provided saved link ID.

get_clients_properties(string $saved_links_id, array $args = array()) : array
API

Note: Valid ancillarykey is required in the request header.

api GET
see Documentation.

Parameters

$saved_links_id

string

The ID of a client's saved link.

$args

array

Query args to send in to API call.

Returns

arrayAll property results for a provided Saved Link ID.

Performs search and returns the results.

get_clients_searchquery(array $args = array()) : array
API

Note: Valid ancillarykey is required in the request header.

api GET
see Documentation.

Parameters

$args

array

Query args to send in to API call.

Returns

arrayAll available APIs/Components.

Returns a basic set of information for all of the client's sold and pending properties. That is, those that have been removed from their MLS data.

get_clients_soldpending(array $args = array()) : array
API
api GET
see Documentation.

Parameters

$args

array

Query args to send in to API call.

Returns

arraySold/pending properties on the account.

Returns a basic set of information for all of the client's supplemental (non-MLS) properties.

get_clients_supplemental(array $args = array()) : array
API
api GET
see Documentation.

Parameters

$args

array

Query args to send in to API call.

Returns

arraySupplemental properties on the account.

Gather all the URLs for javascript widgets on the user's account. These widgets can then be placed on the user's main site via the included URLs.

get_clients_widgets(string|array $rf = '') : array
API
api GET
see Documentation.

Parameters

$rf

stringarray

String or array of fields to return in the output.

Returns

arrayThe name, unique ID and URL for all javascript widgets that have been created on the user's account.

Returns the zipcodes available in each of a client's zipcode lists. Since a client can build any number of zipcode lists this method requires the ID of which list you want to view. To get a list of all zipcode lists available do not send the primary request ID. The default list on each account has the id combinedActiveMLS.

get_clients_zipcodes(string $list_id = '', string|array $rf = '') : array
API
api GET
see Documentation.

Parameters

$list_id

string

If no ID is given a list of IDs is returned.

$rf

stringarray

String or array of fields to return in the output.

Returns

arrayAll zipcodes in a given list or, if no list ID is provided, a list of list IDs..

Get domain used for displaying IDX pages.

get_idx_domain() : array

Returns

arrayArray containing domain 'scheme' & 'url'.

Get information for one or multiple leads.

get_leads(string $lead_id = '', array $args = array()) : array
API
api GET
see Documentation.

Parameters

$lead_id

string

If no ID is given a list of IDs is returned.

$args

array

Query args to send in to API call.

Returns

arrayIf a lead ID is provided detailed information about that lead is returned. Otherwise simple information about all leads is returned.

This is a simple, access anywhere, method for getting a list of all API components available.

get_leads_listcomponents() : array
API
api GET
see Documentation.

Returns

arrayAll available APIs/Components.

This is a simple, access anywhere, method for getting a list of all API components available.

get_leads_listmethods() : array
API
api GET
see Documentation.

Returns

arrayBasic information about all available methods in this API.

Get notes for a lead.

get_leads_note(integer $lead_id, integer $note_id = '', array $args = array()) : array
API
api GET
see Documentation.

Parameters

$lead_id

integer

The ID of a lead.

$note_id

integer

The ID of the note to delete.

$args

array

Query args to send in to API call.

Returns

arrayLead note information. If no note ID is sent all notes for the lead are returned. If a note ID is passed only the one note is returned.

Get saved properties for a lead.

get_leads_property(integer $lead_id, integer $property_id = '', array $args = array()) : array
API
api GET
see Documentation.

Parameters

$lead_id

integer

The ID of a lead.

$property_id

integer

The ID of a lead's saved property.

$args

array

Query args to send in to API call.

Returns

arrayIf no property ID is passed all properties are returned. If a property ID is passed only the information for that specified property is returned.

Get traffic history for a specified lead.

get_leadtraffic(string $lead_id, array $args = array()) : array
API

For bandwidth and memory considerations there is a limit of 5,000 on the number of lead traffics that can be returned in any single request.

api GET
see Documentation.

Parameters

$lead_id

string

If no ID is given a list of IDs is returned.

$args

array

Query args to send in to API call.

Returns

arrayThe applicable client account ID, date, lead ID, IP , page, and referrer.

Gives the date and time a particular MLS was last downloaded, processed and the last time images gathering was completed.

get_mls_age(string $idx_id, string|array $rf = '') : array
API

Note: dates/times given are UTC.

api GET
see Documentation.

Parameters

$idx_id

string

Format: x000 .

$rf

stringarray

String or array of fields to return in the output.

Returns

arrayAn array of timestamps for last downloaded, last processes and last images gathered.

This method provides all of the IDX IDs and names for all of the paperwork approved MLSs on the client's account.

get_mls_approvedmls(string|array $rf = '') : array
API

Note: This method was previously camelcased as "approvedMLS" but was made lower case to fit the API naming convention. Calls to "approvedMLS" will be forwarded to "approvedmls" and "approvedMLS" is listed as deprecated in the method list.

api GET
see Documentation.

Parameters

$rf

stringarray

String or array of fields to return in the output.

Returns

arrayA list of IDs and names for all MLSs approved for display on the client account.

All cities represented in the current set of MLS data are available from this method. The output can be filtered using additional GET parameters.

get_mls_cities(string $idx_id, string $filter_field = '', string $filter_value = '', string|array $rf = '') : array
API
api GET
see Documentation.

Parameters

$idx_id

string

Format: x000 .

$filter_field

string

The field to use when filtering output. Allowed values: "cityID, cityName, stateAbrv, mlsPtID".

$filter_value

string

The value by which to filter. Conditional on use of filterField.

$rf

stringarray

String or array of fields to return in the output.

Returns

arrayAvailable cities along with applicable city ID, property type, and state as well as a count of the number of occurrences for each value.

All counties represented in the current set of MLS data are available from this method. The output can be filtered using additional GET parameters.

get_mls_counties(string $idx_id, string $filter_field = '', string $filter_value = '', string|array $rf = '') : array
API
api GET
see Documentation.

Parameters

$idx_id

string

Format: x000.

$filter_field

string

The field to use when filtering output. Allowed values: "countyID, countyName, stateAbrv, mlsPtID".

$filter_value

string

The value by which to filter. Conditional on use of filterField.

$rf

stringarray

String or array of fields to return in the output.

Returns

arrayAvailable counties along with applicable county ID, property type, and state as well as a count of the number of occurrences of each value.

This is a simple, access anywhere, method for getting a list of all API components available.

get_mls_listcomponents() : array
API
api GET
see Documentation.

Returns

arrayAll available APIs/Components

A simple method for listing all available methods in the current API component. This method will also list which request methods (GET, PUT, POST, or DELETE) are supported by each method in addition to each method status.

get_mls_listmethods() : array
API
api GET
see Documentation.

Returns

arrayBasic information about all available methods in this API.

All postal codes represented in the current set of MLS data are available from this method. The output can be filtered using additional GET parameters.

get_mls_postalcodes(string $idx_id, string $filter_field = '', string $filter_value = '', string|array $rf = '') : array
API
api GET
see Documentation.

Parameters

$idx_id

string

Format: x000.

$filter_field

string

The field to use when filtering output. Allowed values: "id, stateAbrv, mlsPtID".

$filter_value

string

The value by which to filter. Conditional on use of filterField.

$rf

stringarray

String or array of fields to return in the output.

Returns

arrayAvailable postalcodes along with applicable property type and state as well as a count of the number of occurrences of each value.

The sum total of properties listed in a given MLS as well as sums for each property type in the MLS.

get_mls_prices(string $idx_id, string|array $rf = '') : array
API
api GET
see Documentation.

Parameters

$idx_id

string

Format: x000.

$rf

stringarray

String or array of fields to return in the output.

Returns

arrayA multidimensional array with the total sum and the sum for each property type.

Gives a total number of listings available for a given city, county, or zipcode.

get_mls_propertycount(string $idx_id, string $count_type = '', integer $count_specifier = '') : integer
API
api GET
see Documentation.

Parameters

$idx_id

string

Format: x000.

$count_type

string

Specify if you are looking for the count of a city, county, or zipcode. Allowed values: "city", "county", "zipcode".

$count_specifier

integer

The numeric city ID, county ID, or zipcode for which you want to get a property count.

Returns

integerAn integer count of the number of properties.

Gives the property type information for all types that are available on a given MLS.

get_mls_propertytypes(string $idx_id, string $filter_field = '', string $filter_value = '', string|array $rf = '') : array
API
api GET
see Documentation.

Parameters

$idx_id

string

Format: x000.

$filter_field

string

The field to use when filtering output. Allowed values: "mlsPtID, mlsPropertyType".

$filter_value

string

The value by which to filter. Conditional on use of filterField.

$rf

stringarray

String or array of fields to return in the output.

Returns

arrayAn array of property type information including MLS property type ID, MLS property type name, parent property type, and subtypes.

All the fields in a given MLS that are currently allowed to be searched according to MLS guidelines.

get_mls_searchfields(string $idx_id, string $filter_field = '', string $filter_value = '', string|array $rf = '') : array
API
api GET
see Documentation.

Parameters

$idx_id

string

Format: x000.

$filter_field

string

The field to use when filtering output. Allowed values: "mlsPtID, parentPtID".

$filter_value

string

The value by which to filter. Conditional on use of filterField.

$rf

stringarray

String or array of fields to return in the output.

Returns

arrayAn array containing all MLS fields that are searchable according to MLS rules and IDX guidelines. Array contains the field's name (which is the field to be used as a key when performing a search), the display name (as should be displayed in a search form), and both the mlsPtID and parentPtID to which the field belongs.

Field values in a given MLS that are currently allowed to be searched according to MLS guidelines.

get_mls_searchfieldvalues(string $idx_id, integer $mls_pt_id, string $name) : array
API
api GET
see Documentation.

Parameters

$idx_id

string

Format: x000.

$mls_pt_id

integer

The IDX assigned ID of the MLS property type(s). See the propertytypes method in this API/Component for a lookup of property type IDs.

$name

string

Mls field name - the IDX assigned name of the MLS field name. See the searchfields for the list of searchable fields.

Returns

arrayAn array containing all the values for the given mls field.

All zip codes represented in the current set of MLS data are available from this method. The output can be filtered using additional GET parameters.

get_mls_zipcodes(string $idx_id, string $filter_field = '', string $filter_value = '', string|array $rf = '') : array
API
api GET
see Documentation.

Parameters

$idx_id

string

Format: x000.

$filter_field

string

The field to use when filtering output. Allowed values: "mlsPtID, parentPtID".

$filter_value

string

The value by which to filter. Conditional on use of filterField.

$rf

stringarray

String or array of fields to return in the output.

Returns

arrayAvailable zipcodes along with applicable property type and state as well as a count of the number of occurrences of each value.

Get a list of all agents for your clients.

get_partners_aggregatedagents(array $args = array()) : array
API
api GET
see Documentation
access public

Parameters

$args

array

Query args to send in to API call.

Returns

arrayAll available agents.

Get a list of featured MLS properties.

get_partners_aggregatedfeatured(array $args = array()) : array
API
api GET
see Documentation
access public

Parameters

$args

array

Query args to send in to API call.

Returns

arrayList of featured MLS properties for each client.

Get a list of all leads.

get_partners_aggregatedleads(array $args = array()) : array
API

For bandwidth and memory considerations there is a limit of 5,000 on the number of leads that can be returned in any single request. Even if a full week of data is requested this limit will only be encountered if your clients have a combined average 30+ leads created, updated, or active per hour (as such it will be most common when requesting leads based on last property update date). If this limit is exceeded a 413 -Requested Entity Too Large error is returned. If encountered a smaller interval will need to be used.

api GET
see Documentation
access public

Parameters

$args

array

Query args to send in to API call.

Returns

arrayThe applicable client account ID, lead ID, first name, last name, email address, address, city, state/province, country, zipCode, phone number, ID of the agent assigned, email format (html or plain text), disabled status (y/n), allowed to log in to their account (y/n), will receive property updates (y/n), subscribe date, last edited, last login date, last property update date, last activity type, and last activity date.

Get a list of all leads traffic history.

get_partners_aggregatedleadtraffic(array $args = array()) : array
API

Note: For bandwidth and memory considerations there is a limit of 5,000 on the number of searches that can be returned in any single request.

api GET
see Documentation
access public

Parameters

$args

array

Query args to send in to API call.

Returns

arrayThe applicable client account ID, date, lead ID, IP , page, and referrer.

This method gives the status for all MLS listings (not supplemental) broken down by client account ID. This includes sold/pending listings with an unknown status which are not usually returned by sold/pending api methods.

get_partners_aggregatedlistingstatus(array $args = array()) : array
API

This is helpful if you need to know when previously gathered featured properties have left the market.

api GET
see Documentation
access public

Parameters

$args

array

Query args to send in to API call.

Returns

arrayMLS listings along with their statuses.

Get a list of all lead saved properties.

get_partners_aggregatedproperties(array $args = array()) : array
API

For bandwidth and memory considerations there is a limit of 5,000 on the number of searches that can be returned in any single request.

api GET
see Documentation
access public

Parameters

$args

array

Query args to send in to API call.

Returns

arraySearch ID, the applicable client account ID, lead ID, page ID, search name, search parameters, lead will receive property updates (y/n), created date, last edited date.

Get a list of all lead saved searches.

get_partners_aggregatedsearches(array $args = array()) : array
API

For bandwidth and memory considerations there is a limit of 5,000 on the number of searches that can be returned in any single request.

api GET
see Documentation
access public

Parameters

$args

array

Query args to send in to API call.

Returns

arraySearch ID, the applicable client account ID, lead ID, page ID, search name, search parameters, lead will receive property updates (y/n), created date, last edited date.

Get a list of sold/pending MLS properties.

get_partners_aggregatedsoldpending(array $args = array()) : array
API

Output fields may or may not be populated depending on how the information was entered into the IDX system.

We are planning to add the ability to query by the date the property left the market and, for sold listings, the date it was sold in a future update.

api GET
see Documentation
access public

Parameters

$args

array

Query args to send in to API call.

Returns

arrayList of soldpending properties for each client.

Get a list of supplemental (non-MLS) properties.

get_partners_aggregatedsupplemental(array $args = array()) : array
API

Output fields may or may not be populated depending on how the information was entered into the IDX system.

api GET
see Documentation
access public

Parameters

$args

array

Query args to send in to API call.

Returns

arrayList of supplemental (non-MLS) properties for each client.

Get the default api version.

get_partners_apiversion() : string
API
api GET
see Documentation
access public

Returns

stringThe default api version.

List of available MLSs with their fees.

get_partners_availablemls() : array
API
api GET
see Documentation
access public

Returns

arrayList of available MLSs with their fees.

A list of clients available to a given partner. The list of clients can be filtered by GET values.

get_partners_clients(array $args = array()) : array
API
api GET
see Documentation
access public

Parameters

$args

array

Query args to send in to API call.

Returns

arrayThe account ID, company name, display name, account status, and current API key of each client or clients matching the filter values.

This is a simple, access anywhere, method for getting a list of all API components available.

get_partners_listcomponents() : array
API
api GET
see Documentation
access public

Returns

arrayAll available APIs/Components.

A simple method for listing all available methods in the current API component. This method will also list which request methods (GET, PUT, POST, or DELETE) are supported by each method in addition to each method status.

get_partners_listmethods() : array
API
api GET
see Documentation
access public

Returns

arrayBasic information about all available methods in this API.

Gives the names and IDs of all available property types. This method differs from the property type lookup method in the client API component in that it can look up property types for any active Platinum MLS, not just those for which the client is a member.

get_partners_propertytypes(string $idx_id = '', string|array $rf = '') : array
API

Note: The IDX property types are those used for multiple MLS searches and are equivalent to the property types used in the original IDX product. The data returned is structured as:

idxPropTypes

  • parentPtID - the numeric ID for IDX property types; seen as parentPtID when retrieving property information.
  • pt - the 2 to 3 letter abbreviated property type as seen in multiple MLS search queries as the variable pt.
  • propertyType - the human friendly property type name. [idxID] in the format a### (this element will not be present at all if no IDX ID is provided)
  • mlsPtID - the numeric ID given to MLS property types; seen as parentPtID when retrieving property information and in single MLS search queries as the variable pt.
  • propertyType - the human friendly property type name.
  • parentPtID - the ID of the IDX property type to which this MLS property type belongs.
api GET
see Documentation

Parameters

$idx_id

string

The IDX ID of the MLS from which you need property type information. If no IDX ID is specified then only the IDX property types (parentPtID) will be returned.

$rf

stringarray

A string or an array of strings of return field names.

Returns

arrayAn array containing the IDX property types and, if an IDX ID has been provided, the MLS's property types and their IDs.

Get IDX account and agent/office add-on pricing.

get_specialtypartner_pricing() : array
API

Note: This method is only available for specialty billing partners.

api GET
see Documentation.

Returns

arrayIDX account and agent/office add-on pricing.

Update leads in batches of up to 100 per request.

post_bulkleads(array $data = array()) : mixed
API

Note: Each lead field should be passed as an indexed array starting at and going to, at most, 100. There must not be any gaps. LeadID is required for each lead to be updated

Data Example: $data = array( 'id[0]' = 1, 'firstName[0]' => 'John', 'lastName[0]' => 'Doe', 'email[0]' => 'john@example.com', 'id[1]' = 2, 'firstName[1]' => 'Aaron', 'lastName[1]' => 'Aaronson', 'email[1]' => 'aaron@example.com' );

api POST
see Documentation.

Parameters

$data

array

Supplemental fields to update.

Returns

mixedIf a leads are successfully updated the updated lead IDs will be returned. If no POST data is supplied then a list of updatable fields with format information is returned.

Update dynamic wrapper url for global, pages and saved links. If savedLinkID, or pageID are not passed, the global dynamic wrapper url will be updated.

post_clients_dynamicwrapperurl(string $dynamic_url, integer $savedlink_id = '', integer $page_id = '') : mixed
API
api POST
see Documentation.

Parameters

$dynamic_url

string

Dynamic wrapper url.

$savedlink_id

integer

Saved link ID if setting dynamic wrapper url for a specific saved link.

$page_id

integer

Page ID if setting dynamic wrapper url for a specific page.

Returns

mixedNo data returned on success.

Update an existing client's saved link

post_clients_savedlink(string $saved_links_id, array $data = array()) : mixed
API

This method is to be used at your own risk. We will NOT be held accountable for programmatic errors in your code or the improper use of search values or options within said values resulting in broken saved links.

Note: The updatable fields need to be in a URL encoded, ampersand delineated query string format.

Data Example: $data = array( 'linkName' => 'Good_side_of_tracks', 'pageTitle' => 'Good_side_of_tracks', 'linkTitle' => 'Good_side_of_tracks', 'queryString' => array('idxID' => 'a001', 'hp' => '200000') );

api POST
see Documentation.

Parameters

$saved_links_id

string

The ID of a client's saved link.

$data

array

Savedlink fields to update.

Returns

mixedIf no POST data is supplied, then a list of updatable fields with format information is returned, otherwise on success 204 is returned.

Update an existing supplemental listing.

post_clients_supplemental(string $listing_id, array $data = array()) : mixed
API

Note: if updating images, existing images are deleted and the new images are inserted instead for the listing.

Data Example: $data = array( 'likeIdxID' => 'a001', 'likeMlsPtID' => '1', 'images' => array('http://example.com/image1.jpg', 'http://example.com/image2.jpg') );

api POST
see Documentation.

Parameters

$listing_id

string

The supplemental listing ID.

$data

array

Supplemental fields to update.

Returns

mixedIf no POST data is supplied, then a list of updatable fields with format information is returned, otherwise on success 204 is returned.

Update the information for one lead specified by the primary request ID.

post_lead(integer $lead_id, array $data) : mixed
API

Data Example: $data = array( 'firstName' => 'John', 'lastName' => 'Doe', 'email' => 'john@example.com' );

api POST
see Documentation.

Parameters

$lead_id

integer

The ID of a lead.

$data

array

Lead fields to update.

Returns

mixedIf a leads are successfully updated the updated lead IDs will be returned. If no POST data is supplied then a list of updatable fields with format information is returned.

Update the notes information for one lead specified by the primary request ID.

post_leads_note(integer $lead_id, integer $note_id, array $data = array()) : mixed
API

Data Example: $data = array( 'note' => 'Test note' );

api POST
see Documentation.

Parameters

$lead_id

integer

The ID of a lead.

$note_id

integer

The ID of the note to update.

$data

array

Note data.

Returns

mixedIf no data is supplied then a list of updatable fields with format information is returned.

Update an existing lead's saved property.

post_leads_property(integer $lead_id, integer $property_id, array $data = array()) : mixed
API

Data Example:

$data = array( 'propertyName' => 'Test Property', 'property' => array('idxID' => 'a001', 'listingID' => '345678') );

api POST
see Documentation.

Parameters

$lead_id

integer

The ID of a lead.

$property_id

integer

The ID of the note to update.

$data

array

Property data.

Returns

mixedIf no data is supplied then a list of updatable fields with format information is returned.

Update an existing lead's saved search.

post_leads_search(integer $lead_id, integer $search_id, array $data = array()) : mixed
API

Data Example:

$data = array( 'searchName' => 'Test Search', 'search' => array('idxID' => 'a001', 'hp' => '200000') );

api POST
see Documentation.

Parameters

$lead_id

integer

The ID of a lead.

$search_id

integer

The ID of a lead's saved search.

$data

array

Search data.

Returns

mixedIf a lead search is successfully created the new searches' ID will be returned. If no data is supplied then a list of updatable fields with format information is returned.

Add leads in batches of up to 100 per request.

put_bulkleads(array $data = array()) : array
API

Note: Each lead field should be passed as an indexed array starting at and going to, at most, 100. There must not be any gaps.

Data Example: $data = array( 'firstName[0]' => 'John', 'lastName[0]' => 'Doe', 'email[0]' => 'john@example.com', 'firstName[1]' => 'Aaron', 'lastName[1]' => 'Aaronson', 'email[1]' => 'aaron@example.com' );

api PUT
see Documentation.

Parameters

$data

array

Supplemental fields to update.

Returns

arrayIf a lead is successfully created the new lead IDs will be returned. If no PUT data is supplied then a list of updatable fields with format information is returned.

Create a new supplemental listing.

put_clients_supplemental(array $data = array()) : mixed
API

Note: likeIdxID and likeMlsPtID fields are required.

Data Example: $data = array( 'likeIdxID' => 'a001', 'likeMlsPtID' => '1', 'images' => array('http://example.com/image1.jpg', 'http://example.com/image2.jpg') );

api PUT
see Documentation.

Parameters

$data

array

Supplemental fields to create.

Returns

mixedIf a supplemental listing is successfully created, the new supplemental listing ID will be returned. If no PUT data is supplied, then a list of updatable fields with format information is returned.

Create a new lead.

put_lead(array $data = array()) : mixed
API

Special Note: Currently the API cannot differentiate between a lead rejected due to server error or one rejected due to bad email address. The lead system requires email addresses that are correctly formatted to cut down on garbage accounts, and they need to have a valid MX record. Most 500 error from this method are a result of bad email addresses. In future versions we will differentiate the error and make the MX record requirement optional.

Data Example: $data = array( 'firstName' => 'John', 'lastName' => 'Doe', 'email' => 'john@example.com' );

api PUT
see Documentation.

Parameters

$data

array

Lead fields to create.

Returns

mixedIf a lead is successfully created the new lead's ID will be returned. If no PUT data is supplied then a list of updatable fields with format information is returned.

Create a new lead note.

put_leads_note(integer $lead_id, array $data = array()) : mixed
API

Data Example: $data = array( 'note' => 'Test note' );

api POST
see Documentation.

Parameters

$lead_id

integer

The ID of a lead.

$data

array

Note data.

Returns

mixedIf a note is successfully created the new notes's ID will be returned. If no PUT data is supplied then a list of updatable fields with format information is returned.

Create a new lead saved property.

put_leads_property(integer $lead_id, array $data = array()) : mixed
API

Data Example:

$data = array( 'propertyName' => 'Test Property', 'property' => array('idxID' => 'a001', 'listingID' => '345678') );

api PUT
see Documentation.

Parameters

$lead_id

integer

The ID of a lead.

$data

array

Property data.

Returns

mixedIf a saved property is successfully created the new property's ID will be returned. If no data is supplied then a list of updatable fields with format information is returned.

Create IDX subscriber.

put_specialtypartner_subscriber(array $data = array()) : mixed
API

Note: this method is only available for specialty billing partners.

Data Example:

$data = array( 'product' => 'lite', 'firstName' => 'Test', 'lastName' => 'Test', 'companyName' => 'Test Company', 'address' => '1000 E Test street', 'city' => 'Eugene', 'state' => 'OR', // Use XX for international. 'zipcode' => 97402, 'primaryPhone' => '5555555555', 'email' => 'test@gmail.com', 'mlsIDList' => 'a001,a002', 'agreeToTermsOfService' => 'yes' );

api PUT
see Documentation.

Parameters

$data

array

Subscriber data.

Returns

mixedNothing on success

Request function.

request() : array
access public

Returns

arrayArray of API results.

Response code message.

response_code_msg(string $code = '') : string

Parameters

$code

string

Response code to get message from.

Returns

stringMessage corresponding to response code sent in.

Saves the hourly API key usage count.

check_usage() : string

Returns

stringAPI hourly usage count.

Gets the response code from the response.

get_response_code() 

 Properties

 

Response code from the server

$code : integer

Default

 

HTTP request arguments.

$args : Array

Default

array()

(default value: array())

access protected
 

Raw response from IDX Broker server.

$response : string

Default

 

IDX Broker route to make a the call to.

$route : string

Default

 

API URL.

$api_url : string

Default

'https://api.idxbroker.com/'