Webhooks
Webhooks provides additional integration possibilities and is a vital part of VAKA Onlines event-driven API design and asynchronous request-response pattern. Webhooks lets VAKA Online push events to your service, to react on when they occur. Types of events can be a result of a previous request or when changes has been made on a particular entity.
One ore more webhooks can be registered on your integration using the Webhook API, to subscribe on the desired event types.
Webhooks is always delivered as a POST request with a JSON payload using the application/json content type. The URL receiving the webhook must use the https scheme (meaning https:// in the beginning of the URL).
Webhook Payload
All webhook events uses the same payload format.
object
{
correlationId: string
eventType: string
eventData: object
timestamp: string
}{
"correlationId": "f2be8082-5815-4f57-be97-b1e730ceda85",
"eventType": "operationResult",
"eventData": {
"succeded": true,
"errorCode": null,
"errorDescription": null
},
"timestamp": "2024-01-01T00:30:00.1231Z"
}correlationId
Identifier of the event or the API request the event is related to.
eventType
Identifies the type of event. See the Event Types and Data section for more details.
eventData
Event data specific for the type of event.
timestamp
The time when the event occurred.
Event Types and Data
The following event types is supported:
operationResult
operationResultEvent that signals the completion of an door control action previously requested from the Doors API. See door control error codes for possible error codes.
succeded
Indicates if the operation succeded (true) or not (false).
errorCode
If unsuccessful, an error code identifying the cause.
errorDescription
If unsuccessful, an readable description of the cause.
data.doorId
Identifier of the targeted door.
reservationResult
reservationResultEvent that signals the completion of a reservation request or reservation cancellation previously requested from the Reservations API. See reservation error codes for possible error codes.
succeded
Indicates if the operation succeded (true) or not (false).
errorCode
If unsuccessful, an error code identifying the cause.
errorDescription
If unsuccessful, an readable description of the cause.
data.reservationId
If successful, identifier of the reservation.
Last updated