Webhooks¶
Current version: 0.1
Global Overview (Globaal overzicht)¶
Webhooks can be created to be notified in real-time of events occurring within Recras. Webhooks can currently only be managed via the REST API.
- The payloads have a standard wrapper structure, in which
data
contains the actual payload.version
contains the current version number; this changes when there are changes in the implementation. { "version": "0.1", "data": { }, "meta": { } }
- Available custom webhooks (Names):
BookingDefinitive
InvoiceDefinitive
- Available standard webhooks have the format “ObjectName::EventName”. For internal object names, please contact support for now. Standard events for objects are:
postInsert
postUpdate, bevat naast data ook een modified array
postSave, bevat naast data ook een modified array als het een update is
postDelete
- List of standard webhooks:
APIKey::postSave
APIKey::postDeleteAPIKey::postUpdate
APIKey::postInsert
Arrangement::postSave
Arrangement::postDelete
Arrangement::postUpdate
Arrangement::postInsert
Attachment::postSave
Attachment::postDelete
Attachment::postUpdate
Attachment::postInsert
Bedrijf::postSave
Bedrijf::postDelete
Bedrijf::postUpdate
Bedrijf::postInsert
Betaalmethode::postSave
Betaalmethode::postDelete
Betaalmethode::postUpdate
Betaalmethode::postInsert
Boeking::postSave
Boeking::postDelete
Boeking::postUpdate
Boeking::postInsert
Boekingsmail::postSave
Boekingsmail::postDelete
Boekingsmail::postUpdate
Boekingsmail::postInsert
BoekingsmailZending::postSave
BoekingsmailZending::postDelete
BoekingsmailZending::postUpdate
BoekingsmailZending::postInsert
Boekingsvoorstel::postSave
Boekingsvoorstel::postDelete
Boekingsvoorstel::postUpdate
Boekingsvoorstel::postInsert
BoekingsvoorstelType::postSave
BoekingsvoorstelType::postDelete
BoekingsvoorstelType::postUpdate
BoekingsvoorstelType::postInsert
BookProcess::postSave
BookProcess::postDelete
BookProcess::postUpdate
BookProcess::postInsert
Contact::postSave
Contact::postDelete
Contact::postUpdate
Contact::postInsert
Contactformulier::postSave
Contactformulier::postDelete
Contactformulier::postUpdate
Contactformulier::postInsert
Contactmoment::postSave
Contactmoment::postDelete
Contactmoment::postUpdate
Contactmoment::postInsert
Contactpersoon::postSave
Contactpersoon::postDelete
Contactpersoon::postUpdate
Contactpersoon::postInsert
Dienst::postSave
Dienst::postDelete
Dienst::postUpdate
Dienst::postInsert
Factuur::postSave
Factuur::postDelete
Factuur::postUpdate
Factuur::postInsert
FactuurBetaling::postSave
FactuurBetaling::postDelete
FactuurBetaling::postUpdate
FactuurBetaling::postInsert
IncomingMail::postSave
IncomingMail::postDelete
IncomingMail::postUpdate
IncomingMail::postInsert
IncomingMailAddress::postSave
IncomingMailAddress::postDelete
IncomingMailAddress::postUpdate
IncomingMailAddress::postInsert
Integration::postSave
Integration::postDelete
Integration::postUpdate
Integration::postInsert
Kassa::postSave
Kassa::postDelete
Kassa::postUpdate
Kassa::postInsert
Kassalogboek::postSave
Kassalogboek::postDelete
Kassalogboek::postUpdate
Kassalogboek::postInsert
Klant::postSave
Klant::postDelete
Klant::postUpdate
Klant::postInsert
Kortingscode::postSave
Kortingscode::postDelete
Kortingscode::postUpdate
Kortingscode::postInsert
Kwalificatie::postSave
Kwalificatie::postDelete
Kwalificatie::postUpdate
Kwalificatie::postInsert
LeverancierContact::postSave
LeverancierContact::postDelete
LeverancierContact::postUpdate
LeverancierContact::postInsert
Locatie::postSave
Locatie::postDelete
Locatie::postUpdate
Locatie::postInsert
Materiaal::postSave
Materiaal::postDelete
Materiaal::postUpdate
Materiaal::postInsert
OverigContact::postSave
OverigContact::postDelete
OverigContact::postUpdate
OverigContact::postInsert
PdfTemplate::postSave
PdfTemplate::postDelete
PdfTemplate::postUpdate
PdfTemplate::postInsert
PersoneelBeschikbaarheid::postSave
PersoneelBeschikbaarheid::postDelete
PersoneelBeschikbaarheid::postUpdate
PersoneelBeschikbaarheid::postInsert
PersoneelContact::postSave
PersoneelContact::postDelete
PersoneelContact::postUpdate
PersoneelContact::postInsert
ProductGroep::postSave
ProductGroep::postDelete
ProductGroep::postUpdate
ProductGroep::postInsert
QueuedMail::postSave
QueuedMail::postDelete
QueuedMail::postUpdate
QueuedMail::postInsert
Standaardbijlage::postSave
Standaardbijlage::postDelete
Standaardbijlage::postUpdate
Standaardbijlage::postInsert
Startmoment::postSave
Startmoment::postDelete
Startmoment::postUpdate
Startmoment::postInsert
Startmomentgroep::postSave
Startmomentgroep::postDelete
Startmomentgroep::postUpdate
Startmomentgroep::postInsert
Statusherinnering::postSave
Statusherinnering::postDelete
Statusherinnering::postUpdate
Statusherinnering::postInsert
Urenregistratie::postSave
Urenregistratie::postDelete
Urenregistratie::postUpdate
Urenregistratie::postInsert
Voucher::postSave
Voucher::postDelete
Voucher::postUpdate
Voucher::postInsert
VoucherTemplate::postSave
VoucherTemplate::postDelete
VoucherTemplate::postUpdate
VoucherTemplate::postInsert
Webhook::postSave
Webhook::postDelete
Webhook::postUpdate
Webhook::postInsert
sfGuardGroup::postSave
sfGuardGroup::postDelete
sfGuardGroup::postUpdate
sfGuardGroup::postInsert
sfGuardUser::postSave
sfGuardUser::postDelete
sfGuardUser::postUpdate
sfGuardUser::postInsert
Webhooks¶
- GET /api2/webhooks¶
Via this endpoint, the registered “webhooks” can be requested.
Example request:
GET /api2/webhooks HTTP/1.1 Host: demo.recras.nl Accept: application/json
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ { "id": 1, "created_by": null, "updated_by": null, "created_at": "-001-11-30T00:00:00+00:19", "updated_at": "-001-11-30T00:00:00+00:19", "name": "test", "url": "https://test.nl/webhook", "active": true } ]
- Status Codes:
200 OK – no error
Register Webhook (Webhook Registreren)¶
- POST /api2/webhooks¶
With this endpoint, it is possible to create a webhook.
Example request:
POST /api2/webhooks HTTP/1.1 Host: demo.recras.nl Content-Type: application/json { "url": "https://test.nl/webhook", "name": "Contactpersoon::postInsert", "active": true }
- JSON Parameters:
url (URL) – Required URL of the webhook to be called.
name (string) – Required Name of the webhook to hook into; see above for a list of available webhooks.
active (bool) – Whether the webhook is active or not.
Example response:
HTTP/1.1 201 OK Content-Type: application/json { "id": 1, "created_by": null, "updated_by": null, "created_at": "-001-11-30T00:00:00+00:19", "updated_at": "-001-11-30T00:00:00+00:19", "name": "Contactpersoon::postInsert", "url": "https://test.nl/webhook", "active": true }
Deregister Webhook (Webhook Deregistreren)¶
- DELETE /api2/webhooks/<id>¶
With this endpoint, it is possible to delete a webhook.
Example request:
DELETE /api2/webhooks HTTP/1.1 Host: demo.recras.nl
Example response:
HTTP/1.1 200 OK
Webhook Update¶
- PUT /api2/webhooks/<id>¶
With this endpoint, it is possible to modify a webhook.
Example request:
PUT /api2/webhooks/<id> HTTP/1.1 Host: demo.recras.nl Content-Type: application/json { "url": "https://test.nl/webhook", "name": "", "active": true }
- JSON Parameters:
url (URL) – URL of the webhook to be called.
name (string) – Name of the webhook to hook into.
active (bool) – Whether the webhook is active or not.
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "created_by": null, "updated_by": null, "created_at": "-001-11-30T00:00:00+00:19", "updated_at": "-001-11-30T00:00:00+00:19", "name": "Contactpersoon::postInsert", "url": "https://test.nl/webhook", "active": true }