Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Compliance Workbook offers an HTTP a REST API for integration with third party systems. The API enables you to submit PDF documents for processing, view the details of submitted documents, as well as browse a list of the properties on your account. You can view the Swagger page for the API at https://api.thecomplianceworkbook.com/swagger/ui/index#/.

...

To get started with the API, you must have a valid Username and API Key, as well as having your IP address on our white list. If you do not have one or either of these, or your IP address has not been white listed, please raise a support desk ticket.

API Architecture

The API is divided into three two key areas:

  • Documents
    • API routes with a URL of /documents provide interactions with documents on your account.
    • The API is capable of webhook integration to provide information when document has been processed.
  • Properties - API routes with a URL of /properties provide interactions with properties on your account.Callbacks - API routes with a URL of /callback provide the ability to register to receive a notification to your IT systems once document processing has been completed.

Typical User Interactions

...

  1. PDF document submitted to the API. Documents can be submitted for processing by issuing a HTTP POST request to https://api.thecomplianceworkbook.com/api/documents. Please refer to Document Creation Postman request for full details of the parameters.
  2. A Document Id is returned from this HTTP request.
  3. The status of this document is received either via a callback, see below, or polled by issuing HTTP GET requests to https.
  4. A HTTP GET request to https://api.thecomplianceworkbook.com/api/documents/{documentId} . Please can then provide the summary details of the document. Please refer to the Document Details Postman request for full details of the parameters.The Status property of a response from /api/documents/{documentId} will indicate whether the document has been successfully processed.
  5. A value of Pending indicates further processing is ongoing.
  6. A value of Completed indicates all processing is complete.

Document Details

A summary of all the documents on your account can be accessed by a HTTP GET request to /api/documents-v2. Please refer to the Documents Summary Postman request for a working example.

...

  • Summary of the document.
  • Compliance and associated compliance calculations.
  • Data fields extracted from the PDF.
  • Tags attached to the document, for example the name of the engineer who carried out the work.

Document Webhook

The API is capable of webhook integration to an endpoint provided by the consuming client. The webhook is triggered in response to a document being processed within TCW. This processing maybe the result of the initial import into the system, as well as user driven modifications; for example through the creation of a remedial action after the document has been assessed. The webhook issues a POST request to an endpoint with the following JSON payload:

"{ 
    Document: \{

        DocumentId: Number

    \}

}

Please refer to the Document Webhook Postman request for a working example.

To get started with webhook integration, please raise a support desk ticket to provide your endpoint and secure API key.

Properties

Data about properties on your account can be accessed by HTTP GET requests to /api/properties/{propertyId}. Please refer to the Properties Summary Postman request for a working example.

Callbacks

Callbacks can be used to allow our API to notify your IT systems when we have completed processing a submitted PDF. With help setting up callbacks, please contact us directly.