Skip to main content
AcademytutorialSet up a Woo register in OpenRegister

Set up a Woo register in OpenRegister

Import the canonical Woo register into OpenRegister. One API call, ten TOOI categories, ready to store publications.

TutorialWooOpenRegisterPublicationsTOOIOpen dataTutorial series
6 min read

The Dutch Open Government Act (Woo) requires government bodies to publish documents in eleven information categories. OpenRegister provides the storage model for that. In this tutorial you import the canonical Woo register, with all TOOI categories, in a few minutes.

The follow-up tutorial on uploading files builds on this.

In the examples we use the local dev environment at http://localhost:8080 with admin:admin. Replace those with your own host and credentials.

The canonical source

The Woo register already exists, published by Conduction on GitHub:

https://raw.githubusercontent.com/ConductionNL/woo-website/main/website/static/oas/woo_register.json

It is an OpenAPI bundle of 1.0.1, with one register (woo) and ten schemas. Each schema contains the TOOI metadata of one Woo information category:

SlugCategory
vergaderstukken_decentrale_overhedenMeeting documents of decentralised authorities
subsidieverplichtingen_anders_dan_met_beschikkingSubsidy obligations without a decision
overige_besluiten_van_algemene_strekkingOther decisions of general scope
organisatie_en_werkwijzeOrganisation and working methods
ontwerpen_van_wet_en_regelgeving_met_adviesaanvraagDrafts of laws and regulations
onderzoeksrapportenResearch reports
klachtoordelenComplaint rulings
wetten_en_algemeen_verbindende_voorschriftenLaws and generally binding regulations
woo_verzoeken_en_besluitenWoo requests and decisions
convenantenCovenants
agendas_en_besluitenlijsten_bestuurscollegesAgendas and decision lists of executive boards
vergaderstukken_staten_generaalMeeting documents of the States General
adviezenAdvisory reports

Step 1: Import the register

OpenRegister has an import/url endpoint that fetches an OpenAPI bundle and converts it in one transaction into register, schemas, and (optionally) seed objects.

curl -u admin:admin \
  -X POST "http://localhost:8080/index.php/apps/openregister/api/configurations/import/url" \
  -H "OCS-APIRequest: true" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://raw.githubusercontent.com/ConductionNL/woo-website/main/website/static/oas/woo_register.json"
  }'

If all goes well, you get back:

{
  "success": true,
  "message": "Configuration imported successfully from url",
  "configurationId": 271,
  "result": {
    "registersCount": 1,
    "schemasCount": 10,
    "objectsCount": 0
  }
}

registersCount: 1 and schemasCount: 10 confirm that everything was created. The configurationId is what you need later if you want to re-sync the source.

Step 2: Verify what was created

Request the list of registers and filter on slug woo:

curl -u admin:admin \
  "http://localhost:8080/index.php/apps/openregister/api/registers" \
  -H "OCS-APIRequest: true"

In the response you find an entry like:

{
  "id": 924,
  "uuid": "cd44ca36-e3de-4d6f-9af9-abbb49710c83",
  "slug": "woo",
  "title": "Woo",
  "version": "1.0.1",
  "description": "Woo register with TOOI information categories",
  "schemas": [1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628]
}

The id is your internal register id (924 in this example, yours may differ). The slug woo is stable and you use it in all further API calls.

In the UI you find the register under Apps -> OpenRegister -> Registers:

The Woo register in the OpenRegister UI, with the ten TOOI schemas in the sidebar

Click View Details in the Actions menu of the card for a statistics panel:

The detail panel with statistics for the Woo register: number of objects, logs, files, and schemas

Step 3: Look at the schemas

The TOOI schemas are metadata schemas. Each schema contains seven fields:

FieldTypeDescription
tooiCategorieNaamstring (required)Name of the category
tooiCategorieIdstringTOOI id, for example c_fdaee95e
tooiCategorieUristringFull TOOI URI
tooiThemaNaamstringOptional theme
tooiThemaIdstringOptional theme id
tooiThemaUristringOptional theme URI
valuesarrayFree-form key-value pairs

The categorieId and categorieUri are const in the schema. You do not have to fill them yourself. OpenRegister fills them automatically as soon as you set tooiCategorieNaam.

The Schemas page in OpenRegister

Step 4: Create your first publication

Test your register with one publication. We use the category onderzoeksrapporten:

curl -u admin:admin \
  -X POST "http://localhost:8080/index.php/apps/openregister/api/objects/woo/onderzoeksrapporten" \
  -H "OCS-APIRequest: true" \
  -H "Content-Type: application/json" \
  -d '{
    "tooiCategorieNaam": "onderzoeksrapporten"
  }'

The response shows, among other things:

{
  "id": "3422e6cd-1ba5-478c-b842-8f206f9d7358",
  "tooiCategorieNaam": "onderzoeksrapporten",
  "tooiCategorieId": "c_fdaee95e",
  "tooiCategorieUri": "https://identifier.overheid.nl/tooi/def/thes/kern/c_fdaee95e",
  "@self": {
    "register": "924",
    "schema": "1624",
    "uri": "http://localhost:8080/apps/openregister/api/objects/924/1624/3422e6cd-...",
    "owner": "admin",
    "created": "2026-05-07T05:12:24+00:00"
  }
}

OpenRegister filled in the TOOI id and URI itself. The object has a UUID. Remember that UUID. You need it to attach files to this publication.

Step 5 (optional): Add your own fields

The canonical schemas cover the TOOI metadata, not the content of the publication itself. For title, description, date, and responsible organisation, you create your own additional schema, or extend an existing one.

A minimal extension for onderzoeksrapporten looks like this:

{
  "title": "Research report publication",
  "properties": {
    "titel": { "type": "string", "maxLength": 255 },
    "omschrijving": { "type": "string", "maxLength": 2000 },
    "openbaarmakingsdatum": { "type": "string", "format": "date" },
    "verantwoordelijkeOrganisatie": { "type": "string" }
  },
  "required": ["titel", "openbaarmakingsdatum"]
}

You can create such a schema via POST /api/schemas and then add it to the Woo register configuration. Keep it as close as possible to the DiWoo metadata standard so your publications can be picked up by PLOOI and woogle.nl as well.

And now

You have:

  • A working Woo register with ten TOOI schemas
  • One test publication with a UUID
  • A pattern to add your own fields where needed

In the follow-up tutorial you attach files to this publication, from a few PDFs to large video files in chunks.

Cleanup

If you want to delete the test register:

curl -u admin:admin \
  -X DELETE "http://localhost:8080/index.php/apps/openregister/api/registers/924" \
  -H "OCS-APIRequest: true"

This removes the register, all schemas, and all objects. The configuration import itself remains, so you can replay it.