Back
Jeevan Tokhi
Jeevan Tokhi Head of API for BGL

CAS360 and Document Managment Integration

CAS360 and Document Managment Integration

CAS360 and Document Managment Integration

Your Document Management solution can now be enhanced by integrating with BGL’s CAS 360, the world’s leading company compliance software. This allows you to sync, download and update documents for all companies and Trusts managed in CAS 360.

1. Document Management Provider - Prerequisites

  • Your application must be registered and approved on BGL’s API. To get started Click Here
  • A BGL User must have authenticated your application to send and receive data via our API
  • you must have a webhook registered with BGL for your application to receive webhook messages from BGL.

2. Initial Synchronization of data with CAS360

Once the user has authenticated your application to access BGL’s API there will data you will need to initially match against CAS 360 to ensure everything is linked correctly.

The following endpoints are most useful for Companies:

  • GET List of Companies - This will provide you with a list of all companies managed in CAS 360. Where your application maintains an entity structure this can be matched via Company Number.
  • GET List of Status Types - If you store Statuses in your application you can retrieve the Status types for documents in CAS 360. The status helps users manage documents by indicating what stage the document is at.
  • GET List of Documents for a Company - Return a list of company documents for a company. Document IDs returned can be used for subsequent calls.
  • GET Document Details - Returns Document Details Including a list of all Attachments for a Company.
  • Download a Document Attachment - This resource will return a URL link which can be used to download a Document Attachment. Both User and System attachments can be downloaded

The following endpoints are most useful for Trusts:

3. Bi-directional synchronization using BGL’s API

Bidirectional synchronization involves comparing any documents which have changed since the last successful sync and pushing changes to the older document record.

3.1 New Documents in CAS 360

The Document Lists APIs support the “updatedAfter” parameter. Using this parameter, the documents list will return just the documents that were updated after the date and time specified.

3.2 Updating Document Records

The following endpoints are best to used to update documents in CAS360 where a change has been made in the Document Management application.

4. COMING SOON - Receive updates via webhooks

Where you have subcribed to receive the events, a message will be sent from CAS 360 to your URL via a webhook message. Your application will need to subscibe to a message type of Document Change. For API Documentation on BGL’s webhooks please click here.

The eventSubType key will denote the type of document change.

eventSubType product Description
newDocument CAS 360 A new document record has been created for a Company or Trust
deleteDocument CAS 360 A document record has been modified for a Company or Trust
newStatus CAS 360 The status for a document record has been modified
newAttachment CAS 360 The new attachment has been added for a document record

4.1 New Document created in CAS360

When a document is added or created in CAS 360 it can automatically be saved in your Document Management application via a webhook provided. Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
curl --location --request POST 'https://www.Third-Party.com.au/Entity/bgl/' 
--header 'Content-Type: application/x-www-form-urlencoded' 
--data-raw '{  
"entityId": "0b4b4304-6326-474e-873b-1cfd8c2da2ab", 
"eventId": "039403940", 
"eventType": "documentChange", 
"eventSubType": "newDocument",
"firmId": "bgltest", 
"tenants": [
{"tenantId": "73124784265", "tenantType": "documentId" }
], 
 "userId": "info@bglcorp.com.au
}'

4.2 CAS360 - Document Deleted

In CAS 360, when a document is deleted a webhook message is sent to the registered URL

1
2
3
4
5
6
7
8
9
10
11
12
13
curl --location --request POST 'https://www.Third-Party.com.au/Entity/bgl/' 
--header 'Content-Type: application/x-www-form-urlencoded' 
--data-raw '{  
"entityId": "0b4b4304-6326-474e-873b-1cfd8c2da2ab", 
"eventId": "039403940", 
"eventType": "documentChange", 
"eventSubType": "deleteDocument",
"firmId": "bgltest", 
"tenants": [
{"tenantId": "73124784265", "tenantType": "documentId" 
},],
 "userId": "info@bglcorp.com.au
}'
  • Your application can delete/archive the document sent.

4.3. Document is edited

In CAS 360 end when a document is edited, CAS 360 sends a webhook message to the registered URL

Example Note: eventSubType can equal newStatus or newAttachment

1
2
3
4
5
6
7
8
9
10
11
12
13
curl --location --request POST 'https://www.Third-Party.com.au/Entity/bgl/' 
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-raw '{ 
 "entityId": "0b4b4304-6326-474e-873b-1cfd8c2da2ab", 
  "eventId": "039403940", 
   "eventType": "documentChange", 
   "eventSubType": "statusChange",
    "firmId": "bgltest", 
    "tenants": [
    {"tenantId": "73124784265", "tenantType": "documentId" }
    ], 
       "userId": "info@bglcorp.com.au
}'
  • Once your appliction receives the message, you application should call call GET Document Details which returns all Document Details Including All Attachments.
  • Your application will then need to call Download a Document Attachment for each attachment.

Deeplinks are a type of link that send users directly to an app or resource.

5.1 Deeplink in CAS 360

CAS360 will display a link and logo for your Document Management App where your webhook response to items 4.1 and 4.3 includes a URL in the response. Where a user clicks on the icon it will open the saved link in new window/tab.

Example Response

1
2
{ message: "request accepted." }
{ message: "request accepted.", resourceUrl: "https://www.docmanapp.com/document/123456789" }

5.2 Deeplink in your application

Where you would like to add a deeplink in your application to take the user directly to the document in CAS360 you can use the following:

Place in CAS 360 URL
List of all documents for a Company https://cas360.com/s/html/main.html#/company/documents?cid=${companyId}
List of all documents for a Trust https://cas360.com/s/html/main.html#/trusts/${trustId}/documents

If you have any questions please let us know

Kind Regards

The BGL API Team
api@bglcorp.com.au

================================================== -->