WebHooks Documentation for Fonn Construction
Fonn Construction WebHooks mechanism for notifying third-party software about resources updates.
Getting started
WebHooks are based on HTTP Requests, so this mechanism calls a request that should be registered in the Organization Panel.
Notice that the WebHooks under continous development.
Some features may change in the future.
When user makes any change, the Fonn Construction system converts it into a WebHook message and notifies third-party service by calling registered WebHooks over HTTP.
General Communication with Fonn Construction system
While Webhooks notifies about changes by sending mostly basic data, third-party service may decide to query Fonn API for extended details.
- User makes a change;
- Core system processes the change and triggers webhook;
- WebHook notifies an third-party about the change;
- Third-party service can ask Fonn API Gateway for additional data (like a document URL);
- API Gateway verifies the request and calls Core System for data;
- Core API returns detailed data;
- API Gateway forwards data to the third-party service.
Security
Fonn Construction system sends payloads only over the HTTPS protocol, due to security reasons. Also, there are implemented following mechanisms for verifying incoming requests.
We recommend implementing both mechanisms to pass highest security standards.
Registering a WebHook
To register a WebHook, your service needs to expose an endpoint over HTTPS protocol, which accepts POST request method with application/json Content-Type
header.
Notice that the exposed endpoint should be available from a public network.
This endpoint should handle available payloads that you marked to support. If the endpoint received an unknown payload, we recommend returning a 400 Wrong Data error.
You can register a WebHook using two different ways.
Using Graphical User Interface (Fonn Construction Web App)
- Contact with Fonn Construction support to enable WebHooks for your Organization
- Go to Organization Panel
- Expand Integrations tab
- Go to WebHooks tab
- Click add new WebHook
Using Fonn API
Guidelines available here: Fonn API - Getting Started
Available payloads for specific events
Checklists
project_checklist_created
- Checklist node created modelproject_checklist_updated
- Checklist node updated modelproject_checklist_archived
- Checklist node archived modelproject_checklist_comment_created
- Checklist comment created modelproject_checklist_linked_item_added
- Checklist related item addedproject_checklist_linked_item_removed
- Checklist related item removed
Documents
document_created
- Document created modeldocument_created_revision
- Document revision created modeldocument_updated
- Document updated modeldocument_removed
- Document removed modeldocument_removed_revision
- Document revision removed model
Change Requests
change_request_created
- Change request created model
Issues
issue_created
- Issue created modelissue_updated
- Issue updated model
Issue Entries
issue_entry_created
- Issue Entry created model
Time Cards
time_card_created
- Time Card created modeltime_card_updated
- Time Card updated modeltime_card_archived
- Time Card archived modelweek_submitted
- Week Submitted modelweek_approved
- Week approved modelweek_rejected
- Week rejected model
Organizations
Organizations
organization_owned_user_assigned
- Organization owned user assigned model
organization_owned_user_assigned
Payload of webhook sent after organization takes ownership of the user account.
Properties
Property | Type | Format | Required | Description | |
---|---|---|---|---|---|
type |
string |
true | Payload type (organization_owned_user_assigned ) |
||
organizationId |
string |
UUID | true | Organization identifier | |
data |
OrganizationOwnedUser |
true | Created payload data |
Example
{
"type": "organization_owned_user_assigned",
"organizationId": "729cfcc1-2277-4e05-92c6-76302b32a83e",
"data": {
"userId": "12e84caa-fb17-46dd-b8b2-970ee563e606",
"userExternalId": "adam-ext-123",
"userName": "adam@fonn.com"
}
}