Skip to main content

Webhook

Webhooks notify you about certain events that occur in Deskera. You can select which type of events you want to be notified about and where we should send them to. This allows you to be easily aware of things that happen, even after the consumer is no longer on your site.

API


Register Webhook

Register webhook for an event.

POST

/v1/webhooks/register

Request URL
https://bifrost.deskera.com/v1/webhooks/register
Curl
curl -X POST "https://bifrost.deskera.com/webhooks/register" -H "accept: application/json" -H "x-access-token: sampleaccesstoken" -H "Content-Type: application/json" -d "{ \"clientId\" : \"cl_pub...\", \"clientSecret\" : \"cl_priv...\", \"accessToken\" : \"sampleaccesstoken\", \"refreshToken\" : \"samplerefreshtoken\", \"eventType\" : \"CREATE_PRODUCTS\", \"webhookUrl\" : \"samplewebhookurl\" }"
Parameters
Request
NameLocated inDescriptionRequiredSchema
clientIdbodyClient IdYesstring
clientSecretbodyClient SecretYesstring
accessTokenbodyAccess TokenYesstring
refreshTokenbodyRefresh TokenYesstring
eventTypebodyEvent TypeYesenum
webhookUrlbodyClient SecretYesstring
x-access-tokenheaderAccess TokenYesstring
Response
NameLocated inDescriptionRequiredSchema
hookIdbodyWebhook IdYeslong
eventTypebodyEvent TypeYesenum
webhookUrlbodyWebhook UrlYesstring
deletedbodyStatusYesboolean
Sample Response
{
"hookId": 4,
"eventType":"CREATE_CRM_DEAL",
"webhookUrl":"https://fb3d2be15599.ngrok.io/api/webhooks",
"deleted": false
}
note

Store hookId for future reference and deregistration.

Deregister Webhook

DELETE

/v1/webhooks/delete/{id}

Request URL
https://bifrost.deskera.com/v1/webhooks/delete/{id}
Curl
curl -X DELETE "https://bifrost.deskera.com/v1/webhooks/delete/8" -H "x-access-token: sampleaccesstoken"
Parameters
Request
NameLocated inDescriptionRequiredSchema
idpathWebhook IdYeslong
x-access-tokenheaderAccess TokenYesstring
Response
NameLocated inDescriptionRequiredSchema
hookIdbodyWebhook IdYeslong
eventTypebodyEvent TypeYesenum
webhookUrlbodyWebhook UrlYesstring
deletedbodyStatusYesboolean
Sample Response
{
"hookId": 4,
"eventType":"CREATE_CRM_DEAL",
"webhookUrl":"https://fb3d2be15599.ngrok.io/api/webhooks",
"deleted": false
}

List All Registered Webhooks

GET

/v1/webhooks

Request URL
https://bifrost.deskera.com/v1/webhooks
Curl
curl -X GET "https://bifrost.deskera.com/v1/webhooks" -H "x-access-token: sampleaccesstoken"
Parameters
Request
NameLocated inDescriptionRequiredSchema
x-access-tokenheaderAccess TokenYesstring
Response
NameLocated inDescriptionRequiredSchema
hookIdbodyWebhook IdYeslong
eventTypebodyEvent TypeYesenum
webhookUrlbodyWebhook UrlYesstring
deletedbodyStatusYesboolean
Sample Response
[
{
"hookId": 4,
"eventType":"CREATE_CRM_DEAL",
"webhookUrl":"https://fb3d2be15599.ngrok.io/api/webhooks",
"deleted": false
},
{
"hookId": 5,
"eventType":"UPDATE_CRM_DEAL",
"webhookUrl":"https://fb3d2be15599.ngrok.io/api/webhooks",
"deleted": false
}
]

Enums

eventTypes


EventDescription
CREATE_PRODUCTSTriggers when a Product is added in Books
CREATE_CONTACTTriggers when a Contact is added in Books
CREATE_BILLTriggers when a Bill is created in Books
UPDATE_BILLTriggers when a Bill is updated in Books
DELETE_BILLTriggers when a Bill is deleted in Books
CREATE_INVOICETriggers when an Invoice is created in Books
UPDATE_INVOICETriggers when an Invoice is updated in Books
DELETE_INVOICETriggers when an Invoice is deleted in Books
CREATE_DEBITNOTETriggers when a Debit Note is created in Books
UPDATE_DEBITNOTETriggers when a Debit Note is updated in Books
DELETE_DEBITNOTETriggers when a Debit Note is deleted in Books
CREATE_CREDITNOTETriggers when a Credit Note is created in Books
UPDATE_CREDITNOTETriggers when a Credit Note is updated in Books
DELETE_CREDITNOTETriggers when a Credit Note is deleted in Books
CREATE_CRM_CONTACTTriggers when a Contact is created in Sales
UPDATE_CRM_CONTACTTriggers when a Contact is updated in Sales
DELETE_CRM_CONTACTTriggers when a Contact is deleted in Sales
CREATE_CRM_DEALTriggers when a Deal is created in Sales
UPDATE_CRM_DEALTriggers when a Deal is updated in Sales
DELETE_CRM_DEALTriggers when a Deal is deleted in Sales
STOCK_INTriggers when the Stock is increased for a Product in Books
STOCK_OUTTriggers when the Stock is reduced for a Product in Books