Skip to main content

Use of Subscriptions for Notifications

What is a subscription?

A subscription (abonnement) is a registration that allows an application to be automatically notified of changes.

Examples

  • A client application that needs to update information when a case is closed can receive notifications when the end status of cases is set;
  • A client that indexes documents can receive a notification when documents are created or changed.

Recommendations

  • Only create subscriptions for objects or events that are relevant to your application;
  • Restrict the number of notifications by using filter values in your subscriptions;
  • Regularly check whether the subscriptions are still needed and remove unnecessary subscriptions;
  • Keep the authorization structure in mind: subscriptions do not grant access to objects for which you do not have rights.

Fields in the Subscription Creation Message

Field NameDescriptionValue TypeExample
callbackUrlThe URL to which notifications will be sent.URLhttps://myapp.zaakgerichtwerken.nl/webhook
authValue of bearer tokenStringBearer 8a0WWCKMgh1EIBlD2g1b6yQDtTpIgFYE
kanalenChannels to which you can subscribe. Standard channels are zaken, besluiten, documenten, zaaktypen, besluittypen, informatieobjecttypen and autorisatiesArray of Objects. Each object consists of filters (explained below) and the name of the channelSee below

Possible Values for Filters

Filters allow your application to limit the notifications it receives to only those changes that match specific criteria. Each channel supports its own set of filter fields. When evaluating filter values, they are combined using AND logic, meaning that only changes matching all specified filters will trigger a notification. Below you will find the possible filter fields for each channel. The value of a filter field always is a single string. If you need to subscribe to multiple values you can either create multiple subscriptions or an array of channels within a subscription.

Filters for the Zaken channel

Filter KeyDescriptionAllowed/Example Values
#resourceThe resources as listed in the ZGW Open Api Specification, and presented in the resource field in the notification message itselfzaak, status, zaakobject, zaakinformatieobject, zaakeigenschap, rol, resultaat, zaakbesluit
#actionThe actions as listed in the ZGW Open Api Specification, and presented in the resource field in the notification message itselfcreate, update, destroy
bronorganisatieThe rsin of the organization that initiated or owns the case in the field bronorganisatie000001375
zaaktypeURL's of the casetype versions of the case in the field zaaktypehttps://ztc.zgw.nl/api/v1/zaaktypen/b1fac1a1-7117-1e50-1d01-d155a715f1ed
vertrouwelijkheidaanduidingThe confidentiality indication of the case in field vertrouwelijkheidaanduidingopenbaar, beperkt_openbaar, intern, zaakvertrouwelijk, vertrouwelijk, confidentieel, geheim, zeer_geheim
zaaktype_identificatieThe case type in the field 'identificatie' of zaaktypeRX-ADVIES
archiefstatusThe archival status of the case in field archiefstatusnog_te_archiveren, gearchiveerd, gearchiveerd_procestermijn_onbekend, overgedragen
archiefnominatieThe archival nomination of the case in field archiefnominatie.blijvend_bewaren, vernietigen
opdrachtgevende_organisatieThe rsin of the organization that commissioned the case in field opdrachtgevendeOrganisatie123443210
catalogusThe URL of the catalog to which the case type belongs.https://ztc.zgw.nl/api/v1/catalogussen/fe0ff0r5-fdd1-5011-1177-d15ac1d1f1ed456
domeinThe domain of the catalog in field domein of catalogusVTH
is_eindzaakstatusIndicates whether the case is in its final status in field isEindstatus of statustype.True, False

Filters for the Besluiten channel

Filter KeyDescriptionAllowed/Example Values
#resourcethe resources as listed in the ZGW Open Api Specification, and presented in the resource field in the notification message itselfbesluit, besluitinformatieobject
#actionThe actions as listed in the ZGW Open Api Specification, and presented in the resource field in the notification message itselfcreate, update, destroy
besluittypeURL of the decision type version in the field besluittypehttps://ztc.zgw.nl/api/v1/besluittypen/ce571dae-f0c1-a1e5-115a-f1acc1d171e5
verantwoordelijke_organisatieRsin of the organisation responsible for the decision in field verantwoordelijkeOrganisatie010110100
besluittype_omschrijvingThe decision type in field omschrijving of besluittypeBeschikken op aanvraag
catalogusThe URL of the catalog in field catalogus of besluittypehttps://ztc.zgw.nl/api/v1/catalogussen/fe0ff0r5-fdd1-5011-1177-d15ac1d1f1ed
domeinThe domain of the catalog in field domein of catalogusVTH

Filters for the Documenten channel

Filter KeyDescriptionAllowed/Example Values
#resourcethe resources as listed in the ZGW Open Api Specification, and presented in the resource field in the notification message itselfenkelvoudiginformatieobject, gebruiksrechten, verzending
#actionThe actions as listed in the ZGW Open Api Specification, and presented in the resource field in the notification message itselfcreate, update, destroy
bronorganisatieThe rsin of the organization that initiated or received and owns the document in the field bronorganisatie813264571
informatieobjecttypeURL of the information object type version in field informatieobjecttypehttps://ztc.zgw.nl/api/v1/informatieobjecttypen/cadd1ce5-5a1a-7070-dabb-c1a551f1ab1e
vertrouwelijkheidaanduidingConfidentiality indication in field vertrouwelijkheidaanduidingopenbaar, beperkt_openbaar, intern, zaakvertrouwelijk, vertrouwelijk, confidentieel, geheim, zeer_geheim
informatieobjecttype_omschrijvingDocument type in field omschrijving of informatieobjecttypeBijlage bij verzoek
catalogusThe URL of the catalog in field catalogus of informatieobjecttypehttps://ztc.zgw.nl/api/v1/catalogussen/fe0ff0r5-fdd1-5011-1177-d15ac1d1f1ed
domeinThe domain of the catalog in field domein of catalogusVTH
statusStatus of the document in field statusin_bewerking, ter_vaststelling, definitief, gearchiveerd
inhoud_is_vervallenWhether the content has expired in field inhoudIsVervallenTrue, False

Filters for the Zaaktypen channel

Filter KeyDescriptionAllowed/Example Values
#resourcethe resources as listed in the ZGW Open Api Specification, and presented in the resource field in the notification message itselfzaaktype
#actionThe actions as listed in the ZGW Open Api Specification, and presented in the resource field in the notification message itselfcreate, update, destroy
catalogusThe URL of the catalog in field catalogushttps://ztc.zgw.nl/api/v1/catalogussen/fe0ff0r5-fdd1-5011-1177-d15ac1d1f1ed
domeinThe domain of the catalog in field domein of catalogusVTH

Filters for the Informatieobjecttypen channel

Filter KeyDescriptionAllowed/Example Values
#resourcethe resources as listed in the ZGW Open Api Specification, and presented in the resource field in the notification message itselfinformatieobjecttype
#actionThe actions as listed in the ZGW Open Api Specification, and presented in the resource field in the notification message itselfcreate, update, destroy
catalogusThe URL of the catalog in field catalogushttps://ztc.zgw.nl/api/v1/catalogussen/fe0ff0r5-fdd1-5011-1177-d15ac1d1f1ed
domeinThe domain of the catalog in field domein of catalogusVTH

Filters for the Besluittypen channel

Filter KeyDescriptionAllowed/Example Values
#resourcethe resources as listed in the ZGW Open Api Specification, and presented in the resource field in the notification message itselfbesluittype
#actionThe actions as listed in the ZGW Open Api Specification, and presented in the resource field in the notification message itselfcreate, update, destroy
catalogusThe URL of the catalog in field catalogushttps://.../catalogi/fe0ff0r5-fdd1-5011-1177-d15ac1d1f1ed
domeinThe domain of the catalog in field domein of catalogusVTH

Example: get a notification when the case in the VTH domain has closed

{
"callbackUrl": "https://myapp.zaakgerichtwerken.nl/webhook",
"auth": "Bearer 8a0WWCKMgh1EIBlD2g1b6yQDtTpIgFYE",
"kanalen": [
{
"filters": {
"domein": "VTH",
"is_eindzaakstatus": "True"
},
"naam": "zaken"
}
]
}

More information

See the general documentation on notifications and API notifications.