# Catalogi API plugin

{% hint style="success" %}
The Catalogi API plugin is a ZGW plugin and can only be used in the GZAC edition.
{% endhint %}

The Catalogi API plugin can be used to access data stored in a ZGW (zaakgericht werken) catalogue. This is based on the Catalogi API standard created and used by the Dutch government.

## Configure the plugin

A plugin configuration is required before the plugin can be used. A general description on how to configure plugins can be found [here](https://github.com/valtimo-platform/valtimo/blob/v13-stable/documentation/features/plugins/broken-reference/README.md).

If the Catalogi API plugin is not visible in the plugin menu, it is possible the application is missing a dependency. Instructions on how to add the Catalogi API dependency can be found [here](https://docs.valtimo.nl/fundamentals/getting-started/modules/zgw/catalogi-api).

To configure this plugin the following properties have to be entered:

* **URL (`url`).** Contains the complete base URL of the Catalogi API to connect to. This generally includes the path `/api/v1/`.
* **Authentication plugin configuration (`authenticationPluginConfiguration`).** Reference to another plugin configuration that will be used to add authentication to any request performed on the Catalogi API. If no option is available in this field a plugin has to be configured that is able to authenticate for the specific application that hosts the Catalogi API. (e.g. OpenZaak)

An example plugin configuration:

<figure><img src="https://3330064618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq5dx9HWFJGshztp4binE%2Fuploads%2Fgit-blob-b005d62f9b72eba29637443b3aa4dae6246b343f%2Fconfigure-plugin%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

## Available actions

The Catalogi API plugin supports the following actions that can be configured in process links in order to retrieve type data.

A general description on how to create process links can be found [here](https://github.com/valtimo-platform/valtimo/blob/v13-stable/documentation/features/plugins/broken-reference/README.md).

### Retrieve statustypen

This action retrieves the statustypen collection containing the name and URL of the statustype and will assign it to a process variable.

When creating a process link the following properties have to be entered:

* **Process variable name**. This is the name of the process variable which value will be set to the found statustypen collection.
* **Zaaktype URL** (optional). This is the URL of the zaaktype for which the statustypen should be retrieved.

### Retrieve statustype

This action retrieves the statustype URL using the statustype description, and will assign it to a process variable.

When creating a process link the following properties have to be entered:

* **Statustype**. This description will be used to lookup the full statustype URL

  A full URL can also be set here. In that case, the value will be used directly without a lookup.
* **Process variable name**. This is the name of the process variable which value will be set to the found statustype URL.

An example action configuration:

<figure><img src="https://3330064618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq5dx9HWFJGshztp4binE%2Fuploads%2Fgit-blob-4bb1129717a5f69c78da92107cc01d0a3908b131%2Fretrieve-statustype.png?alt=media" alt=""><figcaption></figcaption></figure>

### Retrieve resultaattypen

This action retrieves a list of resultaattypen (containing the name and URL of each resultaattype) and will assign it to a process variable.

When creating a process link the following properties have to be entered:

* **Process variable name**. This is the name of the process variable which value will be set to the found resultaattypen collection.
* **Zaaktype URL** (optional). This is the URL of the zaaktype for which the resultaattypen should be retrieved.

### Retrieve resultaattype

This action retrieves the resultaattype URL using the resultaattype description, and will assign it to a process variable.

When creating a process link the following properties have to be entered:

* **Resultaattype**. This description will be used to lookup the full resultaattype URL

  A full URL can also be set here. In that case, the value will be used directly without a lookup.
* **Process variable name**. This is the name of the process variable which value will be set to the found resultaattype URL.

An example action configuration:

<figure><img src="https://3330064618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq5dx9HWFJGshztp4binE%2Fuploads%2Fgit-blob-94fc540786ede780aa7c016ee4b30ed59c069ef5%2Fretrieve-resultaattype.png?alt=media" alt=""><figcaption></figcaption></figure>

### Retrieve besluittype

This action retrieves the besluittype URL using the besluittype description, and will assign it to a process variable.

When creating a process link the following properties have to be entered:

* **Besluittype**. This description will be used to lookup the full besluittype URL

  A full URL can also be set here. In that case, the value will be used directly without a lookup.
* **Process variable name**. This is the name of the process variable which value will be set to the found besluittype URL.

An example action configuration:

<figure><img src="https://3330064618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq5dx9HWFJGshztp4binE%2Fuploads%2Fgit-blob-63ce960afab200d7ea05cddf546c697081b059e8%2Fretrieve-besluittype.png?alt=media" alt=""><figcaption></figcaption></figure>

## Available actions

The Catalogi API plugin supports the following actions that can be configured in process links in order to retrieve type data.

A general description on how to create process links can be found [here](https://docs.valtimo.nl/process/process-link#creating-a-plugin-process-link).

### Retrieve statustype

This action retrieves the statustype URL using the statustype description, and will assign it to a process variable.

When creating a process link the following properties have to be entered:

* **Statustype**. This description will be used to lookup the full statustype URL. A full URL can also be set here. In that case, the value will be used directly without a lookup.
* **Process variable name**. This is the name of the process variable which value will be set to the found statustype URL.

An example action configuration:

<figure><img src="https://3330064618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq5dx9HWFJGshztp4binE%2Fuploads%2Fgit-blob-4bb1129717a5f69c78da92107cc01d0a3908b131%2Fretrieve-statustype.png?alt=media" alt=""><figcaption></figcaption></figure>

### Retrieve resultaattype

This action retrieves the resultaattype URL using the resultaattype description, and will assign it to a process variable.

When creating a process link the following properties have to be entered:

* **Resultaattype**. This description will be used to lookup the full resultaattype URL. A full URL can also be set here. In that case, the value will be used directly without a lookup.
* **Process variable name**. This is the name of the process variable which value will be set to the found resultaattype URL.

An example action configuration:

<figure><img src="https://3330064618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq5dx9HWFJGshztp4binE%2Fuploads%2Fgit-blob-94fc540786ede780aa7c016ee4b30ed59c069ef5%2Fretrieve-resultaattype.png?alt=media" alt=""><figcaption></figcaption></figure>

### Retrieve besluittype

This action retrieves the besluittype URL using the besluittype description, and will assign it to a process variable.

When creating a process link the following properties have to be entered:

* **Besluittype**. This description will be used to lookup the full besluittype URL. A full URL can also be set here. In that case, the value will be used directly without a lookup.
* **Process variable name**. This is the name of the process variable which value will be set to the found besluittype URL.

An example action configuration:

<figure><img src="https://3330064618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq5dx9HWFJGshztp4binE%2Fuploads%2Fgit-blob-63ce960afab200d7ea05cddf546c697081b059e8%2Fretrieve-besluittype.png?alt=media" alt=""><figcaption></figcaption></figure>
