Structure

In this guide, we will look at how lists are structured in Studiewinkel, so you can include a logical path to list in your app.

Querying structure

To create a path to list in your app you could use the same structure we do.

Querying root level structure

curl -G 'https://lml-api.studiewinkel.nl/api/lml/v1/structure'
  --header 'Authorization: Bearer ey...'

This will return all root level items, you could put this in a select list and have your user make a selection.

Example response

[
    {
        "id": "clfck5u9h00088rmx7wmwgzfe",
        "name": "Academie Haptonomie3",
        "model": "SCHOOL",
        "resource": {
            "type": "HBO"
        }
    },
    {
        ...
    }
]

Now when your user selects one of the options, you can the items for the next level.

Querying root level structure

curl -G 'https://lml-api.studiewinkel.nl/api/lml/v1/structure?parent=clexz2vca00005lqcdpu5kz0l'
  --header 'Authorization: Bearer ey...'

This will return something like this.

Example response

[
    {
        "id": "clexz3ig600045lqcct9s5jkz",
        "name": "Emmen",
        "model": "TAG",
        "resource": null,
    },
    {
        "id": "clexzdf5e00065lqcym5z4q86",
        "name": "Assen",
        "model": "TAG",
        "resource": null,
    }
]

This you could repeat until the response contains lists.

Example response

[
    {
        "id": "clfvfmqh501e7cage6ewphcqc",
        "name": " Commerciƫle Economie 2022-2023 Leerjaar 1 Propedeuse",
        "model": "LIST",
        "resource": {
            "slug": "BL059580",
            "status": "CONCEPT",
            "schoolYear": "DEPRECATED"
        }
]

Now when your user selects a list you could redirect them to the page where you render the list if the status equals published or add them to a notification queue if the list is not yet available.