API structure

Starting point

A GET request on the URL /bookprocesses/book returns a HAL+JSON object containing basic details of each book process.

Example response:

HTTP/2 200 OK
Content-Type: application/hal+json

{
    "_embedded": {
        "bookprocess": [
            {
                "id": 1,
                "name": "Climbing tickets",
                "_links": {
                    "self": {
                        "href": "{...}/bookprocesses/book/1",
                        "method": "GET",
                    },
                    "start": {
                        "href": "{...}/bookprocesses/book/1/1",
                        "method": "POST",
                    },
                },
            },
        ],
    },
}

The start link contained in each book process object is the starting URL for a single book process.

Single book process

Each book process step should respond with a HAL+json response containing the following keys:

  • form

  • recap

  • _links

form is a list of elements representing form elements. These elements generally follow the form of HTML5 form elements, e.g. an element with type equal to date represents a date input.

These types of elements may be expected:

  • checkbox

  • date

  • email

  • group

  • hidden

  • number

  • select

  • static

  • tel

  • text

  • time

recap contains a title string and an items list, containing 0 or more objects with a label and a value.