PII Fields Classification API

AI Tools

API To Fetch Product Specific Input and Output Fields List and PII Data Categories

The PII Fields Classification API is a utility API designed to provide detailed field-level metadata for a specific version of an Attestr product or service. While the Consent Data Categories API returns the list of supported Data Categories and Data Types across one or more services, this API provides the complete list of input and output fields associated with a particular product version. Additionally, the API identifies whether a field contains Personal Identifiable Information (PII) and, where applicable, returns the corresponding Data Category and Data Type mappings. This enables customers to implement privacy-aware integrations, consent orchestration, dynamic form generation, field-level governance, and regulatory compliance workflows more effectively.

API Definition


Request

Type

URL

Version

POST

https://api.attestr.com/api/{version/public/consent/fields

Use "v3" for DPDA compliant version

Request Body Parameters

Type

Name

Description

Optional (default)

Min Version

Max Version

String

type

Provide the consent purpose. Allowed values are - kyc_verification background_verification Read more at Consent Purpose

Required

v3


String

service

Product / Service code for which fields are required to be fetched.

Required

v3


Object

options

Reserved for future use. Used for specifying service specific options which helps to decide the associated PII fields

Optional

v3


Request Header Parameters

Type

Name

Value / Description

Optional

Min Version

Max Version

String

Content-Type

application/json

Required

v3


String

Authorization

Basic {authToken}

Required

v3


Info

If you do not have the authentication token, please refer to Register App to generate one.

Sample Request Payload

{ "type": "kyc_verification", "service": "BANK_ACC" }

Response

Http Status 200

Key

Description

Type

Min Version

Max Version

input

List of input fields. Each field has the following three properties. isPII - Indicates if the field contains a personally identifiable information PIICategory - If the field is PII, this property provides the name of the data category. For more information on data categories, refer to Consent Data Categories PIIType - If the field is PII, this property provides the specific data type under the category that best matches to the field.

Array<Object>

v3


values

List of output fields. Structure is similar to Input fields, except that this contains the output fields for the specific API version.

Array<Object>

v3


Sample Response

Sample response for valid input

{ "input": [ { "acc": { "isPII": true, "PIICategory": "financial", "PIIType": "bank_account" } }, { "ifsc": { "isPII": true, "PIICategory": "financial", "PIIType": "ifsc" } }, { "fetchIfsc": { "isPII": false } } ], "output": [ { "valid": { "isPII": false } }, { "name": { "isPII": true, "PIICategory": "personal_information", "PIIType": "name" } }, { "ifsc": { "isPII": false } }, { "ifsc.valid": { "isPII": false } }, { "ifsc.bank": { "isPII": false } }, { "ifsc.code": { "isPII": false } }, { "ifsc.ifsc": { "isPII": false } }, { "ifsc.micr": { "isPII": false } }, { "ifsc.branch": { "isPII": false } }, { "ifsc.city": { "isPII": false } }, { "ifsc.district": { "isPII": false } }, { "ifsc.state": { "isPII": false } }, { "ifsc.address": { "isPII": false } }, { "ifsc.neft": { "isPII": false } }, { "ifsc.imps": { "isPII": false } }, { "ifsc.rtgs": { "isPII": false } }, { "status": { "isPII": false } } ] }

Error Response

Parameter

Type

Description

code

Number

Unique error codes for different errors. Always available.

httpStatusCode

String

Standard HTTP status code for the error

message

String

Error message describing the error. Always Available.

details

String

Detail error message. Available only for certain types of errors.

Error Codes

HTTP Status

Error Code

Error Message

400

4001

Malformed data or missing required parameter values

400

4005

Operation could not be performed due to low credits balance

401

4016

Invalid client authorization

403

4031

Unauthorized access

403

4035

Requested service is not provisioned for your account

403

4039

Client's IP address is not whitelisted

403

4035

Requested service is not provisioned for your account

429

4291

Maximum account rate limit exceeded

429

4292

Maximum API rate limit exceeded

429

4293

Maximum account daily limit exceeded

429

4294

Maximum API daily limit exceeded

500

5001

Request could not be processed

Sample Error Response

{ "httpStatusCode": 400, "code": 4001, "message": "Malformed data or missing required parameter values", "appError": true }


  Last updated