BCI API Support Reference (version 1.0)


Company and Contact Information

Companies



URL path: REST Request SOAP Request Base
http://api.bciaustralia.com/rest/companies.json http://api.bciaustralia.com/companies.cfc?wsdl http://api.bciaustralia.com/companies.cfc
Serializable: Yes
Methods: getByPK, getByQuery, getContactByPK, getContactsByPK


getByPK
remote struct getByPK ( required numeric companyid, string fields="", required string token )

Function to retrieve company details based on company ID

Methods of access are:

SOAP: http://api.bciaustralia.com/companies.cfc?wsdl&method=getByPK&companyid={companyid}(&returnFormat=wddx / &returnFormat=json)

REST: http://api.bciaustralia.com/rest/companies/{companyid}(.json / .xml)



Output: Structure

Parameters:
companyid: numeric, required - ID of the company
fields: string, optional - Field names of returned data - COMPANYID, COMPANY_NAME, UNIT_SUITE, LOT_DP, STREET_NUMBER1, STREET_NUMBER2, STREET_NAME1, STREET_NAME2, TOWN, COUNCIL, POSTCODE, COUNTRYID, STREET_TYPE, STREET_TYPE_DESC, STATE, COMPANY_REMARK, PHONE, FAX, EMAIL, WEBSITE, LOT, DP, UNIT, SUITE, CLOSED_DOWN. Null fields implies all default fields
token: string, required - allocated token for current login session

getByQuery
remote Array getByQuery ( string companyid, string company_name, string company_country, string company_state, string company_council, string company_town, string company_postcode, string company_address, string company_role, string company_rolegroup, numeric project_value_min, numeric project_value_max, string project_name, string project_type, numeric projectid, numeric projectrefid, string project_keyword, string project_country, string project_state, string project_region, string project_council, string project_town, string project_category, string project_subcategory, string project_status, string project_stage, string project_date_stamp_min, string project_date_stamp_max, numeric company_tender_status, string project_postcode, string fields="", required string token, string sortby, string sortbyorder, numeric NumberOfRows="1000", numeric StartRow="1", string company_timestamp_from, string company_timestamp_to, numeric company_timestamp )

Function to retrieve contacts and companies based on search parameters

Methods of access are:

SOAP: http://api.bciaustralia.com/companies.cfc?wsdl&method=getByQuery&search-parameters(&returnFormat=wddx / &returnFormat=json)

REST: http://api.bciaustralia.com/rest/companies(.json / .xml)&search-parameters

Search-parameters: For example company_name, company_town, role_name, contact_name, etc would be URL Parameters

Pass URL parameters 'SortBy' and 'SortByOrder' to sort results.

Pass URL Parameters 'NumberOfRows' and 'StartRow' to get sections of results.

Output: Array

Parameters:

companyid: string, optional - ID or comma-seperated list of companyIDs
company_name: string, optional - Exact or partial name of the company
company_country: string, optional - ID of the country where company is located
company_state: string, optional - ID of the state where company is located
company_council: string, optional - Name of the council where company is located
company_town: string, optional - Name of the town/suburb where company is located
company_postcode: string, optional - Postcode where company is located
company_address: string, optional - Street name, unit name of address where company is located
company_role: string, optional - ID or comma-seperated list of role IDs
company_rolegroup: string, optional - ID or comma-seperated list of role group IDs
project_value_min: numeric, optional - Minimum project value (in millions)
project_value_max: numeric, optional - Maximum project value (in millions)
project_name: string, optional - Partial or full project name
project_type: string, optional - Partial or full project type
projectid: numeric, optional - ID or comma-seperated list of project IDs
projectrefid: numeric, optional - ID or comma-seperated list of project Ref IDs
project_keyword: string, optional - Project keyword
project_country: string, optional - ID or comma-seperated list of countries where project is located
project_state: string, optional - ID or comma-seperated list of states where project is located
project_region: string, optional - ID or comma-seperated list of BCI Regions where project is located
project_council: string, optional - Name of council where project is located
project_town: string, optional - Name of town/suburb where project is located
project_category: string, optional - ID or comma-seperated list of categories of projects
project_subcategory: string, optional - ID or comma-seperated list of sub categories of projects
project_status: string, optional - ID or comma-seperated list of statuses of projects
project_stage: string, optional - ID or comma-seperated list of stages of projects
project_date_stamp_min: string, optional - Minimum date of project published date, accepted datetime format (dd/mm/yyyy or dd/mm/yyyy HH:mi where dd represents 2 digit dates, mm represents 2 digit month, yyyy is 4 digits for year, HH represents 2 digit hours according to a 24-hr clock, mi represents 2 digits minutes)
project_date_stamp_max: string, optional - Maximum date of project published date, accepted datetime format (dd/mm/yyyy or dd/mm/yyyy HH:mi where dd represents 2 digit dates, mm represents 2 digit month, yyyy is 4 digits for year, HH represents 2 digit hours according to a 24-hr clock, mi represents 2 digits minutes)
company_tender_status: numeric, optional - tender Status
project_postcode: string, optional - Postcode where project is located
fields: string, optional - Field names of returned data - COMPANYID, COMPANY_NAME, UNIT_SUITE, LOT_DP, STREET_NUMBER1, STREET_NUMBER2, STREET_NAME1, STREET_NAME2, TOWN, COUNCIL, POSTCODE, COUNTRYID, STREET_TYPE, STREET_TYPE_DESC, STATE, COMPANY_REMARK, PHONE, FAX, EMAIL, WEBSITE, LOT, DP, UNIT, SUITE, CLOSED_DOWN. Null fields implies all default fields
token: string, required - allocated token for current login session
sortby: string, optional - Field Name for sorting results
sortbyorder: string, optional - Order (Ascending / Descending) for the sort
NumberOfRows: numeric, optional - Number of result records being requested
StartRow: numeric, optional - Start position of the recordset being requested, default is 1
company_timestamp_from: string, optional - Minimum date stamp for searching using a time frame, accepted datetime format (dd/mm/yyyy or dd/mm/yyyy HH:mi where dd represents 2 digit dates, mm represents 2 digit month, yyyy is 4 digits for year, HH represents 2 digit hours according to a 24-hr clock, mi represents 2 digits minutes)
company_timestamp_to: string, optional - Maximum date stamp for searching using a time frame, accepted datetime format (dd/mm/yyyy or dd/mm/yyyy HH:mi where dd represents 2 digit dates, mm represents 2 digit month, yyyy is 4 digits for year, HH represents 2 digit hours according to a 24-hr clock, mi represents 2 digits minutes)
company_timestamp: numeric, optional - Number of days relative to today as a time-frame, for example 5 means searching through last 5 days. This considers the exact time so timestamp=1 effectively means companies updated in the last 24 hours, timestamp=2 would mean companies updated in the last 48 hours.

getContactByPK
remote Array getContactByPK ( required numeric contactid, required numeric companyid="", string fields="", required string token )

Function to request contact details of a specific contact in a company by passing the IDs of company and contact

Methods of access are:

SOAP: http://api.bciaustralia.com/companies.cfc?wsdl&method=getContactByPK&companyid={companyid}&contactid={contactid}(&returnFormat=wddx / &returnFormat=json)

REST: NA

Output: Array

Parameters:
   contactid: numeric, required - ID of the contact
   companyid: numeric, required - ID of the company
   fields: string, optional - Fields that should be included in the response, null uses default fields. For full list refer to getByQuery() above
   token: string, required - allocated token for current login session

getContactsByPK
remote Array getContactsByPK ( required numeric companyid, numeric contactid, string fields="", required string token, string sortby, string sortbyorder )

Function to request contact details of all contacts for a company by passing the companyid

Methods of access are:

SOAP: http://api.bciaustralia.com/companies.cfc?wsdl&method=getContactsByPK&companyid={companyid}(&returnFormat=wddx / &returnFormat=json)

REST: NA

Output: Array

Parameters:
   companyid: numeric, required - ID of the company
   contactid: numeric, optional - ID of the contact
   fields: string, optional - Fields that should be included in the response, null uses default fields. For full list refer to getByQuery() above
   token: string, required - allocated token for current login session
   sortby: string, optional - Field Name for sorting results
   sortbyorder: string, optional - Order (Ascending / Descending) for the sort

Fields
Selectable fields for company information
COMPANYIDLONG
COMPANY_NAMESTRING(1000)
UNIT_SUITESTRING(100)
LOT_DPSTRING(100)
STREET_NUMBER1STRING(100)
STREET_NUMBER2STRING(100)
STREET_NAME1STRING(100)
STREET_NAME2STRING(100)
TOWNSTRING(100)
COUNCILSTRING(100)
POSTCODESTRING(100)
COUNTRYIDLONG
STREET_TYPESTRING(100)
STREET_TYPE_DESCSTRING(100)
STATEINTEGER
PHONESTRING(1000)
FAXSTRING(1000)
EMAILSTRING(1000)
WEBSITESTRING(1000)
LOTSTRING(100)
DPSTRING(100)
UNITSTRING(100)
SUITESTRING(100)
CLOSED_DOWNINTEGER
STATE_NAMESTRING(100)
STATE_ABBVSTRING(10)
ADDRESSSTRING(1000)
COUNTRY_NAMESTRING(1000)
TIME_STAMPDATE
LATITUDE (For users with access to latitude and longitude information) NUMBER(10,6)
LONGITUDE (For users with access to latitude and longitude information) NUMBER(10,6)
Sample Output - getByPK() - XML
<wddxPacket version='1.0'> <header/> <data> <struct> <var name='CLOSED_DOWN'><number>0.0</number></var> <var name='STATE'><number>5.0</number></var> <var name='UNIT'><string>Unit 12</string></var> <var name='COMPANY_REMARK'><string>Formerly known as Old HillyBillies</string></var> <var name='COMPANY_NAME'><string>New HillyBillies Consulting Engineers</string></var> <var name='POSTCODE'><string>6005</string></var> <var name='TOWN'><string>West Perth</string></var> <var name='COUNCIL'><string>Perth</string></var> <var name='WEBSITE'><string>www.newhbconsulting.com.au</string></var> <var name='STREET_TYPE_DESC'><string>Tce</string></var> <var name='PHONE'><string>08 9265 xxxx</string></var> <var name='STREET_NUMBER1'><string>1200</string></var> <var name='COUNTRYID'><number>12.0</number></var> <var name='STREET_NUMBER2'><string></string></var> <var name='DP'><string></string></var> <var name='STREET_TYPE'><string>TCE</string></var> <var name='LOT_DP'><string></string></var> <var name='STREET_NAME2'><string></string></var> <var name='STREET_NAME1'><string>RandomName</string></var> <var name='EMAIL'><string>mail@newhbconsulting.com.au</string></var> <var name='SUITE'><string></string></var> <var name='UNIT_SUITE'><string>Unit y</string></var> <var name='FAX'><string>08 9265 xxxx</string></var> <var name='COMPANYID'><number>154120.0</number></var> <var name='LOT'><string></string></var> </struct> </data> </wddxPacket>
Sample Output - getByQuery() / getContactsByPK() / getContactByPK() - XML
<wddxPacket version='1.0'> <header/> <data> <array length='1'> <struct> <var name='CLOSED_DOWN'><number>0.0</number></var> <var name='STATE'><number>5.0</number></var> <var name='UNIT'><string>Unit 12</string></var> <var name='COMPANY_REMARK'><string>Formerly known as Old HillyBillies</string></var> <var name='COMPANY_NAME'><string>New HillyBillies Consulting Engineers</string></var> <var name='POSTCODE'><string>6005</string></var> <var name='TOWN'><string>West Perth</string></var> <var name='COUNCIL'><string>Perth</string></var> <var name='WEBSITE'><string>www.newhbconsulting.com.au</string></var> <var name='STREET_TYPE_DESC'><string>Tce</string></var> <var name='PHONE'><string>08 9265 xxxx</string></var> <var name='STREET_NUMBER1'><string>1200</string></var> <var name='COUNTRYID'><number>12.0</number></var> <var name='STREET_NUMBER2'><string></string></var> <var name='DP'><string></string></var> <var name='STREET_TYPE'><string>TCE</string></var> <var name='LOT_DP'><string></string></var> <var name='STREET_NAME2'><string></string></var> <var name='STREET_NAME1'><string>RandomName</string></var> <var name='EMAIL'><string>mail@newhbconsulting.com.au</string></var> <var name='SUITE'><string></string></var> <var name='UNIT_SUITE'><string>Unit y</string></var> <var name='FAX'><string>08 9265 xxxx</string></var> <var name='COMPANYID'><number>154120.0</number></var> <var name='LOT'><string></string></var> </struct> </array> </data> </wddxPacket>