The PiM ID API allows you to create tamper-proof QR-code images from validated and verified customer data, that you can integrate into your services (for example on login pages). Your customers can scan the company-specific QR-code with the PiM application on their phone.

API specification

Test the API on SwaggerHub

Base URL

Conceptual model

Conceptual model


Registered Redirect URL

After the purchase of the API, KPN will contact you to request a Redirect URL and lets you know how to reference this in the API (see redirect parameter). In the future, an additional API endpoint will be introduced that allows you to manage these Redirect URLs.



The General Data Protection Regulation is a regulation in EU law on data protection and privacy in the European Union and the European Economic Area. It also addresses the transfer of personal data outside the EU and EEA areas.


A QR-code (abbreviated from Quick Response code) is a type of matrix barcode (or two-dimensional barcode).


Base64 is an encoding algorithm that allows you to transform any characters into an alphabet that consists of Latin letters, digits, plus and slash.

API workflow

Workflow diagram

Features (for API store customers)

  • Secure QR-codes.

  • Company-specific QR-codes.

  • Fully encrypted.

  • GDPR compliant.

Getting started


This API follows the KPN Store API Authentication Standard to secure the API. It includes the use of OAuth 2.0 client_id and client_secret to receive an access token. Go to the Authentication tab on top of this page to find out how to generate an access token.

How to...

Create a QR-code

This endpoint generates a QR-code as a Base64 byte array. Attributes provide the customer name, e-mail address, telephone number, address details and bank account number, or any other customer attributes.



^^Request body example^^
  "redirect": "1",
  "title": "Enter the title here",
  "description": "Enter more information here",
  "attributes": "Email,Mobile,Bankaccountnumber,NickName,Initials,FirstName,FamilyNamePrefix,FamilyName,BirthName,DateOfBirth,PlaceOfBirth,Gender,HeadShot,BankIdentificationNumber,BankAccountHolderName",
  "width": "400",
  "height": "400"

Parameter Type Description
redirect integer A reference to the Redirect URL registered with PiM. For example: 1. See Requirements
title string The title of the QR-code image.
description string Here you can describe what information you need from your customers to create the QR-code.
attributes string Allowed attributes: Email, Mobile, Bankaccountnumber, NickName, Initials, FirstName, FamilyNamePrefix, FamilyName, BirthName, DateOfBirth, PlaceOfBirth, Gender, HeadShot, BankIdentificationNumber, BankAccountHolderName.
width number The width of the QR-code image in pixels.
height number The height of the QR-code image in pixels.


The response is a Base64 encoded byte array formatted SVG file. This byte array can also be downloaded.

On the client-side, you need to use a Base64 decode algorithm to convert the response into a usable format. In this case, that is an SVG image of the QR-code.

Return codes

Code Description
200 Success.
201 Created.
202 Accepted.
302 Found. Link in location header.
400 Bad request.
401 Unauthorized.
403 Forbidden.
404 Not found.
405 Method not allowed.
412 Precondition failed.
429 Too many requests.
500 Internal server error.
502 Bad gateway.
503 Service unavailable.

Mopinion feedback