Skip to main content
Adding a Dynamic HTML block to your Page will give you full control over the content on the page. Your server decides what content will be displayed. To let your portal page interact with your server, you should know how we call your endpoint to get the HTML content.

The request

The moment your customer will open your Page, a HTTP-request will done towards the endpoint you have provided. You can protect this endpoint with Basic Auth or an Authentication header. To identify the customer which opened the page, do we send an header with the identifier.
HeaderDescriptionExample
AcceptMijnKlantportaal accepts (and expects) HTMLtext/html
X-Customer-IdThe ID of the customer which opened the pagecst_123abc456def
X-Page-IdThe ID of the page which needs your HTML contentpag_123abc456def

The response

The request is covered by authentication, but the response should be protected too. Therefor do we expect a certain content in your response to make your HTML enter your MijnKlantportaal page. Add the following headers to your response:
HeaderDescriptionExample
Content-TypeLet our server know that you, indeed, are sending HTML as responsetext/html
X-ChecksumA checksum to validate that the response is actually coming from your server. See further on this page how to generate this1e5e791547c14e581e09...
The body should be the actual, raw, HTML text you want to add to your Page. Failure in providing the correct headers will result in a rejected call to your endpoint and so will not show up your HTML.

The X-Checksum header

To make sure that the HTML is actually coming from your server, you have to add a checksum in the header. This checksum will be a Hash-based Message Authentication Code (HMAC) signature based on some values. This signature needs to be included in your response in the X-Checksum header. The data that needs to be used are:
TypeValue
AlgorithmSHA256
DataIDOfYourCustomer,IDOfYourPage - For example: cst_123abc456def,pag_123abc456def. Be aware: no spaces!
KeyThe key you have provided when creating the block
I