BCI API Support Reference (version 1.0)


Common Usage

The following 5 steps would typically be sufficient to provide all the information required on a regular basis after the intial setup is complete with master table data, etc. It is recommended to keep a short time interval between requests for projects to keep the size of the data smaller and easier to handle.

Step 1: Authenticate to use the API

The first step in using the BCI API is authenticating your credentials and receivig a token for use during that session of use. The token is required for all requests to the API.

The exact methods and specifications of use are provided in the Authenticate to use API section of this reference. Please use HTTPS protocol to authenticate your credentials, all requests made through HTTP will be refused and return an error.

Example SOAP REQUEST: https://api.bciaustralia.com/auth.cfc?wsdl&method=dologin&clientID=bciapiuser&password=dummypassword

Example REST REQUEST: https://api.bciaustralia.com/rest/auth.json?clientID=bciapiuser&password=dummypassword

Parse the response to extract the token what will be required for every future request to the API, the token is a random alphanumeric sequence, for example 9FEA3D9BCF0D9A64FBAA. For the purpose of this document token will be referred to as {token}. All future requests will be made using HTTP protocol.

Step 2: Request Project information

The second step in exporting and importing data into your systems is using the project search or by exporting the projects of interest using IDs (if already known and only for an update)

For example the URL to make a request for projects reported within the last 2 days:

SOAP: http://api.bciaustralia.com/projects.cfc?wsdl&token={token}&method=getbyQuery&time_stamp=2&NumberOfRows=100&startRow=1

OR

For example the URL to make a request for projects reported since the last time this function was called ( getAllSinceLastQuery() ):

SOAP: http://api.bciaustralia.com/projects.cfc?wsdl&token={token}&method=getAllSinceLastQuery&time_stamp=2&NumberOfRows=100&startRow=1

The response contains the total count of projects matching the criteria, this count can be used to make multiple requests adjusting the startRow and NumberofRows URL parameters accordingly. Store the projectrefIDs returned in these requests to use in future requests for roles /contacts / companies related to the projects.

The URL parameter 'fields' can be used to select which columns are included in the response. Details of methods used to get project information is included in the Projects - search / individual record section

Step 3: Request Project Role information

Once the project information is parsed, requests can be made for the role information within those projects by passing the reference IDs of the projects previously received in the response. The role information gives the IDs of the companies and contacts and their relates roles linked to projects.

For example the URL to make a request for roles linked to projects:

SOAP: http://api.bciaustralia.com/projectroles.cfc?wsdl&token={token}&method=getbyQuery&projectrefid=10028043,10067818,10067341,813013,10031930,10048079,
10005057,10017487,569135,10033709&NumberOfRows=100&startRow=1

The response contains the total count of records matching the criteria(projects), this count can be used to make multiple requests adjusting the startRow and NumberofRows URL parameters accordingly. Store the IDs of companies and contacts returned in these requests to use in future requests for contacts / companies information.

The URL parameter 'fields' can be used to select which columns are included in the response. Details of methods used to get project role information is included in the Projects - roles / companies / contacts attached section

Step 4: Request company information

Once the role information is parsed, requests can be made for the related contacts and companies if required. This means that contacts and companies currently in your database do not necessarily need to be downloaded again other than for the purpose of an update. It is recommended to only do so when required and rely on information previously collected using this exercise. For new companies currently not in your systems, request for the information is recommended.

For example the URL to make a request for companies passing the IDs:

SOAP: http://api.bciaustralia.com/companies.cfc?wsdl&token={token}&method=getbyQuery&companyid={listOfCompanyIDs}&NumberOfRows=100&startRow=1

{listOfCompanyIDs} is a comma-seperated list of company IDs

The response contains the total count of records matching the criteria(companies), this count can be used to make multiple requests adjusting the startRow and NumberofRows URL parameters accordingly.

The URL parameter 'fields' can be used to select which columns are included in the response. Details of methods used to get company information is included in the Companies - search / individual record / contacts for company section

Step 5: Request contact information

Once the role information is parsed, requests can be made for the related contacts and companies if required. This means that contacts and companies currently in your database do not necessarily need to be downloaded again other than for the purpose of an update. It is recommended to only do so when required and rely on information previously collected using this exercise. For new contacts currently not in your systems, request for the information is recommended.

For example the URL to make a request for contacts passing the IDs:

SOAP: http://api.bciaustralia.com/contacts.cfc?wsdl&token={token}&method=getbyQuery&contactid={listOfContactIDs}&NumberOfRows=100&startRow=1

{listOfContactIDs} is a comma-seperated list of contact IDs

The response contains the total count of records matching the criteria(contacts), this count can be used to make multiple requests adjusting the startRow and NumberofRows URL parameters accordingly.

The URL parameter 'fields' can be used to select which columns are included in the response. Details of methods used to get contact information is included in the Contacts - search / individual record section