To set up a webhook endpoint you must specify the fund-id
, and the enabled_events
to describe the targeted fund and the event types that your webhook endpoint wants to be notified about. You must also provide an URL to your endpoint, and it must pass a simple validation request as described below.
Validation request
The validation request is an HTTP GET
that contains a random validation key in the x-anduin-webhook-validation-key
header. To pass the validation your endpoint need to respond with a 200 status code and include the same header with the validation key. The validation request could be written using cURL
as:
curl -X GET https:\\yourdomain.com -H 'x-anduin-webhook-validation-key: [RANDOM_VALIDATIONKEY]'
Event payloads
Upon successful validation, your webhook endpoint will start to receive events of the subscribed fund. Events will be sent via an HTTP POST
to your endpoint with the body contain the payload describing the event detail. We currently have 4 types of event: new_investor_added
, subscription_status_changed
, subscription_close_changed
, and subscription_tags_changed
. All the event payload will have the following default fields:
{
fundId: String // the ID of the fund,
event: String // event type name
lpId: String // the ID of the investor,
customId: String // the custom ID attached to the order
contacts: [ // the list of contact info of investor and collaborators. The first one is the main investor.
{
email: String,
firstName: String,
lastName: String
}
]
close: { // the close this order belongs to
id: String,
customId: String,
name: String,
targetDate: String // date in format of dd/mm/yyyy for example 20/10/2023
}
tags: [String] // an array of string represents tags attached to this order
medatada: { // a free JSON object attaced to the order (via invitation API or update order API)
"field-1": "value-1",
"field-2": "value-2"
}
createdAt: String // Timestamp string in ISO format, for example: 2022-07-28T18:48:58.695763842Z
}
Beside the default fields above, each event might have some specific field:
subscription_status_changed
event payload:
{
...
previousStatus: String // the previous status. For possible values please check the OrderStatus in our GraphQL schema
newStatus: String // the new status.
}
subscription_close_changed
event payload:
{
...
previousClose: { // the close this order originially belongs to before the event
id: String,
customId: String,
name: String,
targetDate: String // date in format of dd/mm/yyyy for example 20/10/2023
}
}
subscription_tags_changed
event payload:
{
...
previousTags: [String] // List of tags prior to the change. This field is omitted when there is no tags originally
}
documents_uploaded
event payload:
{
...
files: [ // List of uploaded files info
{
fileId: String,
fileName: String
}
]
documentType: String
}
The documentType
field can be one of the following values:
LP_SIGNED_DOC
FILLED_FORM
COUNTERSIGNED_DOC
DISTRIBUTED_DOC
SUPPORTING_DOC