# Redaction
Redaction scope
Redaction is currently available only in Signicat Paper processes for hiding the BSN number (personalIdentificationNumber
) in Dutch ID document images. If you need this feature for other fields, please contact Signicat at support@signicat.com.
The Assure API’s redaction feature allows masking parts of the images of the ID document that is used during a verification process. This is useful, for example, to comply with privacy laws in some countries.
If you enable redaction in a process, the images you can get after the process is finished, are returned redacted. This means the indicated fields will be covered with a black square. This example shows a black square over some selected fields in a Dutch passport (see more examples further down):
Note
The images in the dossier remain untouched since redaction is applied only to the images in the process.
# Request
Whenever you want to use redaction, you must send the redact
parameter in the request body. For this parameter, you define the field you want cover in the image (currently only personalIdentificationNumber
for Dutch ID documents).
# In the eIDV generic flow (Signicat Paper provider only)
If you integrate with the Assure API using the generic eIDV flow, you set the redaction field in the Create process request body. In this example, personalIdentificationNumber
is redacted from the ID image of a Dutch passport:
{
"provider": "signicatpaper",
"documentType": "passport",
"documentCountry": "NLD",
"redact": ["personalIdentificationNumber"],
"redactionLevel": "standard"
}
# In the eIDV alternative flow
If you integrate with the Assure API using the alternative eIDV flow, you set the redaction field in the Start capture flow request body. In this example the gender and document number should be redacted from the ID image of a Dutch ID card):
{
"providers": [
{
"provider": "signicatpaper",
"redact": ["documentNumber", "gender"]
}
],
"redirectUrl": "https://your-redirect-url.com"
}
# Redaction level (size)
If the field on the ID paper image is not fully redacted, you may increase the redaction size in the Create process request body (currently you can only set this for Create process). Then you change the redactionLevel
parameter from standard size (smallest) to one of the bigger sizes for the bounding box. This increases the bounding size in all directions.
You can choose between the following sizes:
standard
medium
high
veryHigh
Here is a code example:
{
"redact": [
"personal_number",
"document_number",
"surname"
],
"redactionLevel": "medium"
}
Note
Before you decide on a size, we recommend testing the whole redaction process to see how the images look in the response.
# Response
As usual, when the verification is finished, you can use the Get process request to get information about the process and also the Get image service to retrieve the ID images used to perform the verification.
In the Get process response, you get redactionResult
with information about the redaction.
"redactionResult": {
"isFullRedaction": true,
"isPartialRedaction": true
}
isFullRedaction
indicates if all fields were successfully redacted (true) or if at least one of them failed to be redacted (false). This usually happens if the indicated field was not found in the document.
isPartialRedaction
indicates if at least one field was successfully redacted (true) or if none of the indicated fields was redacted (false).
Note
Redaction may occur regardless the final status of the process. In the example below, you can see that the process was "rejected" but redaction still occurred.
If the redaction is successful (isFullRedaction=true), you can use the Get image service to retrieve the redacted image. If redaction was not possible, you will not be able to retrieve the image.
Example of a Get process result with successful redaction:
{
"status": "rejected",
"processId": "3a2f097e-448a-4fb8-802b-6f16a561f9bd",
"provider": "signicatpaper",
"redactionRequested": true,
"notificationUrl": "https://webhook.site/#!/705bcdd5-72dc-4018-832f-5b64ba26b5d8",
"createdAt": "2022-03-14T20:11:06Z",
"updatedAt": "2022-03-14T20:11:25Z",
"providerSpecific": {
"verification": {
"type": "NONE",
"status": "false"
},
"redactionResult": {
"isPartialRedaction": "true",
"isFullRedaction": "true"
},
"errors": [
"Failed checksum validation over items [date_of_expiry, document_number, checkDigit, document_number_raw, date_of_birth, checkDigit_raw, personal_number_raw, checkDigit_raw, checkDigit, personal_number]"
]
}
}
# Passport example: Personal identification number redacted in the response
The front, before and after redaction:
The back, before and after redaction: