This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Data Protection Endpoints

Protecting names, addresses, and other PII information

Protegrity API Playground exposes a curated selection of endpoints for data protection: you can use them to secure any PII and PCI information. The predefined endpoints include names, addresses, numbers, Credit Card Numbers, Social Security Numbers, and more. Format, length and language preservation are supported.

This collection is a subset of Protegrity functions available in the full version of the product.

1 - Name (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/name

DESCRIPTION:

Protect or unprotect a person’s name. The received token is not length-preserving.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

OPTIONS:

dictionary (optional) Specify the Unicode domain of the input and output values. Option en covers all characters within the Basic Latin block of the Unicode standard (range U+0000..U+007F). Options de and fr extend that coverage to include German and French characters, respectively. Accepts: [ en | de | fr ]. Defaults to en.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/name' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["Robin", "Wren"],
  "options": {
    "dictionary": "en"
  }
}'
  
  
  

SAMPLE RESPONSE


[
    "xkKZQ",
    "hTKo"
]

2 - Address (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/address

DESCRIPTION:

Protect or unprotect an address. The received token is not length-preserving.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

OPTIONS:

dictionary (optional) Specify the Unicode domain of the input and output values. Option en covers all characters within the Basic Latin block of the Unicode standard (range U+0000..U+007F). Options de and fr extend that coverage to include German and French characters, respectively. Accepts: [ en | de | fr ]. Defaults to en.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/address' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["77 Boulevard Saint-Jacques", "46 avenue de la Grande Armée"],
  "options": {
    "dictionary": "fr"
  }
}'
  
  
  

SAMPLE RESPONSE


[
  "3u CG5itJTNu KJStq-galulig",
  "Gr AY5iAK k1 n8 LvIx74 ewBék"
]

3 - City (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/city

DESCRIPTION:

Protect or unprotect a town or city. The received token is not length-preserving.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

OPTIONS:

dictionary (optional) Specify the Unicode domain of the input and output values. Option en covers all characters within the Basic Latin block of the Unicode standard (range U+0000..U+007F). Options de and fr extend that coverage to include German and French characters, respectively. Accepts: [ en | de | fr ]. Defaults to en.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/city' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["Berlin", "München"],
  "options": {
    "dictionary": "de"
  }
}'
  
  
  

SAMPLE RESPONSE


[
  "hjsöIO",
  "YAßiaoP"
]

4 - Postcode (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/postcode

DESCRIPTION:

Protect or unprotect a postal code with digits and chatacters. The received token is case-, length-, and position-preserving but may create invalid postal codes (e.g., restricted letters).

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/postcode' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["WX90GA", "SW700"]
}'
  
  
  

SAMPLE RESPONSE


[
  "AD12TT",
  "II867"
]

5 - Zipcode (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/zipcode

DESCRIPTION:

Protect or unprotect a postal code with digits only. The received token is length-preserving. The method may produce leading zeroes and invalid zipcodes (e.g., restricted digits).

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/zipcode' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["29017", "28100"]
}'
  
  
  

SAMPLE RESPONSE


[
  "00891",
  "67996"
]

6 - Phone (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/phone

DESCRIPTION:

Protect or unprotect a phone number. The received token is length-preserving. May return leading zeroes.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/phone' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["63098109", "120-99-02-10"]
}'
  
  
  

SAMPLE RESPONSE


[
  "81176289",
  "425-44-65-10"
]

7 - Email (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/email

DESCRIPTION:

Protect or unprotect a phone number. The received token is length-preserving. May return leading zeroes.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/email' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["ava.mcconnor@acme.corp", "wren@business.com"]
}'
  
  
  

SAMPLE RESPONSE


[
  "d3E.ui2sOks@acme.corp",
  "6KOe@business.com"
]

8 - Date of Birth (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/dob

DESCRIPTION:

Protect or unprotect a phone number. The received token is length-preserving. May return leading zeroes.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

OPTIONS:

year (optional) Set to true to leave the year in the clear. Must be set to true when unprotecting the string tokenized using this option. Accepts: [ true | false ]. Defaults to false.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/dob' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["1980/12/10", "1965/01/27"],
  "options": {
    "year": true
  }
}'
  
  
  

SAMPLE RESPONSE


[
  "1980/03/24",
  "1965/08/11"
]

9 - National Insurance Number (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/nin

DESCRIPTION:

Protect or unprotect a National Insurance Number (UK). The returned NIN is case-, length- and position-preserving, i.e., generated letters and numbers will adhere to their original position. Note that some NIN logic, i.e. restricted letters, is not preserved.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/nin' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["QQ123456A", "KT902281F"]
}'
  
  
  

SAMPLE RESPONSE


[
  "CD196371K",
  "OO918451S"
]

10 - Social Security Number (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/ssn

DESCRIPTION:

Protect or unprotect a Social Security Number (US). The returned SSN is length- and format-preserving. Note that some SSN logic, i.e. restricted numbers within digit groups, is not preserved.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/ssn' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["782-01-2930", "291-44-5983"]
}'
  
  
  

SAMPLE RESPONSE


[
  "399-03-3685",
  "389-71-6451"
]

11 - Credit Card Number (PCI DSS)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/ccn

DESCRIPTION:

Protect or unprotect a Credit Card Number. The returned CCN is not length-preserving. The endpoint accepts partial CCN protection, i.e. leaving the 8-digit BIN in the clear.

ATTRIBUTES:

data (required) Input data to transform.

OPTIONS:

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

bin (optional) Set to true to leave the 8-digit BIN number in the clear. Must be set to true when unprotecting the string tokenized using this option. Accepts: [ true | false ]. Defaults to false.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/ccn' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["4321567898765432", "2376876534560987"],
  "options": {
    "bin": false
  }
}'
  
  
  

SAMPLE RESPONSE


[
  "0449999816792240",
  "6683962881463918"
]

12 - Passport (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/passport

DESCRIPTION:

Protect or unprotect a passport number. The returned passport number is case-, length- and position-preserving (i.e., generated letters and numbers will adhere to their original position). Note that some passport logic, i.e. restricted letters, is not preserved.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/passport' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["FA039020112", "CBR90110244"]
}'
  
  
  

SAMPLE RESPONSE


[
  "IN890183422",
  "GFR67102933"
]

13 - IBAN (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/iban

DESCRIPTION:

Protect or unprotect an Internation Banking Account Number. The returned IBAN is case-, length- and position-preserving. Note that some IBAN logic, i.e., producing valid country codes or a checksum validation, is not supported. The endpoint accepts partial IBAN protection, i.e., leaving the letters in the clear.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

OPTIONS:

alpha (optional) Set to true to leave the letters in the clear. Must be set to true when unprotecting the string tokenized using this option. Accepts: [ true | false ]. Defaults to false.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/iban' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["NO8330001234567", "QA54QNBA000000000000693123456"],
  "options": {
    "alpha": true
  }
}'
  
  
  

SAMPLE RESPONSE


[
  "NO0980006979071",
  "QA13QNBA128618782491645358717"
]

14 - String

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/string

DESCRIPTION:

Protect or unprotect a string. Maximum length of the string is 128 characters. The returned string is not length-preserving neither case-preserving.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/string' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["hello", "world"]
}'
  
  
  

SAMPLE RESPONSE


[
  "UkosA",
  "okPPwa"
]

15 - Number

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/number

DESCRIPTION:

Protect or unprotect a number. The returned number is length-preserving. The endpoint might generate numbers with leading zeros.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/string' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["123654", "987654"]
}'
  
  
  

SAMPLE RESPONSE


[
  "034539",
  "101012"
]

16 - Text (Encryption)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/text

DESCRIPTION:

Protect or unprotect sample text using encryption. Received text must be hex encoded. The returned value is hex encoded. There is no limitation on the text’s length however payload limits apply.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/text' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["48656c6c6f20576f726c640a"]
}'
  
  
  

SAMPLE RESPONSE


[
  "E616C7B0762E28A32E0FABF4BC403C8D"
]

17 - Date of Birth (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/datetime

DESCRIPTION:

Protect or unprotect a datetime string The endpoint accepts partial timestamp protection, i.e., leaving the year value in the clear. Supported formats: YYYY/MM/DD and YYYY/MM/DD HH:MM:SS. Supported delimiters: /, -, .; space or T are supported between date and time.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

OPTIONS:

year (optional) Set to true to leave the year in the clear. Must be set to true when unprotecting the string tokenized using this option. Accepts: [ true | false ]. Defaults to false.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/datetime' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["1980/12/10 14:12:01", "1965/01/27"],
  "options": {
    "year": true
  }
}'
  
  
  

SAMPLE RESPONSE


[
  "1980/03/24 03:19:45",
  "1965/08/11"
]

18 - Multitype

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/multi

DESCRIPTION:

Protect or unprotect various attributes within a payload. Please refer to the specific payload type descriptions to see available options.

ATTRIBUTES:

data (required) Input data to transform.

type (required) Type of data provided. It should match one of available Data Protection endpoints, e.g. name, address, ccn.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

id (required) A numeric id for tracking separete elements.

OPTIONS:

options (optional) Options as available for each endpoint type.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/multi' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '[
  {
    "id": 1,
    "type": "address",
    "operation": "protect",
    "data": ["Place 8 Rue Nicolau", "46 avenue de la Grande Armée"],
    "options":{
      "dictionary": "fr"
    }
  },
  {
    "id": 2,
    "type": "city",
    "operation": "protect",
    "data": ["Paris"]
  }
]'
  
  
  

SAMPLE RESPONSE


[
    {
        "id": "1",
        "results": [
            "è6HmO s 0Cq okÎHWmxÛR",
            "sC ÈÂÉÉut éj Âî C1io3V 7xIoZSV"
        ]
    },
    {
        "id": "2",
        "results": [
            "ôdnÂefp"
        ]
    }
]