Skip to main content
Managing Mercury API Webhooks
Updated over 6 months ago

Introduction

Mercury allows for third party systems to register web hooks in order to receive instant push notifications from mercury. The current scope of push notifications includes:

Any updates/deletes done via the Mercury database frontend on:

  1. Opportunities and their assets or liabilities or related parties

  2. Contacts and their incomes, expenses, addresses and contact methods

Notifications will be fired whenever the above mentioned items are:

  1. Updated individually via the mercury frontend (e.g. Making changes on a contact/opportunity or Adding asset, liability, etc.)

  2. Updated via public API endpoints

  3. Bulk assigned of contacts to a specific category via the CRM tab

  4. Bulk assign of contacts to a specific Relationship manager via the CRM tab

Notifications will not be fired if:

  1. Updates in Mercury via Bulk import of contacts (this might change in the future)

Registering web hooks with mercury

You need to POST the following payload to mercury for registering your web hook to the below endpoint:

{

"active": "true",

"name": "web",

"config": {

"subscription_type": "All available opportunities",

"url": "URL where you want mercury to post payload",

"content_type": "json"

},

"event": "Created or updated"

}

Brief description of the payload fields:

active: use for some of our other integrations like MS Flow. You can just set it to true

name: can be any string 45 chars long. Please set it to Simpology or something similar which will make it easy to identity Simpology related web hooks

subscription_type: This lets you specify the scope of the events you want to list to. Refer swagger definition for all options.

Recommend you set it to “All available opportunities” for opportunity hooks

And “All available contacts” for contact hooks

url: the target URL where you want mercury to post the payload. Payload will be in JSON. The complete Opportunity or Contact object including its nested entities will be posted.

content_type: always set this to json

event: The type of event. Following options are available:

- Created: Notify web hook only when an opportunity/Contact is created

- Created or updated: Notify web hook whenever an opportunity/contact is created or is updated (including modifications to its nested entities)

- Deleted: Notify web hook whenever an opportunity/contact is deleted

Listing the existing web hooks with mercury

You need to use the GET method to mercury for listing your web hook using the below endpoint:

Deleting web hooks from mercury

If need to modify a web hook, please delete the previous one using the below endpoints and re-register a new one

Please do not create redundant web hooks. Always delete the web hook if you no longer need to subscribe to mercury notifications

Alternatively, you can also return an HTTP status of 410, and mercury will respect that and unregister the web hook automatically

Did this answer your question?